Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7449285
CallableTypeNode.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
CallableTypeNode.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
PHPStan\PhpDocParser\Ast\Type
;
use
PHPStan\PhpDocParser\Ast\NodeAttributes
;
use
PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode
;
use
function
implode
;
class
CallableTypeNode
implements
TypeNode
{
use
NodeAttributes
;
public
IdentifierTypeNode
$identifier
;
/** @var TemplateTagValueNode[] */
public
array
$templateTypes
;
/** @var CallableTypeParameterNode[] */
public
array
$parameters
;
public
TypeNode
$returnType
;
/**
* @param CallableTypeParameterNode[] $parameters
* @param TemplateTagValueNode[] $templateTypes
*/
public
function
__construct
(
IdentifierTypeNode
$identifier
,
array
$parameters
,
TypeNode
$returnType
,
array
$templateTypes
)
{
$this
->
identifier
=
$identifier
;
$this
->
parameters
=
$parameters
;
$this
->
returnType
=
$returnType
;
$this
->
templateTypes
=
$templateTypes
;
}
public
function
__toString
():
string
{
$returnType
=
$this
->
returnType
;
if
(
$returnType
instanceof
self
)
{
$returnType
=
"({$returnType})"
;
}
$template
=
$this
->
templateTypes
!==
[]
?
'<'
.
implode
(
', '
,
$this
->
templateTypes
)
.
'>'
:
''
;
$parameters
=
implode
(
', '
,
$this
->
parameters
);
return
"{$this->identifier}{$template}({$parameters}): {$returnType}"
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 20:06 (1 d, 22 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0e/81/7c41623ae13cb0bb7a0232bf9d98
Default Alt Text
CallableTypeNode.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment