Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2889159
ArcanistPaamayimNekudotayimSpacingXHPASTLinterRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
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
Jan 19 2025, 11:43 (5 w, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124209
Default Alt Text
ArcanistPaamayimNekudotayimSpacingXHPASTLinterRule.php (1003 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment