Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

@@ 419-428 (lines=10) @@
416
         * Iterate all properties and create internal scope reflection class instance if
417
         * at least one property in not public
418
         */
419
        foreach ($propertiesMetadata as $propertyMetadata) {
420
            if (!$propertyMetadata->isPublic) {
421
                $this->generator
422
                    ->comment('Create reflection class for injecting private/protected properties and methods')
423
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
424
                    ->newLine();
425
426
                return true;
427
            }
428
        }
429
430
        /**
431
         * Iterate all properties and create internal scope reflection class instance if
@@ 434-443 (lines=10) @@
431
         * Iterate all properties and create internal scope reflection class instance if
432
         * at least one property in not public
433
         */
434
        foreach ($methodsMetadata as $methodMetadata) {
435
            if (!$methodMetadata->isPublic) {
436
                $this->generator
437
                    ->comment('Create reflection class for injecting private/protected properties and methods')
438
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
439
                    ->newLine();
440
441
                return true;
442
            }
443
        }
444
445
        return false;
446
    }