Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7457392
TemplateScope.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
813 B
Referenced Files
None
Subscribers
None
TemplateScope.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Phan\Language\Scope
;
use
InvalidArgumentException
;
use
Phan\Language\Scope
;
use
Phan\Language\Type\TemplateType
;
/**
* A scope that adds (at)template annotations to the current outer scope.
* Used for parsing phpdoc comments.
*/
class
TemplateScope
extends
Scope
{
/**
* @param TemplateType[] $template_type_list
*/
public
function
__construct
(
Scope
$other
,
array
$template_type_list
)
{
parent
::
__construct
(
$other
,
$other
->
fqsen
,
$other
->
flags
);
if
(
\count
(
$template_type_list
)
===
0
)
{
throw
new
InvalidArgumentException
(
"TemplateScope should only be used to add templates"
);
}
foreach
(
$template_type_list
as
$template_type
)
{
$this
->
addTemplateType
(
$template_type
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 00:56 (2 d, 15 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c2/89/664822704c780f5aea33a120db50
Default Alt Text
TemplateScope.php (813 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment