1 | <?php |
||
7 | class CommonNameValidator |
||
8 | { |
||
9 | /** |
||
10 | * @var Certificate |
||
11 | */ |
||
12 | private $certificate; |
||
13 | |||
14 | 3 | public function __construct(Certificate $certificate) |
|
18 | |||
19 | 3 | public function isValid($domain) : bool |
|
35 | |||
36 | 3 | private function getAllowedNames() : array |
|
50 | |||
51 | 3 | private function getNameVariations($domain) : array |
|
62 | } |
||
63 |
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: