Code Duplication    Length = 10-11 lines in 4 locations

src/ErrorReporters/ConsolePrinterInstaller.php 4 locations

@@ 55-65 (lines=11) @@
52
53
    public static function boot()
54
    {
55
        Event::listen(BladeFile::class, function (BladeFile $event) {
56
            $data = $event->data;
57
            $msg = 'The blade file is missing:';
58
59
            app(ErrorPrinter::class)->view(
60
                $data['absPath'],
61
                $msg,
62
                $data['lineNumber'],
63
                $data['name']
64
            );
65
        });
66
67
        Event::listen(ddFound::class, function (ddFound $event) {
68
            $data = $event->data;
@@ 67-76 (lines=10) @@
64
            );
65
        });
66
67
        Event::listen(ddFound::class, function (ddFound $event) {
68
            $data = $event->data;
69
            app(ErrorPrinter::class)->simplePendError(
70
                $data['name'],
71
                $data['absPath'],
72
                $data['lineNumber'],
73
                'ddFound',
74
                'Debug function found: '
75
            );
76
        });
77
78
        self::compactCall();
79
@@ 88-97 (lines=10) @@
85
            );
86
        });
87
88
        Event::listen(EnvFound::class, function (EnvFound $event) {
89
            $data = $event->data;
90
            app(ErrorPrinter::class)->simplePendError(
91
                $data['name'],
92
                $data['absPath'],
93
                $data['lineNumber'],
94
                'envFound',
95
                'env() function found: '
96
            );
97
        });
98
99
        Event::listen('microscope.finished.checks', function ($command) {
100
            self::finishCommand($command);
@@ 106-115 (lines=10) @@
103
104
    private static function compactCall()
105
    {
106
        Event::listen(CompactCall::class, function ($event) {
107
            $data = $event->data;
108
109
            app(ErrorPrinter::class)->compactError(
110
                $data['absPath'],
111
                $data['lineNumber'],
112
                $data['name'],
113
                'CompactCall',
114
                'compact() function call has problems man ! ');
115
        });
116
    }
117
118
    protected static function printErrorCount($lastTimeCount, $commandType, $errorCount)