Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
15 | final class AttributeDocBlock |
||
16 | { |
||
17 | private const VAR_EXPRESSION = '/@var\s*([\w]+(\[\])?)/'; |
||
18 | |||
19 | private TypeDeclaration $attributeType; |
||
20 | |||
21 | 69 | public function __construct(?string $comment) |
|
22 | { |
||
23 | 69 | $this->extractType($comment); |
|
24 | } |
||
25 | |||
26 | 69 | public function attributeType(): TypeDeclaration |
|
29 | 69 | } |
|
30 | 66 | ||
31 | public function hasAttributeType(): bool |
||
32 | 69 | { |
|
33 | return $this->attributeType->isPresent(); |
||
34 | } |
||
35 | |||
36 | private function extractType(?string $comment): void |
||
43 | } |
||
44 | } |
||
45 |