/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/ORM/Rule
NameSizeModeActions
ExistsIn.php55870644editdlrm
IsUnique.php31500644editdlrm
LinkConstraint.php61970644editdlrm
ValidCount.php17000644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/ORM/Rule/ValidCount.php (1700B)
_field = $field; } /** * Performs the count check * * @param \Cake\Datasource\EntityInterface $entity The entity from where to extract the fields. * @param array $options Options passed to the check. * @return bool True if successful, else false. */ public function __invoke(EntityInterface $entity, array $options): bool { $value = $entity->{$this->_field}; if (!is_array($value) && !$value instanceof Countable) { return false; } return Validation::comparison(count($value), $options['operator'], $options['count']); } }