Code Duplication    Length = 12-12 lines in 2 locations

src/Module/AbstractModule.php 2 locations

@@ 83-94 (lines=12) @@
80
     *
81
     * @return \Symfony\Component\Routing\RouteCollection
82
     */
83
    protected function loadSymfonyRoutes($path)
84
    {
85
        if ($this->routes === null) {
86
            $loader = new YamlFileLoader(new FileLocator(array(dirname($path))));
87
            $loader->setDefaults(array('_module' => $this->getName()));
88
89
            $routesCollection = $loader->load(pathinfo($path, PATHINFO_FILENAME) . '.' . pathinfo($path, PATHINFO_EXTENSION));
90
            $this->routes     = $routesCollection;
91
        }
92
93
        return $this->routes;
94
    }
95
96
    /**
97
     * Load up our routes.
@@ 103-114 (lines=12) @@
100
     * @param string $path
101
     * @return \Symfony\Component\Routing\RouteCollection
102
     */
103
    protected function loadYamlRoutes($path)
104
    {
105
        if ($this->routes === null) {
106
            $loader = new YamlFileLoader(new FileLocator(array(dirname($path))));
107
            $loader->setDefaults(array('_module' => $this->getName()));
108
109
            $routesCollection = $loader->load(pathinfo($path, PATHINFO_FILENAME) . '.' . pathinfo($path, PATHINFO_EXTENSION));
110
            $this->routes     = $routesCollection;
111
        }
112
113
        return $this->routes;
114
    }
115
116
    /**
117
     * @param string $path