| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| 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 | public function __construct(?string $comment) |
||
| 22 | { |
||
| 23 | $this->extractType($comment); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function attributeType(): TypeDeclaration |
||
| 29 | } |
||
| 30 | |||
| 31 | public function hasAttributeType(): bool |
||
| 32 | { |
||
| 33 | return $this->attributeType->isPresent(); |
||
| 34 | } |
||
| 35 | |||
| 36 | private function extractType(?string $comment): void |
||
| 43 | } |
||
| 44 | } |
||
| 45 |