🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-15 05:19:51 | PHP 8.1.34
📂
/ (Root)
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
BetterPhpDocParser
/
ValueObject
/
Type
📍 /opt/cpanel/ea-wappspector/vendor/rector/rector/src/BetterPhpDocParser/ValueObject/Type
🔄 Refresh
✏️
Editing: BracketsAwareUnionTypeNode.php
Read Only
<?php declare (strict_types=1); namespace Rector\BetterPhpDocParser\ValueObject\Type; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode; use Stringable; final class BracketsAwareUnionTypeNode extends UnionTypeNode { /** * @readonly * @var bool */ private $isWrappedInBrackets = \false; /** * @param TypeNode[] $types */ public function __construct(array $types, bool $isWrappedInBrackets = \false) { $this->isWrappedInBrackets = $isWrappedInBrackets; parent::__construct($types); } /** * Preserve common format */ public function __toString() : string { if (!$this->isWrappedInBrackets) { return \implode('|', $this->types); } return '(' . \implode('|', $this->types) . ')'; } public function isWrappedInBrackets() : bool { return $this->isWrappedInBrackets; } }
💾 Save Changes
❌ Cancel