Code Duplication    Length = 7-8 lines in 2 locations

src/MageDownload/Command/DownloadCommand.php 1 location

@@ 75-81 (lines=7) @@
72
                $headers[] = trim($value);
73
            }
74
            $rows = array();
75
            foreach (explode("\n", $bits[1]) as $row) {
76
                if (empty($row)) {
77
                    continue;
78
                }
79
                $row = preg_split('/ {2,}/', $row);
80
                $rows[] = array_combine($headers, $row);
81
            }
82
            $this->downloads = $rows;
83
84
            $dialog = $this->getHelper('dialog');

src/MageDownload/Command/FilesCommand.php 1 location

@@ 146-153 (lines=8) @@
143
        }
144
        unset($headers[0]);
145
        $rows = array();
146
        foreach (explode("\n", $bits[1]) as $row) {
147
            if (empty($row)) {
148
                continue;
149
            }
150
            $row = preg_split('/ {2,}/', $row);
151
            unset($row[0]);
152
            $rows[] = $row;
153
        }
154
        usort($rows, array($this, 'sortFiles'));
155
        $this->out(array(array(
156
            'type' => 'table',