Completed
Push — master ( d6febc...001063 )
by recca
01:35
created

Plugin::setConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Recca0120\Generator\Plugins;
4
5
use Illuminate\Filesystem\Filesystem;
6
use Recca0120\Generator\Fixers\UseSortFixer;
7
8
abstract class Plugin
9
{
10
    protected $config = [];
11
12
    protected $attributes = [];
13
14
    protected $files;
15
16
    protected $useSortFixer;
17
18 2
    public function setConfig($config)
19
    {
20 2
        $this->config = $config;
21
22 2
        return $this;
23
    }
24
25 2
    public function setAttributes($attributes)
26
    {
27 2
        $this->attributes = $attributes;
28
29 2
        return $this;
30
    }
31
32 2
    public function setFilesystem(Filesystem $files)
33
    {
34 2
        $this->files = $files;
35
36 2
        return $this;
37
    }
38
39 2
    public function setUseSortFixer(UseSortFixer $useSortFixer)
40
    {
41 2
        $this->useSortFixer = $useSortFixer;
42 2
        $this->useSortFixer->setSortType(UseSortFixer::SORT_TYPE_LENGTH);
43
44 2
        return $this;
45
    }
46
47
    abstract public function process();
48
}
49