We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 6 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 6 |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 35 | 32 | public function resolve($config) |
|
| 36 | { |
||
| 37 | 32 | if (!is_array($config) || $config instanceof \ArrayAccess) { |
|
| 38 | 1 | throw new \RuntimeException('Config must be an array or implement \ArrayAccess interface'); |
|
| 39 | } |
||
| 40 | |||
| 41 | 31 | foreach ($config as $name => &$values) { |
|
| 42 | 31 | if ((!$solution = $this->getSolution($name)) || empty($values)) { |
|
| 43 | 31 | continue; |
|
| 44 | } |
||
| 45 | 26 | $options = $this->getSolutionOptions($name); |
|
| 46 | |||
| 47 | 26 | $values = call_user_func_array([$solution, $options['method']], [$values]); |
|
| 48 | 31 | } |
|
| 49 | |||
| 50 | 31 | return $config; |
|
| 51 | } |
||
| 52 | |||
| 58 |