| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 3 | protected function getHandlers($options) |
|
| 29 | { |
||
| 30 | 3 | $handlers = $options['handlers'] ?? []; |
|
| 31 | |||
| 32 | 3 | if (empty($handlers) || !is_array($handlers)) { |
|
| 33 | 2 | throw new MissingConfigException( |
|
| 34 | 2 | "No handlers specified" |
|
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | 1 | $return = []; |
|
| 39 | |||
| 40 | 1 | foreach ($handlers as $handler) { |
|
| 41 | 1 | $return[] = $this->getHandlerManager()->get($handler); |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | return $return; |
|
| 45 | } |
||
| 46 | } |
||
| 47 |