Page MenuHomeWickedGov Phorge

IntersectionTypeNode.php
No OneTemporary

Size
665 B
Referenced Files
None
Subscribers
None

IntersectionTypeNode.php

<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\Type;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function array_map;
use function implode;
class IntersectionTypeNode implements TypeNode
{
use NodeAttributes;
/** @var TypeNode[] */
public array $types;
/**
* @param TypeNode[] $types
*/
public function __construct(array $types)
{
$this->types = $types;
}
public function __toString(): string
{
return '(' . implode(' & ', array_map(static function (TypeNode $type): string {
if ($type instanceof NullableTypeNode) {
return '(' . $type . ')';
}
return (string) $type;
}, $this->types)) . ')';
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 22, 20:40 (1 d, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d6/f6/f8e23e90120b811fec383f852b77
Default Alt Text
IntersectionTypeNode.php (665 B)

Event Timeline