Failed Conditions
Pull Request — master (#343)
by Rafael
02:33
created

SetupTask::mainAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
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
use Canvas\Cli\Tasks\AclTask;
7
use Canvas\Cli\Tasks\EmailtemplatesTask;
8
9
/**
10
 * Class AclTask.
11
 *
12
 * @package Canvas\Cli\Tasks;
13
 *
14
 * @property \Canvas\Acl\Manager $acl
15
 */
16
class SetupTask extends PhTask
17
{
18
    /**
19
     * Create the default roles of the system.
20
     *
21
     * @return void
22
     */
23
    public function mainAction()
24
    {
25
        $acl = new AclTask();
26
        $emailTemplates = new EmailtemplatesTask();
27
28
        $acl->setupDefaultRoles();
29
        $acl->kanvas();
30
        $emailTemplates->insertDefaultEmailTemplate();
31
    }
32
}
33