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