Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431877
UnionTypeNode.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
659 B
Referenced Files
None
Subscribers
None
UnionTypeNode.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
PHPStan\PhpDocParser\Ast\Type
;
use
PHPStan\PhpDocParser\Ast\NodeAttributes
;
use
function
array_map
;
use
function
implode
;
class
UnionTypeNode
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
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 21:10 (1 d, 15 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
51/5a/f48afdc9833898fa19cdb692e0db
Default Alt Text
UnionTypeNode.php (659 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment