Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22392615
ArcanistPaamayimNekudotayimSpacingXHPASTLinterRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1003 B
Referenced Files
None
Subscribers
None
ArcanistPaamayimNekudotayimSpacingXHPASTLinterRule.php
View Options
<?php
final
class
ArcanistPaamayimNekudotayimSpacingXHPASTLinterRule
extends
ArcanistXHPASTLinterRule
{
const
ID
=
96
;
public
function
getLintName
()
{
return
pht
(
'Paamayim Nekudotayim Spacing'
);
}
public
function
getLintSeverity
()
{
return
ArcanistLintSeverity
::
SEVERITY_WARNING
;
}
public
function
process
(
XHPASTNode
$root
)
{
$double_colons
=
$root
->
selectTokensOfType
(
'T_PAAMAYIM_NEKUDOTAYIM'
);
foreach
(
$double_colons
as
$double_colon
)
{
$tokens
=
$double_colon
->
getNonsemanticTokensBefore
()
+
$double_colon
->
getNonsemanticTokensAfter
();
foreach
(
$tokens
as
$token
)
{
if
(
$token
->
isAnyWhitespace
())
{
if
(
strpos
(
$token
->
getValue
(),
"
\n
"
)
!==
false
)
{
continue
;
}
$this
->
raiseLintAtToken
(
$token
,
pht
(
'Unnecessary whitespace around paamayim nekudotayim '
.
'(double colon) operator.'
),
''
);
}
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 27, 15:49 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1206135
Default Alt Text
ArcanistPaamayimNekudotayimSpacingXHPASTLinterRule.php (1003 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline