Code Duplication    Length = 11-12 lines in 3 locations

src/ErrorReporters/ErrorPrinter.php 3 locations

@@ 60-70 (lines=11) @@
57
        $this->simplePendError($msg, $absPath, $lineNumber, 'routelessCtrl', 'No route is defined for controller action:');
58
    }
59
60
    public function simplePendError($yellowText, $absPath, $lineNumber, $key, $header, $rest = '', $pre = '')
61
    {
62
        if (LaravelPaths::isIgnored($absPath)) {
63
            return;
64
        }
65
66
        ($this->errorsList[$key][] = (new PendingError($key))
67
            ->header($header)
68
            ->errorData($pre.$this->yellow($yellowText). $rest)
69
            ->link($absPath, $lineNumber));
70
    }
71
72
    public function wrongImport($absPath, $class, $lineNumber)
73
    {
@@ 77-87 (lines=11) @@
74
        $this->doesNotExist("use $class;", $absPath, $lineNumber, 'wrongImport', 'Wrong import:');
75
    }
76
77
    public function compactError($path, $lineNumber, $absent, $key, $header)
78
    {
79
        if (LaravelPaths::isIgnored($path)) {
80
            return;
81
        }
82
83
        ($this->errorsList[$key][] = (new PendingError($key))
84
            ->header($header)
85
            ->errorData($this->yellow(\implode(', ', array_keys($absent))).' does not exist')
86
            ->link($path, $lineNumber));
87
    }
88
89
    public function routeDefinitionConflict($route1, $route2, $info)
90
    {
@@ 131-142 (lines=12) @@
128
        $this->doesNotExist($class, $absPath, $lineNumber, 'wrongUsedClassError', 'Class does not exist:');
129
    }
130
131
    public function queryInBlade($absPath, $class, $lineNumber)
132
    {
133
        if (LaravelPaths::isIgnored($absPath)) {
134
            return;
135
        }
136
137
        $key = 'queryInBlade';
138
        ($this->errorsList[$key][] = (new PendingError($key))
139
            ->header('Query in blade file: ')
140
            ->errorData($this->yellow($class).'  <=== DB query in blade file')
141
            ->link($absPath, $lineNumber));
142
    }
143
144
    public function wrongMethodError($absPath, $class, $lineNumber)
145
    {