Total Complexity | 10 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | final class Manufacturer implements \Stringable |
||
7 | { |
||
8 | 8 | public function __construct( |
|
9 | public readonly string $code, |
||
10 | public readonly string $brand, |
||
11 | public readonly string $types = '', |
||
12 | public readonly string $model = '', |
||
13 | public readonly string $manufacturer = '', |
||
14 | public readonly string $country = '', |
||
15 | public readonly ?int $from = null, |
||
16 | public readonly ?int $to = null, |
||
17 | public readonly string $notes = '', |
||
18 | public readonly bool $canCompareDates = false, |
||
19 | ) |
||
20 | { |
||
21 | 8 | } |
|
22 | |||
23 | 1 | public function desc(): string |
|
31 | } |
||
32 | |||
33 | 1 | public function __toString(): string |
|
38 |
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: