mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
cs
This commit is contained in:
@@ -38,17 +38,12 @@ use RuntimeException;
|
||||
*/
|
||||
class LinkMultiple
|
||||
{
|
||||
private $list = [];
|
||||
|
||||
/**
|
||||
* @param LinkMultipleItem[] $list
|
||||
*
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function __construct(array $list = [])
|
||||
public function __construct(private array $list = [])
|
||||
{
|
||||
$this->list = $list;
|
||||
|
||||
$this->validateList();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,15 +41,11 @@ use Espo\ORM\Defs as OrmDefs;
|
||||
*/
|
||||
class ListLoader implements LoaderInterface
|
||||
{
|
||||
private OrmDefs $ormDefs;
|
||||
|
||||
/** @var array<string, string[]> */
|
||||
private $fieldListCacheMap = [];
|
||||
private array $fieldListCacheMap = [];
|
||||
|
||||
public function __construct(OrmDefs $ormDefs)
|
||||
{
|
||||
$this->ormDefs = $ormDefs;
|
||||
}
|
||||
public function __construct(private OrmDefs $ormDefs)
|
||||
{}
|
||||
|
||||
public function process(Entity $entity, Params $params): void
|
||||
{
|
||||
|
||||
@@ -34,10 +34,8 @@ namespace Espo\Core\FieldProcessing\Loader;
|
||||
*/
|
||||
class Params
|
||||
{
|
||||
/**
|
||||
* @var ?string[]
|
||||
*/
|
||||
private $select = null;
|
||||
/** @var ?string[] */
|
||||
private ?array $select = null;
|
||||
|
||||
public function __construct() {}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ use Espo\Core\Utils\Metadata;
|
||||
class ReadLoadProcessor
|
||||
{
|
||||
/** @var array<string, Loader<Entity>[]> */
|
||||
private $loaderListMapCache = [];
|
||||
private array $loaderListMapCache = [];
|
||||
|
||||
public function __construct(
|
||||
private InjectableFactory $injectableFactory,
|
||||
|
||||
@@ -46,9 +46,9 @@ use ReflectionClass;
|
||||
class FieldValidationManager
|
||||
{
|
||||
/** @var array<string, ?object> */
|
||||
private $checkerCache = [];
|
||||
private array $checkerCache = [];
|
||||
/** @var array<string, ?Validator<Entity>> */
|
||||
private $validatorCache = [];
|
||||
private array $validatorCache = [];
|
||||
|
||||
private CheckerFactory $checkerFactory;
|
||||
|
||||
|
||||
@@ -35,9 +35,7 @@ use Espo\Core\Job\Job\Data as JobData;
|
||||
use Espo\Core\MassAction\MassActionFactory;
|
||||
use Espo\Core\MassAction\Result;
|
||||
use Espo\Core\Utils\Language;
|
||||
|
||||
use Espo\ORM\EntityManager;
|
||||
|
||||
use Espo\Entities\MassAction as MassActionEntity;
|
||||
use Espo\Entities\Notification;
|
||||
use Espo\Entities\User;
|
||||
@@ -46,21 +44,11 @@ use Throwable;
|
||||
|
||||
class Process implements Job
|
||||
{
|
||||
private $entityManager;
|
||||
|
||||
private $factory;
|
||||
|
||||
private $language;
|
||||
|
||||
public function __construct(
|
||||
EntityManager $entityManager,
|
||||
MassActionFactory $factory,
|
||||
Language $language
|
||||
) {
|
||||
$this->entityManager = $entityManager;
|
||||
$this->factory = $factory;
|
||||
$this->language = $language;
|
||||
}
|
||||
private EntityManager $entityManager,
|
||||
private MassActionFactory $factory,
|
||||
private Language $language
|
||||
) {}
|
||||
|
||||
public function run(JobData $data): void
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ class Params
|
||||
{
|
||||
private string $entityType;
|
||||
/** @var ?string[] */
|
||||
private $ids = null;
|
||||
private ?array $ids = null;
|
||||
private ?SearchParams $searchParams = null;
|
||||
|
||||
private function __construct() {}
|
||||
|
||||
@@ -185,10 +185,8 @@ class Service implements Crud,
|
||||
protected $selectBuilderFactory;
|
||||
/** @var RecordHookManager */
|
||||
protected $recordHookManager;
|
||||
/** @var ?ListLoadProcessor */
|
||||
private $listLoadProcessor = null;
|
||||
/** @var ?DuplicateFinder */
|
||||
private $duplicateFinder = null;
|
||||
private ?ListLoadProcessor $listLoadProcessor = null;
|
||||
private ?DuplicateFinder $duplicateFinder = null;
|
||||
private ?LinkCheck $linkCheck = null;
|
||||
|
||||
protected const MAX_SELECT_TEXT_ATTRIBUTE_LENGTH = 10000;
|
||||
|
||||
@@ -46,7 +46,7 @@ use LogicException;
|
||||
class Converter
|
||||
{
|
||||
/** @var ?array<string, mixed> */
|
||||
private $entityDefs = null;
|
||||
private ?array $entityDefs = null;
|
||||
|
||||
private string $defaultAttributeType = Entity::VARCHAR;
|
||||
|
||||
@@ -54,7 +54,7 @@ class Converter
|
||||
private const INDEX_TYPE_INDEX = 'index';
|
||||
|
||||
/** @var array<string, int> */
|
||||
private $defaultLengthMap = [
|
||||
private array $defaultLengthMap = [
|
||||
Entity::VARCHAR => 255,
|
||||
Entity::INT => 11,
|
||||
];
|
||||
@@ -64,7 +64,7 @@ class Converter
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private $paramMap = [
|
||||
private array $paramMap = [
|
||||
'type' => 'type',
|
||||
'dbType' => 'dbType',
|
||||
'maxLength' => 'len',
|
||||
@@ -90,14 +90,14 @@ class Converter
|
||||
];
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
private $idParams = [];
|
||||
private array $idParams = [];
|
||||
|
||||
/**
|
||||
* Permitted entityDefs parameters which will be copied to ormMetadata.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private $permittedEntityOptions = [
|
||||
private array $permittedEntityOptions = [
|
||||
'indexes',
|
||||
'additionalTables',
|
||||
];
|
||||
|
||||
@@ -44,7 +44,7 @@ class Helper
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private $copiedDefParams = [
|
||||
private array $copiedDefParams = [
|
||||
'readOnly',
|
||||
'disabled',
|
||||
'notStorable',
|
||||
|
||||
Reference in New Issue
Block a user