We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 6 |
Paths | 12 |
Total Lines | 31 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function resolve($input) |
||
24 | { |
||
25 | if (!is_array($input)) { |
||
26 | $input = [$input]; |
||
27 | } |
||
28 | |||
29 | if (!isset($input[0]) || !isset($input[1])) { |
||
30 | $optionResolver = new OptionsResolver(); |
||
31 | $optionResolver->setDefaults([null, []]); |
||
32 | $input = $optionResolver->resolve($input); |
||
33 | } |
||
34 | |||
35 | $alias = $input[0]; |
||
36 | $funcArgs = $input[1]; |
||
37 | |||
38 | if (null === $func = $this->cache->fetch($alias)) { |
||
39 | $solution = $this->getSolution($alias); |
||
40 | |||
41 | if (null === $solution) { |
||
42 | throw new UnresolvableException($this->unresolvableMessage($alias)); |
||
43 | } |
||
44 | |||
45 | $options = $this->getSolutionOptions($alias); |
||
46 | |||
47 | $func = [$solution, $options['method']]; |
||
48 | |||
49 | $this->cache->save($alias, $func); |
||
50 | } |
||
51 | |||
52 | return call_user_func_array($func, $funcArgs); |
||
53 | } |
||
54 | |||
57 |