Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

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