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 | 33 | public function resolve($config) |
|
36 | { |
||
37 | 33 | if (!is_array($config) || $config instanceof \ArrayAccess) { |
|
38 | 1 | throw new \RuntimeException('Config must be an array or implement \ArrayAccess interface'); |
|
39 | } |
||
40 | |||
41 | 32 | foreach ($config as $name => &$values) { |
|
42 | 32 | if ((!$solution = $this->getSolution($name)) || empty($values)) { |
|
43 | 32 | continue; |
|
44 | } |
||
45 | 27 | $options = $this->getSolutionOptions($name); |
|
46 | |||
47 | 27 | $values = call_user_func_array([$solution, $options['method']], [$values, &$config]); |
|
48 | 32 | } |
|
49 | |||
50 | 32 | return $config; |
|
51 | } |
||
52 | |||
58 |