Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 13 | public function getPlugins() { |
|
20 | 13 | $candidates = array_filter( |
|
21 | 13 | ClassFinder::getClassesInNamespace('drupol\Yaroc\Plugin\Method'), |
|
22 | 13 | function ($className) { |
|
23 | 13 | return in_array('drupol\Yaroc\Plugin\MethodPluginInterface', class_implements($className)); |
|
24 | 13 | } |
|
25 | ); |
||
26 | |||
27 | 13 | $classes = []; |
|
28 | 13 | foreach ($candidates as $candidate) { |
|
29 | 13 | $candidate = new \ReflectionClass($candidate); |
|
30 | |||
31 | 13 | $classes[$candidate->getConstant('METHOD')] = $candidate; |
|
32 | } |
||
33 | |||
34 | 13 | return $classes; |
|
35 | } |
||
36 | |||
59 |