Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 299 Bytes

InvalidAttribute.md

File metadata and controls

16 lines (12 loc) · 299 Bytes

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 {}