| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 33 | 4 | public static function getHandlerByCommand(string $command, ?Reader $reader = null): ?string |
|
| 34 | { |
||
| 35 | 4 | $annotation = ($reader ?? new AnnotationReader())->getClassAnnotation(new ReflectionClass($command), Handler::class); |
|
| 36 | |||
| 37 | 4 | if (!($annotation instanceof Handler)) { |
|
| 38 | 1 | return null; |
|
| 39 | } |
||
| 40 | |||
| 41 | 3 | return $annotation->getHandler(); |
|
| 42 | } |
||
| 43 | } |
||
| 44 |