Total Complexity | 1 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
13 | class TwigService extends AbstractWithLocator implements ClearServiceInterface |
||
14 | { |
||
15 | /** |
||
16 | * @param string $template |
||
17 | * @param array $params |
||
18 | * |
||
19 | * @return string |
||
20 | * @throws \Core\Locator\Dynamic\ServiceNotParseable |
||
21 | * @throws \Twig_Error_Loader |
||
22 | * @throws \Twig_Error_Runtime |
||
23 | * @throws \Twig_Error_Syntax |
||
24 | */ |
||
25 | public function render(string $template, array $params = []): string |
||
28 | } |
||
29 | } |
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: