| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 41 | 6 | public function format(array $header): array |
|
| 42 | { |
||
| 43 | 6 | $ret = []; |
|
| 44 | 6 | foreach ($header as $value) { |
|
| 45 | 6 | if (!is_string($value)) { |
|
| 46 | 1 | throw new \InvalidArgumentException('All elements of the array must be strings'); |
|
| 47 | } |
||
| 48 | 5 | $ret[] = call_user_func($this->callback, $value); |
|
| 49 | } |
||
| 50 | 5 | return $ret; |
|
| 51 | } |
||
| 53 |