Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431757
ConditionalTypeForParameterNode.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
846 B
Referenced Files
None
Subscribers
None
ConditionalTypeForParameterNode.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
PHPStan\PhpDocParser\Ast\Type
;
use
PHPStan\PhpDocParser\Ast\NodeAttributes
;
use
function
sprintf
;
class
ConditionalTypeForParameterNode
implements
TypeNode
{
use
NodeAttributes
;
public
string
$parameterName
;
public
TypeNode
$targetType
;
public
TypeNode
$if
;
public
TypeNode
$else
;
public
bool
$negated
;
public
function
__construct
(
string
$parameterName
,
TypeNode
$targetType
,
TypeNode
$if
,
TypeNode
$else
,
bool
$negated
)
{
$this
->
parameterName
=
$parameterName
;
$this
->
targetType
=
$targetType
;
$this
->
if
=
$if
;
$this
->
else
=
$else
;
$this
->
negated
=
$negated
;
}
public
function
__toString
():
string
{
return
sprintf
(
'(%s %s %s ? %s : %s)'
,
$this
->
parameterName
,
$this
->
negated
?
'is not'
:
'is'
,
$this
->
targetType
,
$this
->
if
,
$this
->
else
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 21:02 (1 d, 7 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
99/96/23962e4b66ac1222c91d284589f2
Default Alt Text
ConditionalTypeForParameterNode.php (846 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment