| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 75 | public function getParameters(callable $callable, array $query) : array |
|
| 34 | 75 | { |
|
| 35 | $metas = ($this->paramMetas)($callable); |
||
| 36 | 68 | $parameters = []; |
|
| 37 | foreach ($metas as $varName => $param) { |
||
| 38 | /* @var $param ParamInterface */ |
||
| 39 | 68 | try { |
|
| 40 | $parameters[] = $param($varName, $query, $this->injector); |
||
| 41 | } catch (ParameterException $e) { |
||
| 42 | throw new ParameterException($this->getErrorMessage($callable, $e)); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 46 | return $parameters; |
||
| 47 | } |
||
| 48 | |||
| 58 |