Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 6573-6586 (lines=14) @@
6570
        $reflector = new \ReflectionClass($this);
6571
        $factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
6572
        $docComment = $reflector->getDocComment();
6573
        if ($docComment) {
6574
            $docblock = $factory->create($docComment);
6575
            /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */
6576
            foreach ($docblock->getTagsByName('property') as $tag) {
6577
                $typeName = $tag->getVariableName();
6578
                /** @var string|null $typeName */
6579
                if ($typeName !== null) {
6580
                    $typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName);
6581
                    if ($typeCheckPhpDoc !== null) {
6582
                        $properties[$typeName] = $typeCheckPhpDoc;
6583
                    }
6584
                }
6585
            }
6586
        }
6587
6588
        /** @noinspection PhpAssignmentInConditionInspection */
6589
        while ($reflector = $reflector->getParentClass()) {
@@ 6591-6604 (lines=14) @@
6588
        /** @noinspection PhpAssignmentInConditionInspection */
6589
        while ($reflector = $reflector->getParentClass()) {
6590
            $docComment = $reflector->getDocComment();
6591
            if ($docComment) {
6592
                $docblock = $factory->create($docComment);
6593
                /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */
6594
                foreach ($docblock->getTagsByName('property') as $tag) {
6595
                    $typeName = $tag->getVariableName();
6596
                    /** @var string|null $typeName */
6597
                    if ($typeName !== null) {
6598
                        $typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName);
6599
                        if ($typeCheckPhpDoc !== null) {
6600
                            $properties[$typeName] = $typeCheckPhpDoc;
6601
                        }
6602
                    }
6603
                }
6604
            }
6605
        }
6606
6607
        return $PROPERTY_CACHE[$cacheKey] = $properties;