Total Complexity | 4 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class SimpleGenerator implements SimpleGeneratorInterface |
||
18 | { |
||
19 | /** @var DocumentManagerInterface $documentManager */ |
||
20 | private $documentManager; |
||
21 | |||
22 | /** |
||
23 | * Generator constructor. |
||
24 | * |
||
25 | * @param DocumentManagerInterface $documentManager |
||
26 | */ |
||
27 | public function __construct( |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @inheritDoc |
||
35 | */ |
||
36 | public function generate(): BuiltInAgent |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return BuiltInAgent |
||
43 | * This is specific implementation |
||
44 | */ |
||
45 | private function yieldContent(): BuiltInAgent |
||
52 |
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: