1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
psalm/docs/running_psalm/issues/InvalidAttribute.md
2020-10-30 13:28:45 -04:00

299 B

InvalidAttribute

Emitted when using an attribute on an element that doesn't match the attribute's target

<?php
namespace Foo;

#[\Attribute(\Attribute::TARGET_CLASS)]
class Table {
    public function __construct(public string $name) {}
}

#[Table("videos")]
function foo() : void {}