Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function __construct(Authentication $authentication, array $trackingNumbers, string $printType, string $printFormat) |
||
16 | { |
||
17 | $this->authentication = $authentication; |
||
18 | $this->trackingNumbers = $trackingNumbers; |
||
19 | $this->printInfo = [ |
||
20 | 'type' => $printType, |
||
21 | 'format' => $printFormat |
||
22 | ]; |
||
42 | } |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: