Total Complexity | 7 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
9 | class BxCommand extends \Symfony\Component\Console\Command\Command implements LoggerAwareInterface { |
||
10 | |||
11 | use LoggerAwareTrait; |
||
12 | |||
13 | /** |
||
14 | * @return Application |
||
15 | */ |
||
16 | public function getApplication() |
||
17 | { |
||
18 | return parent::getApplication(); |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @return string |
||
23 | */ |
||
24 | public function getDocumentRoot() { |
||
25 | |||
26 | return $this->getApplication()->getDocumentRoot(); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param $annotationName |
||
31 | * @return mixed|object|null |
||
32 | * @throws \ReflectionException |
||
33 | */ |
||
34 | public function getAnnotation($annotationName) { |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @throws \ReflectionException |
||
44 | */ |
||
45 | protected function configure() { |
||
46 | |||
47 | /** @var Command $annotation */ |
||
48 | $annotation = $this->getAnnotation(\App\BxConsole\Annotations\Command::class); |
||
49 | |||
50 | if($annotation) { |
||
|
|||
51 | $this->setName($annotation->name); |
||
52 | $this->setDescription($annotation->description); |
||
53 | if($annotation->help) { |
||
54 | $this->setHelp($annotation->help); |
||
55 | } |
||
56 | } |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return \Psr\Log\LoggerInterface|null |
||
61 | */ |
||
62 | protected function getLogger() { |
||
65 | } |
||
66 | } |