Code Duplication    Length = 11-12 lines in 2 locations

src/Console/Language/JsonLanguage.php 2 locations

@@ 23-34 (lines=12) @@
20
    /**
21
     * @return array
22
     */
23
    public function tokens(): array
24
    {
25
        return [
26
            'T_STRING'  => '"[^"\\\\]*(\\\\.[^"\\\\]*)*"(?!:)',
27
            'T_KEY'     => '"[^"\\\\]*(\\\\.[^"\\\\]*)*"',
28
            'T_DIGIT'   => '(\d*\.)?\d+',
29
            'T_COMMA'   => ',',
30
            'T_ARR'     => '\[\]',
31
            'T_KEYWORD' => 'null|false|true',
32
            'T_PAIR'    => '[{:}]',
33
        ];
34
    }
35
36
    /**
37
     * @return array
@@ 39-49 (lines=11) @@
36
    /**
37
     * @return array
38
     */
39
    public function colors(): array
40
    {
41
        return [
42
            'T_KEY'     => 'fg=green',
43
            'T_STRING'  => 'fg=yellow',
44
            'T_COMMA'   => 'fg=blue',
45
            'T_KEYWORD' => 'fg=yellow',
46
            'T_ARR'     => 'fg=yellow',
47
            'T_PAIR'    => 'fg=blue;options=bold',
48
        ];
49
    }
50
51
    /**
52
     * @param Readable $file