Passed
Push — master ( 738022...b95edc )
by Timm
01:55
created

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

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
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
10
AppParser::run(
11
    (new class extends App {
12
13
        public function setup(): Cmd {
14
            return Cmd::root()
15
                ->setCallable(static function (Cmd $cmd) {
0 ignored issues
show
Unused Code introduced by
The parameter $cmd is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

15
                ->setCallable(static function (/** @scrutinizer ignore-unused */ Cmd $cmd) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
16
                    echo 'Hello World' . self::EOL;
17
                });
18
        }
19
20
    })
21
);
22