Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
22 | 102 | public function getParameterByName(string $name): ReflectionParameter |
|
23 | { |
||
24 | 102 | foreach ($this->reflectionMethod->getParameters() as $parameter) { |
|
25 | 101 | if ($parameter->getName() === $name) { |
|
|
|||
26 | 101 | return $parameter; |
|
27 | } |
||
28 | } |
||
29 | |||
30 | 2 | throw new ConfigurationException(sprintf( |
|
31 | 2 | 'Parameter %s is configured but not found in method %s', |
|
32 | 2 | '$' . $name, |
|
33 | 2 | $this->getFriendlyName() |
|
34 | )); |
||
35 | } |
||
36 | |||
63 |