GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 3.0 ( 5276e1...94e02b )
by Vermeulen
01:25
created

Cli::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace BFW\Core\AppSystems;
4
5
class Cli extends AbstractSystem
6
{
7
    /**
8
     * @var \BFW\Core\Cli $cli
9
     */
10
    protected $cli;
11
    
12
    /**
13
     * Define the cli property
14
     */
15
    public function __construct()
16
    {
17
        $this->cli = new \BFW\Core\Cli;
18
    }
19
    
20
    /**
21
     * {@inheritdoc}
22
     * 
23
     * @return \BFW\Core\Cli
24
     */
25
    public function __invoke()
26
    {
27
        return $this->cli;
28
    }
29
30
    /**
31
     * Getter accessor to cli property
32
     * 
33
     * @return \BFW\Core\Cli
34
     */
35
    public function getCli()
36
    {
37
        return $this->cli;
38
    }
39
    
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function toRun(): bool
44
    {
45
        return true;
46
    }
47
    
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function run()
52
    {
53
        $this->runCliFile();
54
        $this->runStatus = true;
55
    }
56
    
57
    /**
58
     * Run the cli file if we're in cli mode
59
     * 
60
     * @return void
61
     * 
62
     * @throws \Exception If no file is specified or if the file not exist.
63
     */
64
    protected function runCliFile()
65
    {
66
        if (PHP_SAPI !== 'cli') {
67
            return;
68
        }
69
70
        \BFW\Application::getInstance()
71
            ->getSubjectList()
72
            ->getSubjectByName('ApplicationTasks')
73
            ->sendNotify('run_cli_file');
74
        
75
        $fileToExec = $this->cli->obtainFileFromArg();
76
        $this->cli->run($fileToExec);
77
    }
78
}
79