| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 5 | public function getArguments() : array |
|
| 24 | { |
||
| 25 | 5 | $arguments = []; |
|
| 26 | |||
| 27 | 5 | if (!$this->container) { |
|
| 28 | 1 | throw new \RuntimeException( |
|
| 29 | 1 | 'Oops! Container is not defined' |
|
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 33 | 4 | foreach ($this->params as $param) { |
|
| 34 | 3 | $parameter = Objects\Argument::fromString($param); |
|
| 35 | |||
| 36 | 3 | $arguments[] = $parameter->isService() |
|
| 37 | 3 | ? $this->container->get($param) |
|
| 38 | 3 | : $param; |
|
| 39 | } |
||
| 40 | |||
| 41 | 4 | return $arguments; |
|
| 42 | } |
||
| 43 | } |
||
| 44 |