Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Cache/Providers/Filesystem.php 2 locations

@@ 118-130 (lines=13) @@
115
116
        }
117
118
        foreach ( $filesList as $file ) {
119
120
            if ( unlink($file) === false ) {
121
122
                $this->logger->error("Failed to unlink cache file $file, exiting gracefully", pathinfo($file));
123
124
                $this->setErrorState("Failed to unlink cache file $file");
125
126
                $return = false;
127
128
            }
129
130
        }
131
132
        return $return;
133
@@ 149-161 (lines=13) @@
146
147
        $filesList = glob($this->cache_folder."*.{cache,expire}", GLOB_BRACE);
148
149
        foreach ( $filesList as $file ) {
150
151
            if ( unlink($file) === false ) {
152
153
                $this->logger->error("Failed to unlink cache file $file, exiting gracefully", pathinfo($file));
154
155
                $this->setErrorState("Failed to unlink cache file $file");
156
157
                $return = false;
158
159
            }
160
161
        }
162
163
        return $return;
164