Code Duplication    Length = 15-15 lines in 2 locations

src/DependencyInjection/NeonFileLoader.php 2 locations

@@ 274-288 (lines=15) @@
271
            $definition = new Definition();
272
        }
273
274
        if (isset($service['class'])) {
275
            $class = $service['class'];
276
277
            // nette
278
            if ($class instanceof Entity) {
279
                if (isset($service['arguments']) && !empty($class->attributes)) {
280
                    throw new InvalidArgumentException(sprintf('Duplicated definition of arguments for service "%s" in "%s". Check you NEON syntax.', $id, $file));
281
                }
282
283
                $service['arguments'] = $class->attributes;
284
                $class = $class->value;
285
            }
286
287
            $definition->setClass($class);
288
        }
289
290
        if (isset($service['shared'])) {
291
            $definition->setShared($service['shared']);
@@ 314-328 (lines=15) @@
311
            $definition->setDeprecated(true, $service['deprecated']);
312
        }
313
314
        if (isset($service['factory'])) {
315
            $factory = $service['factory'];
316
317
            //nette
318
            if ($factory instanceof Entity) {
319
                if (isset($service['arguments']) && !empty($factory->attributes)) {
320
                    throw new InvalidArgumentException(sprintf('Duplicated definition of arguments for service "%s" in "%s". Check you NEON syntax.', $id, $file));
321
                }
322
323
                $service['arguments'] = $factory->attributes;
324
                $factory = $factory->value;
325
            }
326
327
            $definition->setFactory($this->parseFactory($factory));
328
        }
329
330
        if (isset($service['file'])) {
331
            $definition->setFile($service['file']);