Conditions | 1 |
Paths | 1 |
Total Lines | 32 |
Code Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | #!/usr/bin/php |
||
14 | public function setup(): Cmd { |
||
15 | return Cmd::root() |
||
16 | ->setCallable(static function (Cmd $cmd) { |
||
17 | $cmd->help(); |
||
18 | }) |
||
19 | ->addSubCmd( |
||
20 | Cmd::extend('show') |
||
21 | ->setDescription('This command is used to show something. Take a look at the subcommands.') |
||
22 | ->setCallable(static function(Cmd $cmd) { |
||
23 | error_reporting(E_ALL); |
||
24 | $cmd->help(); |
||
25 | }) |
||
26 | ->addSubCmd( |
||
27 | Cmd::extend('hello') |
||
28 | ->setDescription('Displays hello world.') |
||
29 | ->setCallable(static function(Cmd $cmd) { |
||
|
|||
30 | self::eol(); |
||
31 | self::echo(' Hello world!', Color::FOREGROUND_COLOR_CYAN); |
||
32 | self::eol(); |
||
33 | self::eol(); |
||
34 | }) |
||
35 | ) |
||
36 | ->addSubCmd( |
||
37 | Cmd::extend('phpversion') |
||
38 | ->setDescription('Displays the current php version of your cli.') |
||
39 | ->setCallable(static function(Cmd $cmd) { |
||
40 | self::eol(); |
||
41 | self::echo(' Your PHP version is:', Color::FOREGROUND_COLOR_YELLOW); |
||
42 | self::eol(); |
||
43 | self::echo(' ' . PHP_VERSION); |
||
44 | self::eol(); |
||
45 | self::eol(); |
||
46 | }) |
||
53 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.