| Conditions | 6 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 1 | public function serve($arguments) { |
|
| 51 | 1 | $result = null; |
|
| 52 | |||
| 53 | 1 | if (!is_array($arguments)) { |
|
| 54 | 1 | $arguments = [$arguments]; |
|
| 55 | 1 | } |
|
| 56 | // Adding link to $result |
||
| 57 | 1 | $arguments = array_merge([&$result], $arguments); |
|
| 58 | 1 | if (!empty($this->clients)) { |
|
| 59 | 1 | foreach ($this->clients as $order => $callables) { |
|
| 60 | 1 | foreach ($callables as $callable) { |
|
| 61 | 1 | if (is_callable($callable)) { |
|
| 62 | 1 | $result = call_user_func_array($callable, $arguments); |
|
| 63 | 1 | } |
|
| 64 | 1 | } |
|
| 65 | 1 | } |
|
| 66 | 1 | } |
|
| 67 | |||
| 68 | 1 | return $result; |
|
| 69 | } |
||
| 83 |