Code Duplication    Length = 9-9 lines in 2 locations

src/ServiceProvider/DoctrineDbalServiceProvider.php 1 location

@@ 217-225 (lines=9) @@
214
     *
215
     * @return Cache
216
     */
217
    private function getCache(Container $container, $cacheDefinition): Cache
218
    {
219
        $cacheType = $cacheDefinition['type'];
220
        $cacheOptions = $cacheDefinition['options'] ?? [];
221
222
        $cacheFactory = $container[sprintf('doctrine.dbal.db.cache_factory.%s', $cacheType)];
223
224
        return $cacheFactory($cacheOptions);
225
    }
226
227
    /**
228
     * @param Container $container

src/ServiceProvider/DoctrineOrmServiceProvider.php 1 location

@@ 231-239 (lines=9) @@
228
     *
229
     * @return Cache
230
     */
231
    private function getCache(Container $container, $cacheDefinition): Cache
232
    {
233
        $cacheType = $cacheDefinition['type'];
234
        $cacheOptions = $cacheDefinition['options'] ?? [];
235
236
        $cacheFactory = $container[sprintf('doctrine.dbal.db.cache_factory.%s', $cacheType)];
237
238
        return $cacheFactory($cacheOptions);
239
    }
240
241
    /**
242
     * @param Container     $container