Code Duplication    Length = 10-12 lines in 2 locations

src/ContainerBuilder.php 2 locations

@@ 463-474 (lines=12) @@
460
         * Iterate all properties and create internal scope reflection class instance if
461
         * at least one property in not public
462
         */
463
        foreach ($propertiesMetadata as $propertyMetadata) {
464
            if (!$propertyMetadata->isPublic) {
465
                $this->generator
466
                    ->comment('Create reflection class for injecting private/protected properties and methods')
467
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
468
                    ->newLine();
469
470
                $reflectionClassCreated = true;
471
472
                break;
473
            }
474
        }
475
476
        /**
477
         * Iterate all properties and create internal scope reflection class instance if
@@ 481-490 (lines=10) @@
478
         * at least one property in not public
479
         */
480
        if (!$reflectionClassCreated) {
481
            foreach ($methodsMetadata as $methodMetadata) {
482
                if (!$methodMetadata->isPublic) {
483
                    $this->generator
484
                        ->comment('Create reflection class for injecting private/protected properties and methods')
485
                        ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
486
                        ->newLine();
487
488
                    break;
489
                }
490
            }
491
        }
492
    }
493