Cli::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * Cli.php
4
 *
5
 * PHP version 7.3 and up.
6
 *
7
 * @category Core
8
 * @package  Redbox_Cli
9
 * @author   Johnny Mast <[email protected]>
10
 * @license  https://opensource.org/licenses/MIT MIT
11
 * @link     https://github.com/johnnymast/redbox-cli
12
 * @since    1.0
13
 */
14
15
namespace Redbox\Cli;
16
17
use Redbox\Cli\Arguments\Manager as ArgumentManager;
18
19
/**
20
 * Class Cli
21
 *
22
 * @category Core
23
 * @package  Redbox_Cli
24
 * @author   Johnny Mast <[email protected]>
25
 * @license  https://opensource.org/licenses/MIT MIT
26
 * @link     https://github.com/johnnymast/redbox-cli
27
 * @since    1.0
28
 */
29
class Cli
30
{
31
    /**
32
     * An instance of the Argument Manager class
33
     *
34
     * @var \Redbox\Cli\Arguments\Manager
35
     */
36
    public $arguments;
37
38
    /**
39
     * Cli constructor.
40
     */
41 9
    public function __construct()
42
    {
43 9
        $this->setManager(new ArgumentManager());
44 9
    }
45
46
    /**
47
     * Set the manager for handling arguments
48
     *
49
     * @param \Redbox\Cli\Arguments\Manager $manager The argument manager.
50
     *
51
     * @return void
52
     */
53 9
    public function setManager(ArgumentManager $manager): void
54
    {
55 9
        $this->arguments = $manager;
56 9
    }
57
}
58