Code Duplication    Length = 10-10 lines in 2 locations

src/Builder.php 2 locations

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