type fixes
This commit is contained in:
@@ -38,6 +38,9 @@ use Espo\ORM\{
|
||||
*/
|
||||
class CollectionFactory
|
||||
{
|
||||
/**
|
||||
* @var EntityManager
|
||||
*/
|
||||
protected $entityManager;
|
||||
|
||||
public function __construct(EntityManager $entityManager)
|
||||
|
||||
@@ -61,20 +61,39 @@ class BaseMapper implements RDBMapper
|
||||
|
||||
protected $aliasesCache = [];
|
||||
|
||||
/**
|
||||
* @var PDO
|
||||
*/
|
||||
protected $pdo;
|
||||
|
||||
protected $entityFactroy;
|
||||
|
||||
protected $collectionFactory;
|
||||
|
||||
protected $queryComposer;
|
||||
|
||||
/**
|
||||
* @var EntityFactory
|
||||
*/
|
||||
protected $entityFactory;
|
||||
|
||||
/**
|
||||
* @var CollectionFactory
|
||||
*/
|
||||
protected $collectionFactory;
|
||||
|
||||
/**
|
||||
* @var QueryComposer
|
||||
*/
|
||||
protected $queryComposer;
|
||||
|
||||
/**
|
||||
* @var Metadata
|
||||
*/
|
||||
protected $metadata;
|
||||
|
||||
/**
|
||||
* @var SqlExecutor
|
||||
*/
|
||||
protected $sqlExecutor;
|
||||
|
||||
/**
|
||||
* @var Helper
|
||||
*/
|
||||
protected $helper;
|
||||
|
||||
public function __construct(
|
||||
@@ -1237,7 +1256,7 @@ class BaseMapper implements RDBMapper
|
||||
{
|
||||
$id = $this->pdo->lastInsertId();
|
||||
|
||||
if ($id === '' || $id === null) {
|
||||
if ($id === '' || $id === null) { /** @phpstan-ignore-line */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1560,7 +1579,7 @@ class BaseMapper implements RDBMapper
|
||||
|
||||
$foreignEntity = $this->entityFactory->create($foreignEntityType);
|
||||
|
||||
$map = $foreignEntity->getRelationParam($foreign, 'columnAttributeMap') ?? [];
|
||||
$map = $this->getRelationParam($foreignEntity, $foreign, 'columnAttributeMap') ?? [];
|
||||
|
||||
$select = [];
|
||||
|
||||
|
||||
@@ -144,12 +144,24 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
|
||||
protected $identifierQuoteCharacter = '`';
|
||||
|
||||
/**
|
||||
* @var EntityFactory
|
||||
*/
|
||||
protected $entityFactory;
|
||||
|
||||
/**
|
||||
* @var PDO
|
||||
*/
|
||||
protected $pdo;
|
||||
|
||||
/**
|
||||
* @var Metadata
|
||||
*/
|
||||
protected $metadata;
|
||||
|
||||
/**
|
||||
* @var FunctionConverterFactory|null
|
||||
*/
|
||||
protected $functionConverterFactory;
|
||||
|
||||
protected $helper;
|
||||
@@ -1070,7 +1082,7 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
return $function . '(' . $part . ')';
|
||||
}
|
||||
|
||||
private function getFunctionPartFromFactory(string $function, array $argumentPartList): ?string
|
||||
private function getFunctionPartFromFactory(string $function, array $argumentPartList): string
|
||||
{
|
||||
$obj = $this->functionConverterFactory->create($function);
|
||||
|
||||
|
||||
@@ -61,12 +61,19 @@ class RDBRepository implements Repository
|
||||
*/
|
||||
protected $entityManager;
|
||||
|
||||
/**
|
||||
* @var EntityFactory
|
||||
*/
|
||||
protected $entityFactory;
|
||||
|
||||
protected $mapper;
|
||||
|
||||
/**
|
||||
* @var HookMediator|null
|
||||
*/
|
||||
protected $hookMediator;
|
||||
|
||||
/**
|
||||
* @var RDBTransactionManager
|
||||
*/
|
||||
protected $transactionManager;
|
||||
|
||||
public function __construct(
|
||||
|
||||
Reference in New Issue
Block a user