Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php declare(strict_types = 1); |
||
24 | public function __construct(array $scopeData) |
||
25 | { |
||
26 | // Check for name attribute |
||
27 | if (array_key_exists('@attributes', $scopeData) && array_key_exists('name', $scopeData['@attributes'])) { |
||
28 | parent::__construct($scopeData['@attributes']['name']); |
||
29 | } else { |
||
30 | throw new \InvalidArgumentException('Cannot configure service without name attribute'); |
||
31 | } |
||
32 | } |
||
33 | |||
46 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.