Skip to content

Commit b11617d

Browse files
committed
Add TypedTag value object
1 parent 933340c commit b11617d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: src/Tag/TypedTag.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace TypeLang\PHPDoc\Tag;
6+
7+
use TypeLang\Parser\Node\Stmt\TypeStatement;
8+
9+
/**
10+
* Requires a `type-lang/parser` dependency for {@see TypeStatement} support.
11+
*/
12+
abstract class TypedTag extends Tag
13+
{
14+
/**
15+
* @param non-empty-string $name
16+
*/
17+
public function __construct(
18+
string $name,
19+
public readonly TypeStatement $type,
20+
\Stringable|string|null $description = null,
21+
) {
22+
parent::__construct($name, $description);
23+
}
24+
}

0 commit comments

Comments
 (0)