Code Duplication    Length = 8-8 lines in 2 locations

src/Gaufrette/Adapter/PhpseclibSftp.php 1 location

@@ 123-130 (lines=8) @@
120
        }
121
122
        $filteredKeys = array();
123
        foreach (array('keys', 'dirs') as $hash) {
124
            $filteredKeys[$hash] = array();
125
            foreach ($keys[$hash] as $key) {
126
                if (0 === strpos($key, $prefix)) {
127
                    $filteredKeys[$hash][] = $key;
128
                }
129
            }
130
        }
131
132
        return $filteredKeys;
133
    }

src/Gaufrette/Adapter/Ftp.php 1 location

@@ 169-176 (lines=8) @@
166
        }
167
168
        $filteredKeys = array();
169
        foreach (array('keys', 'dirs') as $hash) {
170
            $filteredKeys[$hash] = array();
171
            foreach ($keys[$hash] as $key) {
172
                if (0 === strpos($key, $prefix)) {
173
                    $filteredKeys[$hash][] = $key;
174
                }
175
            }
176
        }
177
178
        return $filteredKeys;
179
    }