1 | <?php |
||
19 | class Access implements ValidatorInterface |
||
20 | { |
||
21 | /** |
||
22 | * validate the access |
||
23 | * |
||
24 | * @since 4.0.0 |
||
25 | * |
||
26 | * @param string $access access to be validated |
||
27 | * @param string $groups groups of the user |
||
28 | * |
||
29 | * @return bool |
||
30 | */ |
||
31 | |||
32 | 4 | public function validate(string $access = null, string $groups = null) : bool |
|
38 | } |
||
39 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: