Code Duplication    Length = 12-12 lines in 2 locations

src/Eole/Silex/Application.php 1 location

@@ 250-261 (lines=12) @@
247
    /**
248
     * Load Eole and games services.
249
     */
250
    private function loadAllServices()
251
    {
252
        foreach ($this['environment']['mods'] as $modName => $modConfig) {
253
            $modClass = $modConfig['provider'];
254
            $mod = new $modClass();
255
            $provider = $mod->createServiceProvider();
256
257
            if ($provider instanceof \Pimple\ServiceProviderInterface) {
258
                $this->register($provider);
259
            }
260
        }
261
    }
262
263
    /**
264
     * Get all GameProviders which are in environment.

src/Eole/Websocket/Application.php 1 location

@@ 22-33 (lines=12) @@
19
    /**
20
     * Register Eole and games websocket topics.
21
     */
22
    private function loadAllWebsocketTopics()
23
    {
24
        foreach ($this['environment']['mods'] as $modName => $modConfig) {
25
            $modClass = $modConfig['provider'];
26
            $mod = new $modClass();
27
            $provider = $mod->createWebsocketProvider();
28
29
            if ($provider instanceof \Pimple\ServiceProviderInterface) {
30
                $this->register($provider);
31
            }
32
        }
33
    }
34
}
35