Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5982893
NodeAttributes.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
682 B
Referenced Files
None
Subscribers
None
NodeAttributes.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
PHPStan\PhpDocParser\Ast
;
use
function
array_key_exists
;
trait
NodeAttributes
{
/** @var array<string, mixed> */
private
array
$attributes
=
[];
/**
* @param mixed $value
*/
public
function
setAttribute
(
string
$key
,
$value
):
void
{
if
(
$value
===
null
)
{
unset
(
$this
->
attributes
[
$key
]);
return
;
}
$this
->
attributes
[
$key
]
=
$value
;
}
public
function
hasAttribute
(
string
$key
):
bool
{
return
array_key_exists
(
$key
,
$this
->
attributes
);
}
/**
* @return mixed
*/
public
function
getAttribute
(
string
$key
)
{
if
(
$this
->
hasAttribute
(
$key
))
{
return
$this
->
attributes
[
$key
];
}
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 22:36 (1 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/5e/0a2f8c5f965336824111de1e9f17
Default Alt Text
NodeAttributes.php (682 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment