Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7449304
GlobalVariable.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
770 B
Referenced Files
None
Subscribers
None
GlobalVariable.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Phan\Language\Element
;
use
Phan\Language\UnionType
;
/**
* This class represents a global variable in a local scope, allowing to partially
* proxy write reference to the global object.
*/
class
GlobalVariable
extends
Variable
{
use
ElementProxyTrait
;
public
function
getName
():
string
{
return
$this
->
element
->
getName
();
}
public
function
setUnionType
(
UnionType
$type
):
void
{
$this
->
type
=
$type
;
// Always merge the type on the actual global.
// Convert undefined to null before merging in the type.
$this
->
element
->
setUnionType
(
$this
->
element
->
getUnionType
()->
withUnionType
(
$type
->
eraseRealTypeSetRecursively
())->
withIsPossiblyUndefined
(
false
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 20:06 (1 d, 22 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b7/9f/6bf0b288ddf45806e16a5e9d2a59
Default Alt Text
GlobalVariable.php (770 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment