| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class FakeGenerator implements GeneratorInterface |
||
| 9 | { |
||
| 10 | private string $originClass; |
||
| 11 | |||
| 12 | public function __construct(string $originClass) |
||
| 13 | { |
||
| 14 | $this->originClass = $originClass; |
||
| 15 | } |
||
| 16 | |||
| 17 | public function run(Registry $registry): Registry |
||
| 19 | } |
||
|
|
|||
| 20 | |||
| 21 | public function originClass(): string |
||
| 24 | } |
||
| 25 | } |
||
| 26 |
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: