Passed
Push — master ( c82e63...6167b2 )
by Gordon
03:52 queued 02:00
created

AddPHPStanTask   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFlag() 0 3 1
A getScript() 0 3 1
A getBeforeScript() 0 3 1
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 AddPHPStanTask extends TaskBase implements Task
9
{
10
    /** @return string bash variable for use in Travis script */
11
    public function getFlag(): string
12
    {
13
        return 'PHPSTAN_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/phpstan analyse --level=6 -c tests/phpstan.neon src/;';
26
    }
27
28
    // @todo Copy the phpstan.neon config file
29
}
30