Code Duplication    Length = 12-12 lines in 2 locations

src/Parser/BSDTarOutputParser.php 1 location

@@ 46-57 (lines=12) @@
43
44
            // drw-rw-r--  0 toto titi     0 Jan  3  1980 practice/
45
            // -rw-rw-r--  0 toto titi     10240 Jan 22 13:31 practice/records
46
            if (!preg_match_all("#" .
47
                self::PERMISSIONS . "\s+" . // match (drw-r--r--)
48
                self::HARD_LINK . "\s+" . // match (1)
49
                self::OWNER . "\s" . // match (toto)
50
                self::GROUP . "\s+" . // match (titi)
51
                self::FILESIZE . "\s+" . // match (0)
52
                self::DATE . "\s+" . // match (Jan  3  1980)
53
                self::FILENAME . // match (practice)
54
                "#", $line, $matches, PREG_SET_ORDER
55
            )) {
56
                continue;
57
            }
58
59
            $chunks = array_shift($matches);
60

src/Parser/GNUTarOutputParser.php 1 location

@@ 39-50 (lines=12) @@
36
            $matches = array();
37
38
            // -rw-r--r-- gray/staff    62373 2006-06-09 12:06 apple
39
            if (!preg_match_all("#".
40
                self::PERMISSIONS       . "\s+" . // match (-rw-r--r--)
41
                self::OWNER             . "/"   . // match (gray)
42
                self::GROUP             . "\s+" . // match (staff)
43
                self::FILESIZE          . "\s+" . // match (62373)
44
                self::ISO_DATE          . "\s+" . // match (2006-06-09 12:06)
45
                self::FILENAME          .         // match (apple)
46
                "#",
47
                $line, $matches, PREG_SET_ORDER
48
            )) {
49
                continue;
50
            }
51
52
            $chunks = array_shift($matches);
53