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\ConstExpr\ConstExprStringNode; use PHPStan\PhpDocParser\Ast\Node; use PHPStan\PhpDocParser\Ast\NodeAttributes; use function sprintf; class ObjectShapeItemNode implements Node { use NodeAttributes; /** @var ConstExprStringNode|IdentifierTypeNode */ public $keyName; public bool $optional; public TypeNode $valueType; /** * @param ConstExprStringNode|IdentifierTypeNode $keyName */ public function __construct($keyName, bool $optional, TypeNode $valueType) { $this->keyName = $keyName; $this->optional = $optional; $this->valueType = $valueType; } public function __toString(): string { if ($this->keyName !== null) { return sprintf( '%s%s: %s', (string) $this->keyName, $this->optional ? '?' : '', (string) $this->valueType, ); } return (string) $this->valueType; } }
[-] 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]