Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1432159
ObjectShapeItemNode.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
932 B
Referenced Files
None
Subscribers
None
ObjectShapeItemNode.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
PHPStan\PhpDocParser\Ast\Type
;
use
PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode
;
use
PHPStan\PhpDocParser\Ast\Node
;
use
PHPStan\PhpDocParser\Ast\NodeAttributes
;
use
function
sprintf
;
class
ObjectShapeItemNode
implements
Node
{
use
NodeAttributes
;
/** @var ConstExprStringNode|IdentifierTypeNode */
public
$keyName
;
public
bool
$optional
;
public
TypeNode
$valueType
;
/**
* @param ConstExprStringNode|IdentifierTypeNode $keyName
*/
public
function
__construct
(
$keyName
,
bool
$optional
,
TypeNode
$valueType
)
{
$this
->
keyName
=
$keyName
;
$this
->
optional
=
$optional
;
$this
->
valueType
=
$valueType
;
}
public
function
__toString
():
string
{
if
(
$this
->
keyName
!==
null
)
{
return
sprintf
(
'%s%s: %s'
,
(
string
)
$this
->
keyName
,
$this
->
optional
?
'?'
:
''
,
(
string
)
$this
->
valueType
,
);
}
return
(
string
)
$this
->
valueType
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 21:29 (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f5/a0/25102a2e3ec22e82ce26e796c988
Default Alt Text
ObjectShapeItemNode.php (932 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment