Page MenuHomeSealhub

ArcanistElseIfUsageXHPASTLinterRule.php
No OneTemporary

Authored By
Unknown
Size
564 B
Referenced Files
None
Subscribers
None

ArcanistElseIfUsageXHPASTLinterRule.php

<?php
final class ArcanistElseIfUsageXHPASTLinterRule
extends ArcanistXHPASTLinterRule {
const ID = 42;
public function getLintName() {
return pht('ElseIf Usage');
}
public function getLintSeverity() {
return ArcanistLintSeverity::SEVERITY_ADVICE;
}
public function process(XHPASTNode $root) {
$tokens = $root->selectTokensOfType('T_ELSEIF');
foreach ($tokens as $token) {
$this->raiseLintAtToken(
$token,
pht('Usage of `%s` is preferred over `%s`.', 'else if', 'elseif'),
'else if');
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 27, 15:05 (6 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1224515
Default Alt Text
ArcanistElseIfUsageXHPASTLinterRule.php (564 B)

Event Timeline