Code Duplication    Length = 15-15 lines in 2 locations

src/DependencyInjection/NeonFileLoader.php 2 locations

@@ 280-294 (lines=15) @@
277
            $definition = new Definition();
278
        }
279
280
        if (isset($service['class'])) {
281
            $class = $service['class'];
282
283
            // nette
284
            if ($class instanceof Entity) {
285
                if (isset($service['arguments']) && !empty($class->attributes)) {
286
                    throw new InvalidArgumentException(sprintf('Duplicated definition of arguments for service "%s" in "%s". Check you NEON syntax.', $id, $file));
287
                }
288
289
                $service['arguments'] = $class->attributes;
290
                $class = $class->value;
291
            }
292
293
            $definition->setClass($class);
294
        }
295
296
        if (isset($service['shared'])) {
297
            $definition->setShared($service['shared']);
@@ 320-334 (lines=15) @@
317
            $definition->setDeprecated(true, $service['deprecated']);
318
        }
319
320
        if (isset($service['factory'])) {
321
            $factory = $service['factory'];
322
323
            //nette
324
            if ($factory instanceof Entity) {
325
                if (isset($service['arguments']) && !empty($factory->attributes)) {
326
                    throw new InvalidArgumentException(sprintf('Duplicated definition of arguments for service "%s" in "%s". Check you NEON syntax.', $id, $file));
327
                }
328
329
                $service['arguments'] = $factory->attributes;
330
                $factory = $factory->value;
331
            }
332
333
            $definition->setFactory($this->parseFactory($factory, $file));
334
        }
335
336
        if (isset($service['file'])) {
337
            $definition->setFile($service['file']);