mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
17 lines
299 B
Markdown
17 lines
299 B
Markdown
# InvalidAttribute
|
|
|
|
Emitted when using an attribute on an element that doesn't match the attribute's target
|
|
|
|
```php
|
|
<?php
|
|
namespace Foo;
|
|
|
|
#[\Attribute(\Attribute::TARGET_CLASS)]
|
|
class Table {
|
|
public function __construct(public string $name) {}
|
|
}
|
|
|
|
#[Table("videos")]
|
|
function foo() : void {}
|
|
```
|