Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

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