| Conditions | 4 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function getClasses($target = null, string $interfaceToBeImplemented = null): array |
||
| 26 | { |
||
| 27 | /** @var \ReflectionClass[] $targets */ |
||
| 28 | $targets = $this->locator->getClasses($target); |
||
| 29 | if (!empty($interfaceToBeImplemented)) { |
||
| 30 | foreach ($targets as $name => $reflection) { |
||
| 31 | if (!$reflection->implementsInterface($interfaceToBeImplemented)) { |
||
| 32 | unset($targets[$name]); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return $targets; |
||
| 38 | } |
||
| 39 | } |