Passed
Push — master ( 9d6aee...74eb15 )
by Timm
02:09
created

CmdRunner::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
4
namespace Stefaminator\Cli;
5
6
7
abstract class CmdRunner {
8
9
    /**
10
     * @var Cmd
11
     */
12
    private $cmd;
13
14
    /**
15
     * CmdRunner constructor.
16
     * @param Cmd $cmd
17
     */
18
    public function __construct(Cmd $cmd) {
19
        $this->cmd = $cmd;
20
    }
21
22
    /**
23
     * @return Cmd
24
     */
25
    public function cmd(): Cmd {
26
        return $this->cmd;
27
    }
28
29
    /**
30
     * Run the cmd
31
     */
32
    abstract public function run(): void;
33
}