| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | public function __construct( |
||
| 42 | CalculatorInterface $calculator, |
||
| 43 | AggregatorInterface $aggregator, |
||
| 44 | MergerInterface $merger, |
||
| 45 | ?BillRepositoryInterface $billRepository |
||
| 46 | ) { |
||
| 47 | $this->calculator = $calculator; |
||
| 48 | $this->aggregator = $aggregator; |
||
| 49 | $this->merger = $merger; |
||
| 50 | $this->billRepository = $billRepository; |
||
| 51 | } |
||
| 65 |
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: