1 | <?php |
||
6 | class CreditCardExpiry implements HydratableInterface |
||
7 | { |
||
8 | /** |
||
9 | * @var int |
||
10 | */ |
||
11 | private $year; |
||
12 | |||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $month; |
||
17 | |||
18 | 36 | public function hydrateXml(\SimpleXMLElement $xml) |
|
27 | |||
28 | /** |
||
29 | * @return int |
||
30 | */ |
||
31 | 6 | public function getYear(): ?int |
|
35 | |||
36 | /** |
||
37 | * @return int |
||
38 | */ |
||
39 | 6 | public function getMonth(): ?int |
|
43 | } |
||
44 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.