1 | <?php |
||
15 | trait CheckTrait |
||
16 | { |
||
17 | /** |
||
18 | * Check if data satisfies the condition |
||
19 | * |
||
20 | * @param array $conditions |
||
21 | * @return bool |
||
22 | */ |
||
23 | public function check(array $conditions) : bool |
||
38 | |||
39 | /** |
||
40 | * Check AND condition |
||
41 | * |
||
42 | * @param array $conditions |
||
43 | * @return bool |
||
44 | */ |
||
45 | private function checkAnd(array $conditions) : bool |
||
54 | |||
55 | /** |
||
56 | * Check OR condition |
||
57 | * |
||
58 | * @param array $conditions |
||
59 | * @return bool |
||
60 | */ |
||
61 | private function checkOr(array $conditions) : bool |
||
70 | |||
71 | /** |
||
72 | * Check/compare some field by rule and some value |
||
73 | * |
||
74 | * @param string $staredRule |
||
75 | * @param mixed $arg1 |
||
76 | * @param mixed $arg2 |
||
77 | * @return bool |
||
78 | */ |
||
79 | private function checkField(string $staredRule, $arg1, $arg2) : bool |
||
90 | } |
||
91 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.