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

Class and composed trait facts; inherited members remain on the named parent. Doc comments are raw source text for integrations that read annotations; Deriver never interprets them.

Inspecting captured class identitydoctest
(new \Deriver\Deriver\Evaluator\Declaration\ClassMetadata("User"))->name // => "User"

Properties§

public string $name
public string $parent = ''
public list<string> $interfaces = []
public list<string> $traits = []
public array<string, string> $methods = []
public array<string, PropertyMetadata> $properties = []
public array<string, Term> $constants = []
public bool $final = false
public bool $abstract = false
public bool $interface = false
public bool $enum = false
public string $docComment = ''
public array<string, string> $constantDocComments = []

Methods§

public function __construct(
    public string $name,
    public string $parent = '',
    public list<string> $interfaces = [],
    public list<string> $traits = [],
    public array<string, string> $methods = [],
    public array<string, PropertyMetadata> $properties = [],
    public array<string, Term> $constants = [],
    public bool $final = false,
    public bool $abstract = false,
    public bool $interface = false,
    public bool $enum = false,
    public string $docComment = '',
    public array<string, string> $constantDocComments = [],
)

Parameters

$namestringDeclaration spelling
$parentstringParent class, or an empty string
$interfaceslist<string>Declared interfaces
$traitslist<string>Direct trait uses
$methodsarray<string, string>Lowercase method names mapped to implementation identities
$propertiesarray<string, PropertyMetadata>Declared and composed properties
$constantsarray<string, Term>Captured constant values; unresolved initializers stay explicit
$finalboolWhether subclasses are forbidden
$abstractboolWhether the class is abstract
$interfaceboolWhether this is an interface
$enumboolWhether this is an enum
$docCommentstringRaw class doc comment, or an empty string
$constantDocCommentsarray<string, string>Raw doc comment of each declared constant and enum case, or an empty string

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 2