Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

@@ 485-494 (lines=10) @@
482
         * Iterate all properties and create internal scope reflection class instance if
483
         * at least one property in not public
484
         */
485
        foreach ($propertiesMetadata as $propertyMetadata) {
486
            if (!$propertyMetadata->isPublic) {
487
                $this->generator
488
                    ->comment('Create reflection class for injecting private/protected properties and methods')
489
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
490
                    ->newLine();
491
492
                return true;
493
            }
494
        }
495
496
        /**
497
         * Iterate all properties and create internal scope reflection class instance if
@@ 500-509 (lines=10) @@
497
         * Iterate all properties and create internal scope reflection class instance if
498
         * at least one property in not public
499
         */
500
        foreach ($methodsMetadata as $methodMetadata) {
501
            if (!$methodMetadata->isPublic) {
502
                $this->generator
503
                    ->comment('Create reflection class for injecting private/protected properties and methods')
504
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
505
                    ->newLine();
506
507
                return true;
508
            }
509
        }
510
511
        return false;
512
    }