Documentation

CallableTrait

Tags
psalm-immutable

Table of Contents

Properties

$is_pure  : bool|null
$params  : array<int, FunctionLikeParameter>|null
$return_type  : Union|null

Methods

__construct()  : mixed
Constructs a new instance of a generic type
getId()  : string
getKey()  : string
getParamString()  : string
getReturnTypeString()  : string
replace()  : static
setIsPure()  : static
toNamespacedString()  : string
toPhpString()  : string
getCallableChildNodeKeys()  : array<int, string>
replaceCallableTemplateTypesWithArgTypes()  : Union|null}|null
replaceCallableTemplateTypesWithStandins()  : Union|null}|null

Properties

Methods

__construct()

Constructs a new instance of a generic type

public __construct([string $value = 'callable' ][, array<int, FunctionLikeParameter$params = null ][, Union|null $return_type = null ][, bool|null $is_pure = null ][, bool $from_docblock = false ]) : mixed
Parameters
$value : string = 'callable'
$params : array<int, FunctionLikeParameter> = null
$return_type : Union|null = null
$is_pure : bool|null = null
$from_docblock : bool = false

getId()

public getId([bool $exact = true ][, bool $nested = false ]) : string
Parameters
$exact : bool = true
$nested : bool = false
Return values
string

getKey()

public getKey([bool $include_extra = true ]) : string
Parameters
$include_extra : bool = true
Return values
string

getParamString()

public getParamString() : string
Return values
string

getReturnTypeString()

public getReturnTypeString() : string
Return values
string

setIsPure()

public setIsPure(bool $is_pure) : static
Parameters
$is_pure : bool
Return values
static

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
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
Parameters
$namespace : string|null
$aliased_classes : array<lowercase-string, string>
$this_class : string|null
$analysis_php_version_id : int
Return values
string

getCallableChildNodeKeys()

protected getCallableChildNodeKeys() : array<int, string>
Return values
array<int, string>

replaceCallableTemplateTypesWithArgTypes()

protected replaceCallableTemplateTypesWithArgTypes(TemplateResult $template_result, Codebase|null $codebase) : Union|null}|null
Parameters
$template_result : TemplateResult
$codebase : Codebase|null
Return values
Union|null}|null

replaceCallableTemplateTypesWithStandins()

protected replaceCallableTemplateTypesWithStandins(TemplateResult $template_result, Codebase $codebase[, StatementsAnalyzer|null $statements_analyzer = null ][, Atomic|null $input_type = null ][, int|null $input_arg_offset = null ][, string|null $calling_class = null ][, string|null $calling_function = null ][, bool $replace = true ][, bool $add_lower_bound = false ][, int $depth = 0 ]) : Union|null}|null
Parameters
$template_result : TemplateResult
$codebase : Codebase
$statements_analyzer : StatementsAnalyzer|null = null
$input_type : Atomic|null = null
$input_arg_offset : int|null = null
$calling_class : string|null = null
$calling_function : string|null = null
$replace : bool = true
$add_lower_bound : bool = false
$depth : int = 0
Return values
Union|null}|null

        
On this page

Search results