Passed
Push — master ( 6167b2...1a65e1 )
by Gordon
03:51 queued 01:49
created

AddPHPCSTask::getScript()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 0
dl 0
loc 3
rs 10
1
<?php declare(strict_types = 1);
2
3
namespace Suilven\PHPTravisEnhancer;
4
5
use Suilven\PHPTravisEnhancer\Abstraction\TaskBase;
6
use Suilven\PHPTravisEnhancer\IFace\Task;
7
8
class AddPHPCSTask extends TaskBase implements Task
9
{
10
    /** @return string bash variable for use in Travis script */
11
    public function getFlag(): string
12
    {
13
        return 'PHPCS_TEST';
14
    }
15
16
17
    public function getBeforeScript(): ?string
18
    {
19
        return null;
20
    }
21
22
23
    public function getScript(): ?string
24
    {
25
        return 'vendor/bin/phpcs --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests';
26
    }
27
28
    // @todo Copy the ruleset.xml file
29
}
30