Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | * @throws RuntimeException If a $param does not have a name() method. |
||
37 | */ |
||
38 | 10 | public static function parseParams(array $params, $args) |
|
39 | { |
||
40 | 10 | $ordered_args = array(); |
|
41 | |||
42 | 10 | foreach ($params as $param) { |
|
43 | 10 | if (! $param instanceof ReflectionParameter) { |
|
44 | throw new RuntimeException( |
||
45 | sprintf( |
||
46 | _('Parameter %1$s is not an instance of ReflectionParameter.'), |
||
47 | $param |
||
48 | ) |
||
59 |