Code Duplication    Length = 14-14 lines in 2 locations

src/Reader/ReflectionReader.php 2 locations

@@ 61-74 (lines=14) @@
58
    /**
59
     * @return array|Collection[]
60
     */
61
    protected function readAnnotationsFromMethods() : array
62
    {
63
        $annotationsFromMethods = [];
64
        foreach ($this->reflectionClass->getMethods() as $method) {
65
            $methodCollection = $this->parseComment($method->getDocComment());
66
            if (empty($methodCollection)) {
67
                continue;
68
            }
69
70
            $annotationsFromMethods[$method->name] = new Collection(...$methodCollection);
71
        }
72
73
        return $annotationsFromMethods;
74
    }
75
76
    /**
77
     * @return array|Collection[]
@@ 79-92 (lines=14) @@
76
    /**
77
     * @return array|Collection[]
78
     */
79
    protected function readAnnotationsFromProperties() : array
80
    {
81
        $annotationsFromProperties = [];
82
        foreach ($this->reflectionClass->getProperties() as $property) {
83
            $propertyCollection = $this->parseComment($property->getDocComment());
84
            if (empty($propertyCollection)) {
85
                continue;
86
            }
87
88
            $annotationsFromProperties[$property->name] = new Collection(...$propertyCollection);
89
        }
90
91
        return $annotationsFromProperties;
92
    }
93
94
    /**
95
     * @param string|bool $comment