| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 87 | public function getParameterByName(string $name): ReflectionParameter |
|
| 23 | { |
||
| 24 | 87 | foreach ($this->reflectionMethod->getParameters() as $parameter) { |
|
| 25 | 86 | if ($parameter->getName() === $name) { |
|
|
|
|||
| 26 | 86 | 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 |