Code Duplication    Length = 8-8 lines in 2 locations

src/ArrayyMeta.php 2 locations

@@ 41-48 (lines=8) @@
38
        $reflector = new \ReflectionClass($className);
39
        $factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
40
        $docComment = $reflector->getDocComment();
41
        if ($docComment) {
42
            $docblock = $factory->create($docComment);
43
            /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */
44
            foreach ($docblock->getTagsByName('property') as $tag) {
45
                $PropertyName = $tag->getVariableName();
46
                $this->{$PropertyName} = $PropertyName;
47
            }
48
        }
49
50
        /** @noinspection PhpAssignmentInConditionInspection */
51
        while ($reflector = $reflector->getParentClass()) {
@@ 53-60 (lines=8) @@
50
        /** @noinspection PhpAssignmentInConditionInspection */
51
        while ($reflector = $reflector->getParentClass()) {
52
            $docComment = $reflector->getDocComment();
53
            if ($docComment) {
54
                $docblock = $factory->create($docComment);
55
                /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */
56
                foreach ($docblock->getTagsByName('property') as $tag) {
57
                    $PropertyName = $tag->getVariableName();
58
                    $this->{$PropertyName} = $PropertyName;
59
                }
60
            }
61
        }
62
63
        $STATIC_CACHE[$cacheKey] = $this;