Code Duplication    Length = 9-10 lines in 2 locations

Src/Router/Loaders/FileLoader.php 1 location

@@ 56-65 (lines=10) @@
53
    /**
54
     * @inheritdoc
55
     */
56
    public function loadFiles(array $files)
57
    {
58
        if (!$this->router->isCached()) {
59
            foreach ((array)$files as $filename) {
60
                $collection = $this->loadFile($filename);
61
                $this->router = $this->router->mergeCollection($collection);
62
            }
63
        }
64
        return $this->router;
65
    }
66
67
    /**
68
     * @inheritdoc

Src/Router/Loaders/YamlLoader.php 1 location

@@ 40-48 (lines=9) @@
37
    /**
38
     * @inheritdoc
39
     */
40
    public function loadFiles(array $files)
41
    {
42
        if (!$this->router->isCached()) {
43
            foreach ((array)$files as $filename) {
44
                $this->router = $this->router->mergeCollection($this->loadFile($filename));
45
            }
46
        }
47
        return $this->router;
48
    }
49
50
    /**
51
     * @inheritdoc