Page MenuHomePhorge

ArcanistPHPShortTagXHPASTLinterRule.php
No OneTemporary

ArcanistPHPShortTagXHPASTLinterRule.php

<?php
final class ArcanistPHPShortTagXHPASTLinterRule
extends ArcanistXHPASTLinterRule {
const ID = 6;
public function getLintName() {
return pht('Use of Short Tag `%s`', '<?');
}
public function process(XHPASTNode $root) {
$tokens = $root->getTokens();
foreach ($tokens as $token) {
if ($token->getTypeName() === 'T_OPEN_TAG') {
if (trim($token->getValue()) === '<?') {
$this->raiseLintAtToken(
$token,
pht(
'Use the full form of the PHP open tag, `%s`.',
'<?php'),
"<?php\n");
}
break;
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Jan 19 2025, 11:01 (5 w, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124051
Default Alt Text
ArcanistPHPShortTagXHPASTLinterRule.php (640 B)

Event Timeline