1 | <?php |
||
25 | class ExistsIn |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * The list of fields to check |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $_fields; |
||
34 | |||
35 | /** |
||
36 | * The repository where the field will be looked for |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $_repository; |
||
41 | |||
42 | /** |
||
43 | * Constructor. |
||
44 | * |
||
45 | * @param string|array $fields The field or fields to check existence as primary key. |
||
46 | * @param object|string $repository The repository where the field will be looked for, |
||
47 | * or the association name for the repository. |
||
48 | */ |
||
49 | public function __construct($fields, $repository) |
||
54 | |||
55 | /** |
||
56 | * Performs the existence check |
||
57 | * |
||
58 | * @param \Cake\Datasource\EntityInterface $entity The entity from where to extract the fields |
||
59 | * @param array $options Options passed to the check, |
||
60 | * where the `repository` key is required. |
||
61 | * @throws \RuntimeException When the rule refers to an undefined association. |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function __invoke(EntityInterface $entity, array $options) |
||
115 | |||
116 | /** |
||
117 | * Check whether or not the entity fields are nullable and null. |
||
118 | * |
||
119 | * @param \Cake\ORM\EntityInterface $entity The entity to check. |
||
120 | * @param \Cake\ORM\Table $source The table to use schema from. |
||
121 | * @return bool |
||
122 | */ |
||
123 | protected function _fieldsAreNull($entity, $source) |
||
134 | } |
||
135 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..