Passed
Push — master ( f833b1...244bf6 )
by Timm
02:07
created

cli-app-helloworld.php$0 ➔ run()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
#!/usr/bin/php
2
<?php
3
4
require __DIR__ . '/../vendor/autoload.php';
5
6
use Stefaminator\Cli\App;
7
use Stefaminator\Cli\AppParser;
8
use Stefaminator\Cli\Cmd;
9
use Stefaminator\Cli\CmdRunner;
10
11
AppParser::run(
12
    (new class extends App {
13
14
        public function setup(): Cmd {
15
            return Cmd::root()
16
                ->setRunner(
17
                    (new class extends CmdRunner {
18
                        public function run(): void {
19
                            echo "Hello World";
20
                            echo "\n";
21
                        }
22
                    })
23
                );
24
        }
25
26
    })
27
);
28