mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
type fixes
This commit is contained in:
@@ -44,13 +44,16 @@ use stdClass;
|
||||
*/
|
||||
class FieldValidationManager
|
||||
{
|
||||
/**
|
||||
* @var array<string,?object>
|
||||
*/
|
||||
private $checkerCache = [];
|
||||
|
||||
private $metadata;
|
||||
private Metadata $metadata;
|
||||
|
||||
private $fieldUtil;
|
||||
private FieldUtil $fieldUtil;
|
||||
|
||||
private $factory;
|
||||
private ValidatorFactory $factory;
|
||||
|
||||
public function __construct(Metadata $metadata, FieldUtil $fieldUtil, ValidatorFactory $factory)
|
||||
{
|
||||
@@ -166,6 +169,9 @@ class FieldValidationManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $validationValue
|
||||
*/
|
||||
private function processFieldCheck(
|
||||
string $entityType,
|
||||
string $type,
|
||||
@@ -189,6 +195,9 @@ class FieldValidationManager
|
||||
return $checker->$methodName($entity, $field, $validationValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $validationValue
|
||||
*/
|
||||
private function processFieldRawCheck(
|
||||
string $entityType,
|
||||
string $type,
|
||||
|
||||
@@ -31,8 +31,14 @@ namespace Espo\Core\FieldValidation;
|
||||
|
||||
class FieldValidationParams
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $skipFieldList = [];
|
||||
|
||||
/**
|
||||
* @var array<string,string[]>
|
||||
*/
|
||||
private $typeSkipFieldListData = [];
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -38,11 +38,14 @@ use RuntimeException;
|
||||
|
||||
class ValidatorFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string,class-string>
|
||||
*/
|
||||
private $classNameCache = [];
|
||||
|
||||
private $metadata;
|
||||
private Metadata $metadata;
|
||||
|
||||
private $injectableFactory;
|
||||
private InjectableFactory $injectableFactory;
|
||||
|
||||
public function __construct(Metadata $metadata, InjectableFactory $injectableFactory)
|
||||
{
|
||||
@@ -74,6 +77,9 @@ class ValidatorFactory
|
||||
return $this->injectableFactory->create($className);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ?class-string
|
||||
*/
|
||||
private function getClassName(string $entityType, string $field): ?string
|
||||
{
|
||||
$key = $entityType . '_' . $field;
|
||||
@@ -85,6 +91,9 @@ class ValidatorFactory
|
||||
return $this->classNameCache[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ?class-string
|
||||
*/
|
||||
private function getClassNameNoCache(string $entityType, string $field): ?string
|
||||
{
|
||||
$className1 = $this->metadata
|
||||
|
||||
Reference in New Issue
Block a user