Code Duplication    Length = 8-11 lines in 2 locations

src/Bundle/ResourceBundle/DependencyInjection/Extension/ResourceExtension.php 2 locations

@@ 240-247 (lines=8) @@
237
     *
238
     * @return Definition
239
     */
240
    private function createRepositoryDefinition(ResourceInterface $resource)
241
    {
242
        $definition = new Definition($resource->getRepository(), [$resource->getModel()]);
243
        $definition->setFactory([new Reference('lug.manager.'.$resource->getName()), 'getRepository']);
244
        $definition->addTag('lug.repository', ['resource' => $resource->getName()]);
245
246
        return $definition;
247
    }
248
249
    /**
250
     * @param ResourceInterface $resource
@@ 287-297 (lines=11) @@
284
     *
285
     * @return Definition
286
     */
287
    private function createControllerDefinition(ResourceInterface $resource)
288
    {
289
        $definition = new Definition($resource->getController(), [
290
            new Reference('lug.resource.'.$resource->getName()),
291
        ]);
292
293
        $definition->addMethodCall('setContainer', [new Reference('service_container')]);
294
        $definition->addTag('lug.controller', ['resource' => $resource->getName()]);
295
296
        return $definition;
297
    }
298
299
    /**
300
     * @param ResourceInterface $resource