MainTask::mainAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 18
ccs 0
cts 12
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Canvas\Cli\Tasks;
4
5
use Phalcon\Cli\Task as PhTask;
0 ignored issues
show
Bug introduced by
The type Phalcon\Cli\Task was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class MainTask extends PhTask
8
{
9
    /**
10
     * Executes the main action of the cli mapping passed parameters to tasks.
11
     */
12
    public function mainAction()
13
    {
14
        // 'green' => "\033[0;32m(%s)\033[0m",
15
        // 'red'   => "\033[0;31m(%s)\033[0m",
16
        $year = date('Y');
17
        $output = <<<EOF
18
******************************************************
19
 Phalcon Team | (C) {$year}
20
******************************************************
21
22
Usage: runCli <command>
23
24
  --help         \e[0;32m(safe)\e[0m shows the help screen/available commands
25
  --clear-cache  \e[0;32m(safe)\e[0m clears the cache folders
26
27
EOF;
28
29
        echo $output;
30
    }
31
}
32