Page MenuHomePhorge

ArcanistPHPEchoTagXHPASTLinterRule.php
No OneTemporary

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
Sun, Jan 19, 16:22 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1120503
Default Alt Text
ArcanistPHPEchoTagXHPASTLinterRule.php (532 B)

Event Timeline