Conditions | 3 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 5.667 |
Changes | 0 |
1 | <?php |
||
36 | 82 | public function getExtensionConfiguration(): array |
|
37 | { |
||
38 | try { |
||
39 | 82 | return GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('crawler'); |
|
40 | } catch (ExtensionConfigurationExtensionNotConfiguredException $e) { |
||
41 | $this->logger->error($e->getMessage()); |
||
|
|||
42 | } catch (ExtensionConfigurationPathDoesNotExistException $e) { |
||
43 | $this->logger->error($e->getMessage()); |
||
44 | } |
||
47 |
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: