diff --git a/src/polyfill.php b/src/polyfill.php index 480310d4..2d216c7b 100644 --- a/src/polyfill.php +++ b/src/polyfill.php @@ -42,77 +42,3 @@ class NamedArgumentConstructor } } } - -namespace { - use JetBrains\PhpStorm\ExpectedValues; - - if (!\class_exists(Attribute::class, false)) { - #[Attribute(Attribute::TARGET_CLASS)] - final class Attribute - { - /** - * Marks that attribute declaration is allowed only in classes. - * - * @var Attribute::TARGET_* - */ - public const TARGET_CLASS = 0b00000001; - - /** - * Marks that attribute declaration is allowed only in functions. - * - * @var Attribute::TARGET_* - */ - public const TARGET_FUNCTION = 0b00000010; - - /** - * Marks that attribute declaration is allowed only in class methods. - * - * @var Attribute::TARGET_* - */ - public const TARGET_METHOD = 0b00000100; - - /** - * Marks that attribute declaration is allowed only in class properties. - * - * @var Attribute::TARGET_* - */ - public const TARGET_PROPERTY = 0b00001000; - - /** - * Marks that attribute declaration is allowed only in class constants. - * - * @var Attribute::TARGET_* - */ - public const TARGET_CLASS_CONSTANT = 0b00010000; - - /** - * Marks that attribute declaration is allowed only in function or method parameters. - * - * @var Attribute::TARGET_* - */ - public const TARGET_PARAMETER = 0b00010000; - - /** - * Marks that attribute declaration is allowed anywhere. - * - * @var int-mask-of - */ - public const TARGET_ALL = self::TARGET_CLASS - | self::TARGET_FUNCTION - | self::TARGET_METHOD - | self::TARGET_PROPERTY - | self::TARGET_PARAMETER - ; - - /** - * Notes that an attribute declaration in the same place is allowed multiple times. - */ - public const IS_REPEATABLE = 0b00100000; - - /** - * @var int-mask-of - */ - public $flags; - } - } -}