Documentation

Union
in package
implements TypeNode uses ImmutableNonCloneableTrait, UnionTrait

FinalYes
Tags
psalm-immutable
psalm-type

TProperties=array{ from_docblock?: bool, from_calculation?: bool, from_property?: bool, from_static_property?: bool, initialized?: bool, initialized_class?: ?string, checked?: bool, failed_reconciliation?: bool, ignore_nullable_issues?: bool, ignore_falsable_issues?: bool, ignore_isset?: bool, possibly_undefined?: bool, possibly_undefined_from_try?: bool, explicit_never?: bool, had_template?: bool, from_template_default?: bool, by_ref?: bool, reference_free?: bool, allow_mutations?: bool, has_mutations?: bool, different?: bool, parent_nodes?: array<string, DataFlowNode> }

Table of Contents

Interfaces

TypeNode

Constants

PROPERTY_KEYS_FOR_UNSERIALIZE  = ["\x00" . self::class . "\x00" . 'types' => 'types', 'from_docblock' => 'from_docblock', 'from_calculation' => 'from_calculation', 'from_property' => 'from_property', 'from_static_property' => 'from_static_property', 'initialized' => 'initialized', 'initialized_class' => 'initialized_class', 'checked' => 'checked', 'failed_reconciliation' => 'failed_reconciliation', 'ignore_nullable_issues' => 'ignore_nullable_issues', 'ignore_falsable_issues' => 'ignore_falsable_issues', 'ignore_isset' => 'ignore_isset', 'possibly_undefined' => 'possibly_undefined', 'possibly_undefined_from_try' => 'possibly_undefined_from_try', 'explicit_never' => 'explicit_never', 'had_template' => 'had_template', 'from_template_default' => 'from_template_default', "\x00" . self::class . "\x00" . 'literal_string_types' => 'literal_string_types', "\x00" . self::class . "\x00" . 'typed_class_strings' => 'typed_class_strings', "\x00" . self::class . "\x00" . 'literal_int_types' => 'literal_int_types', "\x00" . self::class . "\x00" . 'literal_float_types' => 'literal_float_types', 'by_ref' => 'by_ref', 'reference_free' => 'reference_free', 'allow_mutations' => 'allow_mutations', 'has_mutations' => 'has_mutations', "\x00" . self::class . "\x00" . 'id' => 'id', "\x00" . self::class . "\x00" . 'exact_id' => 'exact_id', 'parent_nodes' => 'parent_nodes', 'propagate_parent_nodes' => 'propagate_parent_nodes', 'different' => 'different']

Properties

$allow_mutations  : bool
$by_ref  : bool
True if the type was passed or returned by reference, or if the type refers to an object's property or an item in an array. Note that this is not true for locally created references that don't refer to properties or array items (see Context::$references_in_scope).
$checked  : bool
Whether or not the type has been checked yet
$different  : bool
$explicit_never  : bool
whether this type had never set explicitly since it's the bottom type, it's combined into everything else and lost
$failed_reconciliation  : bool
$from_calculation  : bool
Whether the type originated from integer calculation
$from_docblock  : bool
Whether the type originated in a docblock
$from_property  : bool
Whether the type originated from a property
$from_static_property  : bool
Whether the type originated from *static* property
$from_template_default  : bool
Whether or not this union comes from a template "as" default
$had_template  : bool
Whether or not this union had a template, since replaced
$has_mutations  : bool
$ignore_falsable_issues  : bool
Whether or not to ignore issues with possibly-false values
$ignore_isset  : bool
Whether or not to ignore issues with isset on this type
$ignore_nullable_issues  : bool
Whether or not to ignore issues with possibly-null values
$initialized  : bool
Whether the property that this type has been derived from has been initialized in a constructor
$initialized_class  : string|null
Which class the type was initialised in
$parent_nodes  : array<string, DataFlowNode>
$possibly_undefined  : bool
Whether or not this variable is possibly undefined
$possibly_undefined_from_try  : bool
Whether or not this variable is possibly undefined
$propagate_parent_nodes  : bool
$reference_free  : bool
$exact_id  : string|null
This is a cache of getId on exact mode
$id  : string|null
This is a cache of getId on non-exact mode
$literal_float_types  : array<string, TLiteralFloat>
$literal_int_types  : array<string, TLiteralInt>
$literal_string_types  : array<string, TLiteralString>
$typed_class_strings  : array<string, TClassString>
$types  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructs a Union instance
__toString()  : string
__unserialize()  : void
Suppresses memory usage when unserializing objects.
addParentNodes()  : static
allFloatLiterals()  : bool
allIntLiterals()  : bool
allLiterals()  : bool
allSpecificLiterals()  : bool
allStringLiterals()  : bool
canBeFullyExpressedInPhp()  : bool
canContainObjectType()  : bool
check()  : bool
containsAnyLiteral()  : bool
containsClassLike()  : bool
equals()  : bool
getArray()  : TArray|TKeyedArray|TClassStringMap
getAtomicTypes()  : array<string|int, mixed>
getBuilder()  : MutableUnion
getCallableTypes()  : array<string, TCallable>
getClosureTypes()  : array<string, TClosure>
getId()  : string
getKey()  : string
getLiteralFloats()  : array<string, TLiteralFloat>
getLiteralInts()  : array<string, TLiteralInt>
getLiteralStrings()  : array<string, TLiteralString>
getRangeInts()  : array<string, TIntRange>
getSingleAtomic()  : Atomic
getSingleFloatLiteral()  : TLiteralFloat
getSingleIntLiteral()  : TLiteralInt
getSingleLiteral()  : TLiteralInt|TLiteralString|TLiteralFloat
getSingleStringLiteral()  : TLiteralString
getTemplateTypes()  : array<int, TTemplateParam>
hasArray()  : bool
hasArrayAccessInterface()  : bool
hasArrayKey()  : bool
hasBool()  : bool
hasCallableType()  : bool
hasClassStringMap()  : bool
hasConditional()  : bool
hasFloat()  : bool
hasInt()  : bool
hasIterable()  : bool
hasList()  : bool
hasLiteralClassString()  : bool
hasLiteralFloat()  : bool
hasLiteralInt()  : bool
hasLiteralString()  : bool
hasLiteralValue()  : bool
hasLowercaseString()  : bool
hasMixed()  : bool
hasNamedObjectType()  : bool
hasNull()  : bool
hasNumeric()  : bool
hasObject()  : bool
hasObjectType()  : bool
hasScalar()  : bool
hasScalarType()  : bool
hasStaticObject()  : bool
hasString()  : bool
hasTemplate()  : bool
hasTemplateOrStatic()  : bool
hasType()  : bool
isAlwaysFalsy()  : bool
isAlwaysTruthy()  : bool
isArray()  : bool
isArrayKey()  : bool
isBool()  : bool
isEmptyArray()  : bool
isEmptyMixed()  : bool
isFalsable()  : bool
isFalse()  : bool
isFloat()  : bool
isGenerator()  : bool
isInt()  : bool
isMixed()  : bool
isNever()  : bool
isNonEmptyString()  : bool
isNull()  : bool
isNullable()  : bool
isObjectType()  : bool
isSingle()  : bool
isSingleAndMaybeNullable()  : bool
isSingleFloatLiteral()  : bool
isSingleIntLiteral()  : bool
isSingleLiteral()  : bool
isSingleStringLiteral()  : bool
isStaticObject()  : bool
isString()  : bool
isTemplatedClassString()  : bool
isTrue()  : bool
isUnionEmpty()  : bool
isVanillaMixed()  : bool
isVoid()  : bool
queueClassLikesForScanning()  : void
replaceClassLike()  : static
setByRef()  : static
setDifferent()  : static
setFromDocblock()  : self
setParentNodes()  : static
setPossiblyUndefined()  : static
setProperties()  : static
setTypes()  : self
toNamespacedString()  : string
toPhpString()  : string|null
visit()  : bool
visitMutable()  : bool
__clone()  : mixed

Constants

PROPERTY_KEYS_FOR_UNSERIALIZE

private mixed PROPERTY_KEYS_FOR_UNSERIALIZE = ["\x00" . self::class . "\x00" . 'types' => 'types', 'from_docblock' => 'from_docblock', 'from_calculation' => 'from_calculation', 'from_property' => 'from_property', 'from_static_property' => 'from_static_property', 'initialized' => 'initialized', 'initialized_class' => 'initialized_class', 'checked' => 'checked', 'failed_reconciliation' => 'failed_reconciliation', 'ignore_nullable_issues' => 'ignore_nullable_issues', 'ignore_falsable_issues' => 'ignore_falsable_issues', 'ignore_isset' => 'ignore_isset', 'possibly_undefined' => 'possibly_undefined', 'possibly_undefined_from_try' => 'possibly_undefined_from_try', 'explicit_never' => 'explicit_never', 'had_template' => 'had_template', 'from_template_default' => 'from_template_default', "\x00" . self::class . "\x00" . 'literal_string_types' => 'literal_string_types', "\x00" . self::class . "\x00" . 'typed_class_strings' => 'typed_class_strings', "\x00" . self::class . "\x00" . 'literal_int_types' => 'literal_int_types', "\x00" . self::class . "\x00" . 'literal_float_types' => 'literal_float_types', 'by_ref' => 'by_ref', 'reference_free' => 'reference_free', 'allow_mutations' => 'allow_mutations', 'has_mutations' => 'has_mutations', "\x00" . self::class . "\x00" . 'id' => 'id', "\x00" . self::class . "\x00" . 'exact_id' => 'exact_id', 'parent_nodes' => 'parent_nodes', 'propagate_parent_nodes' => 'propagate_parent_nodes', 'different' => 'different']

Properties

$allow_mutations

public bool $allow_mutations = true

$by_ref

True if the type was passed or returned by reference, or if the type refers to an object's property or an item in an array. Note that this is not true for locally created references that don't refer to properties or array items (see Context::$references_in_scope).

public bool $by_ref = false

$checked

Whether or not the type has been checked yet

public bool $checked = false

$different

public bool $different = false

$explicit_never

whether this type had never set explicitly since it's the bottom type, it's combined into everything else and lost

public bool $explicit_never = false

$failed_reconciliation

public bool $failed_reconciliation = false

$from_calculation

Whether the type originated from integer calculation

public bool $from_calculation = false

$from_docblock

Whether the type originated in a docblock

public bool $from_docblock = false

$from_property

Whether the type originated from a property

public bool $from_property = false

This helps turn isset($foo->bar) into a different sort of issue

$from_static_property

Whether the type originated from *static* property

public bool $from_static_property = false

Unlike non-static properties, static properties have no prescribed place like __construct() to be initialized in

$from_template_default

Whether or not this union comes from a template "as" default

public bool $from_template_default = false

$had_template

Whether or not this union had a template, since replaced

public bool $had_template = false

$has_mutations

public bool $has_mutations = true

$ignore_falsable_issues

Whether or not to ignore issues with possibly-false values

public bool $ignore_falsable_issues = false

$ignore_isset

Whether or not to ignore issues with isset on this type

public bool $ignore_isset = false

$ignore_nullable_issues

Whether or not to ignore issues with possibly-null values

public bool $ignore_nullable_issues = false

$initialized

Whether the property that this type has been derived from has been initialized in a constructor

public bool $initialized = true

$initialized_class

Which class the type was initialised in

public string|null $initialized_class = null

$parent_nodes

public array<string, DataFlowNode> $parent_nodes = []

$possibly_undefined

Whether or not this variable is possibly undefined

public bool $possibly_undefined = false

$possibly_undefined_from_try

Whether or not this variable is possibly undefined

public bool $possibly_undefined_from_try = false

$propagate_parent_nodes

public bool $propagate_parent_nodes = false

$reference_free

public bool $reference_free = false

$exact_id

This is a cache of getId on exact mode

private string|null $exact_id = null

$id

This is a cache of getId on non-exact mode

private string|null $id = null

$types

private array<string|int, mixed> $types
Tags
psalm-readonly

Methods

__construct()

Constructs a Union instance

public __construct(array<string|int, mixed> $types[, TProperties $properties = [] ]) : mixed
Parameters
$types : array<string|int, mixed>
$properties : TProperties = []
Tags
psalm-external-mutation-free

__toString()

public __toString() : string
Tags
psalm-mutation-free
Return values
string

__unserialize()

Suppresses memory usage when unserializing objects.

public __unserialize(array<string|int, mixed> $properties) : void
Parameters
$properties : array<string|int, mixed>
Tags
see
UnserializeMemoryUsageSuppressionTrait

addParentNodes()

public addParentNodes(array<string, DataFlowNode$parent_nodes) : static
Parameters
$parent_nodes : array<string, DataFlowNode>
Return values
static

allFloatLiterals()

public allFloatLiterals() : bool
Tags
psalm-mutation-free
Return values
bool

allIntLiterals()

public allIntLiterals() : bool
Tags
psalm-mutation-free
Return values
bool

allLiterals()

public allLiterals() : bool
Tags
psalm-mutation-free
psalm-assert-if-true

array< array-key, TLiteralString|TLiteralInt|TLiteralFloat|TNonspecificLiteralString|TNonSpecificLiteralInt|TFalse|TTrue

$this->getAtomicTypes()

Return values
bool

allSpecificLiterals()

public allSpecificLiterals() : bool
Tags
psalm-mutation-free
psalm-assert-if-true

array< array-key, TLiteralString|TLiteralInt|TLiteralFloat|TFalse|TTrue

$this->getAtomicTypes()

Return values
bool

allStringLiterals()

public allStringLiterals() : bool
Tags
psalm-mutation-free
Return values
bool

canBeFullyExpressedInPhp()

public canBeFullyExpressedInPhp(int $analysis_php_version_id) : bool
Parameters
$analysis_php_version_id : int
Tags
psalm-mutation-free
Return values
bool

canContainObjectType()

public canContainObjectType(Codebase $codebase) : bool
Parameters
$codebase : Codebase
Tags
psalm-mutation-free
Return values
bool

check()

public check(StatementsSource $source, CodeLocation $code_location, array<string|int, string> $suppressed_issues[, array<string, bool> $phantom_classes = [] ][, bool $inferred = true ][, bool $inherited = false ][, bool $prevent_template_covariance = false ][, string|null $calling_method_id = null ]) : bool
Parameters
$source : StatementsSource
$code_location : CodeLocation
$suppressed_issues : array<string|int, string>
$phantom_classes : array<string, bool> = []
$inferred : bool = true
$inherited : bool = false
$prevent_template_covariance : bool = false
$calling_method_id : string|null = null
Return values
bool

containsAnyLiteral()

public containsAnyLiteral() : bool
Tags
psalm-mutation-free
Return values
bool

containsClassLike()

public containsClassLike(lowercase-string $fq_class_like_name) : bool
Parameters
$fq_class_like_name : lowercase-string
Tags
psalm-mutation-free
Return values
bool

equals()

public equals(self $other_type[, bool $ensure_source_equality = true ][, bool $ensure_parent_node_equality = true ][, bool $ensure_possibly_undefined_equality = true ]) : bool
Parameters
$other_type : self
$ensure_source_equality : bool = true
$ensure_parent_node_equality : bool = true
$ensure_possibly_undefined_equality : bool = true
Tags
psalm-mutation-free
Return values
bool

getAtomicTypes()

public getAtomicTypes() : array<string|int, mixed>
Tags
psalm-mutation-free
Return values
array<string|int, mixed>

getClosureTypes()

public getClosureTypes() : array<string, TClosure>
Tags
psalm-mutation-free
Return values
array<string, TClosure>

getId()

public getId([bool $exact = true ]) : string
Parameters
$exact : bool = true
Tags
psalm-mutation-free
Return values
string

getKey()

public getKey() : string
Tags
psalm-mutation-free
Return values
string

getSingleFloatLiteral()

public getSingleFloatLiteral() : TLiteralFloat
Tags
psalm-mutation-free
throws
InvalidArgumentException

if isSingleFloatLiteral is false

Return values
TLiteralFloat

the only float literal represented by this union type

getSingleIntLiteral()

public getSingleIntLiteral() : TLiteralInt
Tags
throws
InvalidArgumentException

if isSingleIntLiteral is false

psalm-mutation-free
Return values
TLiteralInt

the only int literal represented by this union type

getSingleStringLiteral()

public getSingleStringLiteral() : TLiteralString
Tags
throws
InvalidArgumentException

if isSingleStringLiteral is false

psalm-mutation-free
Return values
TLiteralString

the only string literal represented by this union type

hasArray()

public hasArray() : bool
Tags
psalm-mutation-free
Return values
bool

hasArrayAccessInterface()

public hasArrayAccessInterface(Codebase $codebase) : bool
Parameters
$codebase : Codebase
Tags
psalm-mutation-free
Return values
bool

hasArrayKey()

public hasArrayKey() : bool
Tags
psalm-mutation-free
Return values
bool

hasBool()

public hasBool() : bool
Tags
psalm-mutation-free
Return values
bool

hasCallableType()

public hasCallableType() : bool
Tags
psalm-mutation-free
Return values
bool

hasClassStringMap()

public hasClassStringMap() : bool
Tags
psalm-mutation-free
Return values
bool

hasConditional()

public hasConditional() : bool
Tags
psalm-mutation-free
Return values
bool

hasFloat()

public hasFloat() : bool
Tags
psalm-mutation-free
Return values
bool

hasInt()

public hasInt() : bool
Tags
psalm-mutation-free
Return values
bool

hasIterable()

public hasIterable() : bool
Tags
psalm-mutation-free
Return values
bool

hasList()

public hasList() : bool
Tags
psalm-mutation-free
Return values
bool

hasLiteralClassString()

public hasLiteralClassString() : bool
Tags
psalm-mutation-free
Return values
bool

hasLiteralFloat()

public hasLiteralFloat() : bool
Tags
psalm-mutation-free
Return values
bool

hasLiteralInt()

public hasLiteralInt() : bool
Tags
psalm-mutation-free
Return values
bool

hasLiteralString()

public hasLiteralString() : bool
Tags
psalm-mutation-free
Return values
bool

hasLiteralValue()

public hasLiteralValue() : bool
Tags
psalm-mutation-free
Return values
bool

hasLowercaseString()

public hasLowercaseString() : bool
Tags
psalm-mutation-free
Return values
bool

hasMixed()

public hasMixed() : bool
Tags
psalm-mutation-free
Return values
bool

hasNamedObjectType()

public hasNamedObjectType() : bool
Tags
psalm-mutation-free
Return values
bool

hasNull()

public hasNull() : bool
Tags
psalm-mutation-free
Return values
bool

hasNumeric()

public hasNumeric() : bool
Tags
psalm-mutation-free
Return values
bool

hasObject()

public hasObject() : bool
Tags
psalm-mutation-free
Return values
bool

hasObjectType()

public hasObjectType() : bool
Tags
psalm-mutation-free
Return values
bool

hasScalar()

public hasScalar() : bool
Tags
psalm-mutation-free
Return values
bool

hasScalarType()

public hasScalarType() : bool
Tags
psalm-mutation-free
Return values
bool

hasStaticObject()

public hasStaticObject() : bool
Tags
psalm-mutation-free
Return values
bool

hasString()

public hasString() : bool
Tags
psalm-mutation-free
Return values
bool

hasTemplate()

public hasTemplate() : bool
Tags
psalm-mutation-free
Return values
bool

hasTemplateOrStatic()

public hasTemplateOrStatic() : bool
Tags
psalm-mutation-free
Return values
bool

hasType()

public hasType(string $type_string) : bool
Parameters
$type_string : string
Tags
psalm-mutation-free
Return values
bool

isAlwaysFalsy()

public isAlwaysFalsy() : bool
Tags
psalm-mutation-free
Return values
bool

isAlwaysTruthy()

public isAlwaysTruthy() : bool
Tags
psalm-mutation-free
Return values
bool

isArray()

public isArray() : bool
Tags
psalm-mutation-free
Return values
bool

true if this is an array

isArrayKey()

public isArrayKey() : bool
Tags
psalm-mutation-free
Return values
bool

isBool()

public isBool() : bool
Tags
psalm-mutation-free
Return values
bool

true if this is a boolean

isEmptyArray()

public isEmptyArray() : bool
Tags
psalm-mutation-free
Return values
bool

isEmptyMixed()

public isEmptyMixed() : bool
Tags
psalm-mutation-free
Return values
bool

isFalsable()

public isFalsable() : bool
Tags
psalm-mutation-free
Return values
bool

isFalse()

public isFalse() : bool
Tags
psalm-mutation-free
Return values
bool

isFloat()

public isFloat() : bool
Tags
psalm-mutation-free
Return values
bool

true if this is a float

isGenerator()

public isGenerator() : bool
Tags
psalm-mutation-free
Return values
bool

isInt()

public isInt([bool $check_templates = false ]) : bool
Parameters
$check_templates : bool = false
Tags
psalm-mutation-free
Return values
bool

true if this is an int

isMixed()

public isMixed([bool $check_templates = false ]) : bool
Parameters
$check_templates : bool = false
Tags
psalm-mutation-free
Return values
bool

isNever()

public isNever() : bool
Tags
psalm-mutation-free
Return values
bool

isNonEmptyString()

public isNonEmptyString([bool $check_templates = false ]) : bool
Parameters
$check_templates : bool = false
Tags
psalm-mutation-free
Return values
bool

true if this is a string

isNull()

public isNull() : bool
Tags
psalm-mutation-free
Return values
bool

isNullable()

public isNullable() : bool
Tags
psalm-mutation-free
Return values
bool

isObjectType()

public isObjectType() : bool
Tags
psalm-mutation-free
Return values
bool

isSingle()

public isSingle() : bool
Tags
psalm-mutation-free
Return values
bool

isSingleAndMaybeNullable()

public isSingleAndMaybeNullable() : bool
Tags
psalm-mutation-free
Return values
bool

isSingleFloatLiteral()

public isSingleFloatLiteral() : bool
Tags
psalm-mutation-free
Return values
bool

true if this is a float literal with only one possible value

isSingleIntLiteral()

public isSingleIntLiteral() : bool
Tags
psalm-mutation-free
Return values
bool

true if this is an int literal with only one possible value

isSingleLiteral()

public isSingleLiteral() : bool
Tags
psalm-mutation-free
Return values
bool

isSingleStringLiteral()

public isSingleStringLiteral() : bool
Tags
psalm-mutation-free
Return values
bool

true if this is a string literal with only one possible value

isStaticObject()

public isStaticObject() : bool
Tags
psalm-mutation-free
Return values
bool

isString()

public isString([bool $check_templates = false ]) : bool
Parameters
$check_templates : bool = false
Tags
psalm-mutation-free
Return values
bool

true if this is a string

isTemplatedClassString()

public isTemplatedClassString() : bool
Tags
psalm-mutation-free
Return values
bool

isTrue()

public isTrue() : bool
Tags
psalm-mutation-free
Return values
bool

isUnionEmpty()

public isUnionEmpty() : bool
Tags
psalm-mutation-free
Return values
bool

isVanillaMixed()

public isVanillaMixed() : bool
Tags
psalm-mutation-free
Return values
bool

isVoid()

public isVoid() : bool
Tags
psalm-mutation-free
Return values
bool

queueClassLikesForScanning()

public queueClassLikesForScanning(Codebase $codebase[, FileStorage|null $file_storage = null ][, array<string, mixed> $phantom_classes = [] ]) : void
Parameters
$codebase : Codebase
$file_storage : FileStorage|null = null
$phantom_classes : array<string, mixed> = []

replaceClassLike()

public replaceClassLike(string $old, string $new) : static
Parameters
$old : string
$new : string
Return values
static

setByRef()

public setByRef(bool $by_ref) : static
Parameters
$by_ref : bool
Return values
static

setDifferent()

public setDifferent(bool $different) : static
Parameters
$different : bool
Return values
static

setFromDocblock()

public setFromDocblock([bool $fromDocblock = true ]) : self
Parameters
$fromDocblock : bool = true
Tags
psalm-mutation-free
Return values
self

setParentNodes()

public setParentNodes(array<string, DataFlowNode$parent_nodes[, bool $propagate_changes = false ]) : static
Parameters
$parent_nodes : array<string, DataFlowNode>
$propagate_changes : bool = false
Return values
static

setPossiblyUndefined()

public setPossiblyUndefined(bool $possibly_undefined[, bool|null $from_try = null ]) : static
Parameters
$possibly_undefined : bool
$from_try : bool|null = null
Return values
static

setProperties()

public setProperties(TProperties $properties) : static
Parameters
$properties : TProperties
Return values
static

setTypes()

public setTypes(array<string|int, mixed> $types) : self
Parameters
$types : array<string|int, mixed>
Tags
psalm-mutation-free
Return values
self

toNamespacedString()

public toNamespacedString(string|null $namespace, array<lowercase-string, string> $aliased_classes, string|null $this_class, bool $use_phpdoc_format) : string
Parameters
$namespace : string|null
$aliased_classes : array<lowercase-string, string>
$this_class : string|null
$use_phpdoc_format : bool
Tags
psalm-mutation-free
Return values
string

toPhpString()

public toPhpString(string|null $namespace, array<lowercase-string, string> $aliased_classes, string|null $this_class, int $analysis_php_version_id) : string|null
Parameters
$namespace : string|null
$aliased_classes : array<lowercase-string, string>
$this_class : string|null
$analysis_php_version_id : int
Tags
psalm-mutation-free
Return values
string|null

visitMutable()

public static visitMutable(MutableTypeVisitor $visitor, mixed &$node, bool $cloned) : bool
Parameters
$visitor : MutableTypeVisitor
$node : mixed
$cloned : bool
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint

Return values
bool

        
On this page

Search results