PATH:
opt
/
cpanel
/
ea-wappspector
/
vendor
/
phpstan
/
phpdoc-parser
/
src
/
Ast
/
Type
<?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}"; } }
[-] IntersectionTypeNode.php
[edit]
[-] NullableTypeNode.php
[edit]
[-] ArrayShapeNode.php
[edit]
[+]
..
[-] InvalidTypeNode.php
[edit]
[-] ObjectShapeNode.php
[edit]
[-] ArrayShapeUnsealedTypeNode.php
[edit]
[-] ArrayTypeNode.php
[edit]
[-] ConstTypeNode.php
[edit]
[-] IdentifierTypeNode.php
[edit]
[-] CallableTypeNode.php
[edit]
[-] ConditionalTypeForParameterNode.php
[edit]
[-] GenericTypeNode.php
[edit]
[-] UnionTypeNode.php
[edit]
[-] ThisTypeNode.php
[edit]
[-] OffsetAccessTypeNode.php
[edit]
[-] ArrayShapeItemNode.php
[edit]
[-] TypeNode.php
[edit]
[-] ConditionalTypeNode.php
[edit]
[-] ObjectShapeItemNode.php
[edit]
[-] CallableTypeParameterNode.php
[edit]