Code Duplication    Length = 10-12 lines in 2 locations

src/Builder.php 2 locations

@@ 416-427 (lines=12) @@
413
         * Iterate all properties and create internal scope reflection class instance if
414
         * at least one property in not public
415
         */
416
        foreach ($propertiesMetadata as $propertyMetadata) {
417
            if (!$propertyMetadata->isPublic) {
418
                $this->generator
419
                    ->comment('Create reflection class for injecting private/protected properties and methods')
420
                    ->newLine($reflectionVariable . ' = new \ReflectionClass(\'' . $className . '\');')
421
                    ->newLine();
422
423
                $reflectionClassCreated = true;
424
425
                break;
426
            }
427
        }
428
429
        /**
430
         * Iterate all properties and create internal scope reflection class instance if
@@ 434-443 (lines=10) @@
431
         * at least one property in not public
432
         */
433
        if (!$reflectionClassCreated) {
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
                    break;
442
                }
443
            }
444
        }
445
    }
446