Documentation

Target
in package

Annotation that can be used to signal to the parser to check the annotation target during the parsing process.

Tags
Annotation

Table of Contents

TARGET_ALL  = 31
TARGET_ANNOTATION  = 8
TARGET_CLASS  = 1
TARGET_FUNCTION  = 16
TARGET_METHOD  = 2
TARGET_PROPERTY  = 4
$literal  : string
Literal target declaration.
$targets  : int
Targets as bitmask.
$value  : mixed
$map  : array<string, int>
__construct()  : mixed

Constants

TARGET_ALL

public mixed TARGET_ALL = 31

TARGET_ANNOTATION

public mixed TARGET_ANNOTATION = 8

TARGET_CLASS

public mixed TARGET_CLASS = 1

TARGET_FUNCTION

public mixed TARGET_FUNCTION = 16

TARGET_METHOD

public mixed TARGET_METHOD = 2

TARGET_PROPERTY

public mixed TARGET_PROPERTY = 4

Properties

$literal

Literal target declaration.

public string $literal

$targets

Targets as bitmask.

public int $targets

$value

public mixed $value
Tags
phpstan-var

list

$map

private static array<string, int> $map = ['ALL' => self::TARGET_ALL, 'CLASS' => self::TARGET_CLASS, 'METHOD' => self::TARGET_METHOD, 'PROPERTY' => self::TARGET_PROPERTY, 'FUNCTION' => self::TARGET_FUNCTION, 'ANNOTATION' => self::TARGET_ANNOTATION]

Methods

__construct()

public __construct(array<string|int, mixed> $values) : mixed
Parameters
$values : array<string|int, mixed>
Tags
throws
InvalidArgumentException
phpstan-param

array{value?: string|list} $values

Return values
mixed

Search results