| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| 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 | } |
||
| 25 | 13 | ); |
|
| 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 | 13 | } |
|
| 33 | |||
| 34 | 13 | return $classes; |
|
| 35 | } |
||
| 36 | |||
| 59 |