Code Duplication    Length = 11-11 lines in 2 locations

src/Oro/Component/Config/Loader/FolderContentCumulativeLoader.php 2 locations

@@ 275-285 (lines=11) @@
272
        if (is_dir($bundleAppDir)) {
273
            $dir      = $this->getResourcesDirectoryAbsolutePath($bundleAppDir);
274
            $realPath = realpath($dir);
275
            if (is_dir($realPath)) {
276
                $currentContents = $this->getDirectoryContentsArray($realPath);
277
278
                foreach ($currentContents as $filename) {
279
                    if (!$resource->isFound($bundleClass, $filename)) {
280
                        return false;
281
                    }
282
283
                    unset($registeredFiles[$filename]);
284
                }
285
            }
286
        }
287
288
        // Check and remove data from $bundleDir resources directory
@@ 291-301 (lines=11) @@
288
        // Check and remove data from $bundleDir resources directory
289
        $dir      = $this->getDirectoryAbsolutePath($bundleDir);
290
        $realPath = realpath($dir);
291
        if (is_dir($realPath)) {
292
            $currentContents = $this->getDirectoryContentsArray($realPath);
293
294
            foreach ($currentContents as $filename) {
295
                if (!$resource->isFound($bundleClass, $filename)) {
296
                    return false;
297
                }
298
299
                unset($registeredFiles[$filename]);
300
            }
301
        }
302
303
        // case when entire dir was removed or some file was removed
304
        if (!empty($registeredFiles)) {