Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7481083
InferPureVisitorTrait.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
858 B
Referenced Files
None
Subscribers
None
InferPureVisitorTrait.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Phan\AST
;
use
ast\Node
;
use
Phan\Exception\NodeException
;
/**
* Contains methods to reduce boilerplate
*/
trait
InferPureVisitorTrait
{
/**
* Throws NodeException unconditionally
* @return never
* @throws NodeException
* @suppress PhanUnreferencedPublicMethod https://github.com/phan/phan/issues/4558
*/
public
function
throwNodeException
(
Node
$node
):
void
{
throw
new
NodeException
(
$node
);
}
/**
* Calls on all child nodes on $node that are instances of Node.
*/
public
function
maybeInvokeAllChildNodes
(
Node
$node
):
void
{
foreach
(
$node
->
children
as
$c
)
{
if
(
$c
instanceof
Node
)
{
// @phan-suppress-next-line PhanUndeclaredMethod
$this
->
__invoke
(
$c
);
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 12:31 (5 d, 11 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
36/77/1034e2f2b76e7c2c5355d6cdd5ab
Default Alt Text
InferPureVisitorTrait.php (858 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment