Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function getAllMethods() |
||
33 | { |
||
34 | $configuredMethods = (array) static::config()->get('methods'); |
||
35 | |||
36 | $allMethods = []; |
||
37 | |||
38 | foreach ($configuredMethods as $method) { |
||
39 | $method = Injector::inst()->get($method); |
||
40 | |||
41 | if (!$method instanceof MethodInterface) { |
||
42 | throw new UnexpectedValueException(sprintf( |
||
43 | 'Given method "%s" does not implement %s', |
||
44 | $method, |
||
45 | MethodInterface::class |
||
46 | )); |
||
47 | } |
||
48 | |||
49 | $allMethods[] = $method; |
||
50 | } |
||
51 | |||
52 | return $allMethods; |
||
53 | } |
||
55 |