Code Duplication    Length = 11-12 lines in 4 locations

src/ErrorReporters/ErrorPrinter.php 4 locations

@@ 33-43 (lines=11) @@
30
        $this->simplePendError($msg, $absPath, $lineNumber, 'ns_replacement', $header);
31
    }
32
33
    public function route($path, $errorIt, $errorTxt, $absPath = null, $lineNumber = 0)
34
    {
35
        if (LaravelPaths::isIgnored($absPath)) {
36
            return;
37
        }
38
39
        ($this->errorsList['route'][] = (new PendingError('route'))
40
            ->header($errorIt)
41
            ->errorData($errorTxt.$this->yellow($path))
42
            ->link($absPath, $lineNumber));
43
    }
44
45
    public function authConf()
46
    {
@@ 67-77 (lines=11) @@
64
        $this->simplePendError($msg, $absPath, $lineNumber, 'routelessCtrl', 'No route is defined for controller action:');
65
    }
66
67
    public function simplePendError($yellowText, $absPath, $lineNumber, $key, $header, $rest = '')
68
    {
69
        if (LaravelPaths::isIgnored($absPath)) {
70
            return;
71
        }
72
73
        ($this->errorsList[$key][] = (new PendingError($key))
74
            ->header($header)
75
            ->errorData($this->yellow($yellowText). $rest)
76
            ->link($absPath, $lineNumber));
77
    }
78
79
    public function wrongImport($absPath, $class, $lineNumber)
80
    {
@@ 84-94 (lines=11) @@
81
        $this->doesNotExist("use $class;", $absPath, $lineNumber, 'wrongImport', 'Wrong import:');
82
    }
83
84
    public function compactError($path, $lineNumber, $absent, $key, $header)
85
    {
86
        if (LaravelPaths::isIgnored($path)) {
87
            return;
88
        }
89
90
        ($this->errorsList[$key][] = (new PendingError($key))
91
            ->header($header)
92
            ->errorData($this->yellow(\implode(', ', array_keys($absent))).' does not exist')
93
            ->link($path, $lineNumber));
94
    }
95
96
    public function routeDefinitionConflict($route1, $route2, $info)
97
    {
@@ 138-149 (lines=12) @@
135
        $this->doesNotExist($class, $absPath, $lineNumber, 'wrongUsedClassError', 'Class does not exist:');
136
    }
137
138
    public function queryInBlade($absPath, $class, $lineNumber)
139
    {
140
        if (LaravelPaths::isIgnored($absPath)) {
141
            return;
142
        }
143
144
        $key = 'queryInBlade';
145
        ($this->errorsList[$key][] = (new PendingError($key))
146
            ->header('Query in blade file: ')
147
            ->errorData($this->yellow($class).'  <=== DB query in blade file')
148
            ->link($absPath, $lineNumber));
149
    }
150
151
    public function wrongMethodError($absPath, $class, $lineNumber)
152
    {