1
0
Fork 0
mirror of https://github.com/archtechx/enums.git synced 2025-12-13 03:34:05 +00:00

Static analysis

This commit is contained in:
Samuel Štancl 2022-03-29 20:34:54 +02:00
parent 55478c4eb7
commit 7e17b84451
3 changed files with 7 additions and 4 deletions

View file

@ -9,7 +9,7 @@ use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
class Meta
{
/** @var MetaProperty[] */
/** @var string[]|class-string<MetaProperty>[] */
public array $metaProperties;
public function __construct(array|string ...$metaProperties)

View file

@ -27,7 +27,10 @@ class Reflection
));
if ($attributes) {
return $attributes[0]->newInstance()->metaProperties;
/** @var Meta $meta */
$meta = $attributes[0]->newInstance();
return $meta->metaProperties;
}
return [];