Code Duplication    Length = 10-12 lines in 2 locations

src/ContainerBuilder.php 2 locations

@@ 449-460 (lines=12) @@
446
         * Iterate all properties and create internal scope reflection class instance if
447
         * at least one property in not public
448
         */
449
        foreach ($propertiesMetadata as $propertyMetadata) {
450
            if (!$propertyMetadata->isPublic) {
451
                $this->generator
452
                    ->comment('Create reflection class for injecting private/protected properties and methods')
453
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
454
                    ->newLine();
455
456
                $reflectionClassCreated = true;
457
458
                break;
459
            }
460
        }
461
462
        /**
463
         * Iterate all properties and create internal scope reflection class instance if
@@ 467-476 (lines=10) @@
464
         * at least one property in not public
465
         */
466
        if (!$reflectionClassCreated) {
467
            foreach ($methodsMetadata as $methodMetadata) {
468
                if (!$methodMetadata->isPublic) {
469
                    $this->generator
470
                        ->comment('Create reflection class for injecting private/protected properties and methods')
471
                        ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
472
                        ->newLine();
473
474
                    break;
475
                }
476
            }
477
        }
478
    }
479