Code Duplication    Length = 9-10 lines in 2 locations

Src/Router/Loaders/FileLoader.php 1 location

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

Src/Router/Loaders/YamlLoader.php 1 location

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