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

Plugin   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 41
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setConfig() 0 6 1
A setAttributes() 0 6 1
A setFilesystem() 0 6 1
A setUseSortFixer() 0 7 1
process() 0 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