Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7437736
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
Sun, Nov 22, 14:09 (5 h, 59 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/17/6e6f38ee2ed4984a7f7a04fb918f
Default Alt Text
UnionTypeNode.php (659 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment