FunctionLike
trait FunctionLike
internal |
Methods
setBody(string $code, array|null $args = null)
No description
string
getBody()
No description
addBody(string $code, array|null $args = null)
No description
setParameters(array $val)
No description
array
getParameters()
No description
getParameter(string $name)
No description
addParameter(string $name, mixed $defaultValue = null)
Adds a parameter. If it already exists, it overwrites it.
removeParameter(string $name)
No description
bool
hasParameter(string $name)
No description
setVariadic(bool $state = true)
No description
bool
isVariadic()
No description
setReturnType(string|null $type)
No description
Type|string|null
getReturnType(bool $asObject = false)
No description
setReturnReference(bool $state = true)
No description
bool
getReturnReference()
No description
setReturnNullable(bool $state = true)
No description
bool
isReturnNullable()
No description
Details
at line 35
FunctionLike
setBody(string $code, array|null $args = null)
No description
at line 48
string
getBody()
No description
at line 55
FunctionLike
addBody(string $code, array|null $args = null)
No description
at line 69
FunctionLike
setParameters(array $val)
No description
at line 82
array
getParameters()
No description
at line 88
Parameter
getParameter(string $name)
No description
at line 98
Parameter
addParameter(string $name, mixed $defaultValue = null)
Adds a parameter. If it already exists, it overwrites it.
at line 112
FunctionLike
removeParameter(string $name)
No description
at line 119
bool
hasParameter(string $name)
No description
at line 125
FunctionLike
setVariadic(bool $state = true)
No description
at line 132
bool
isVariadic()
No description
at line 138
FunctionLike
setReturnType(string|null $type)
No description
at line 146
Type|string|null
getReturnType(bool $asObject = false)
No description
at line 154
FunctionLike
setReturnReference(bool $state = true)
No description
at line 161
bool
getReturnReference()
No description
at line 167
FunctionLike
setReturnNullable(bool $state = true)
No description
at line 174
bool
isReturnNullable()
No description