Page MenuHomeSealhub

ArcanistPHPEchoTagXHPASTLinterRule.php
No OneTemporary

Authored By
Unknown
Size
507 B
Referenced Files
None
Subscribers
None

ArcanistPHPEchoTagXHPASTLinterRule.php

<?php
final class ArcanistPHPEchoTagXHPASTLinterRule
extends ArcanistXHPASTLinterRule {
const ID = 7;
public function getLintName() {
return pht('Use of Echo Tag "%s"', '<?=');
}
public function process(XHPASTNode $root) {
$tokens = $root->getTokens();
foreach ($tokens as $token) {
if ($token->getTypeName() === 'T_OPEN_TAG_WITH_ECHO') {
$this->raiseLintAtToken(
$token,
pht('Avoid the PHP echo short form, "%s".', '<?='));
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 27, 16:24 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1223080
Default Alt Text
ArcanistPHPEchoTagXHPASTLinterRule.php (507 B)

Event Timeline