Code Duplication    Length = 7-7 lines in 2 locations

src/Hal/Application/Config/Parser.php 2 locations

@@ 20-26 (lines=7) @@
17
        }
18
19
        // arguments with options
20
        foreach ($argv as $k => $arg) {
21
            if (preg_match('!\-\-([\w\-]+)=(.*)!', $arg, $matches)) {
22
                list(, $parameter, $value) = $matches;
23
                $config->set($parameter, trim($value, ' "\''));
24
                unset($argv[$k]);
25
            }
26
        }
27
28
        // arguments without options
29
        foreach ($argv as $k => $arg) {
@@ 29-35 (lines=7) @@
26
        }
27
28
        // arguments without options
29
        foreach ($argv as $k => $arg) {
30
            if (preg_match('!\-\-([\w\-]+)$!', $arg, $matches)) {
31
                list(, $parameter) = $matches;
32
                $config->set($parameter, true);
33
                unset($argv[$k]);
34
            }
35
        }
36
37
        // last argument
38
        $files = array_pop($argv);