| Total Complexity | 3 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | #!/usr/bin/php |
||
| 10 | (new class extends App { |
||
| 11 | |||
| 12 | public function setup(): Cmd { |
||
| 13 | return ( |
||
| 14 | new class extends Cmd { |
||
| 15 | |||
| 16 | public function init(): void { |
||
| 17 | } |
||
| 18 | |||
| 19 | public function run(): void { |
||
| 20 | $this->runHelp(); |
||
| 21 | } |
||
| 22 | }) |
||
| 23 | ->addChild((new class('show') extends Cmd { |
||
| 24 | |||
| 25 | public function init(): void { |
||
| 26 | |||
| 27 | $this |
||
| 28 | ->setDescription( |
||
| 29 | 'This command is used to show something. Take a look at the subcommands.' |
||
| 30 | ); |
||
| 31 | |||
| 32 | } |
||
| 33 | |||
| 34 | public function run(): void { |
||
| 35 | $this->runHelp(); |
||
| 36 | } |
||
| 37 | |||
| 38 | }) |
||
| 39 | ->addChild((new class('hello') extends Cmd { |
||
| 40 | |||
| 41 | public function init(): void { |
||
| 51 | ]); |
||
| 52 | } |
||
| 81 | } |
||
| 82 | })) |
||
| 83 | ); |
||
| 84 | } |
||
| 85 | |||
| 86 | })->run(); |
||
| 87 |