Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 78.56% |
Changes | 0 |
1 | <?php |
||
5 | class Hex |
||
6 | { |
||
7 | /** @var int|null */ |
||
8 | protected $max; |
||
9 | |||
10 | /** |
||
11 | * @param int|null $max |
||
12 | */ |
||
13 | 3 | public function __construct(int $max = null) |
|
16 | 3 | } |
|
17 | |||
18 | /** |
||
19 | * @param $subject |
||
20 | * @param $field |
||
21 | * |
||
22 | * @return bool |
||
23 | */ |
||
24 | 3 | public function __invoke($subject, string $field): bool |
|
46 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: