final class PropertyDeclaration
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

A property slot with its declaration scope and initialization expression.

Properties§

public string $name
public string $className
public string $type = 'mixed'
public Visibility $visibility = Visibility::Public
public bool $static = false
public CallableGraph|null $default = null
public bool $readonly = false
public string $docComment = ''
public CallableGraph|null $get = null
public CallableGraph|null $set = null

Methods§

public function __construct(
    public string $name,
    public string $className,
    public string $type = 'mixed',
    public Visibility $visibility = Visibility::Public,
    public bool $static = false,
    public CallableGraph|null $default = null,
    public bool $readonly = false,
    public string $docComment = '',
    public CallableGraph|null $get = null,
    public CallableGraph|null $set = null,
)

Parameters

$namestringname
$classNamestringclassName
$typestringtype
$visibilityVisibilityvisibility
$staticboolstatic
$defaultCallableGraph|nulldefault
$readonlyboolWhether reassignment is forbidden
$docCommentstringRaw declaration doc comment, or an empty string
$getCallableGraph|nullGetter body
$setCallableGraph|nullSetter body
Calls 1

Test cases 67§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 66

Relations§

Instantiated in 9
Type declarations 13