Page MenuHomeSealhub

ArcanistElseIfUsageXHPASTLinterRule.php
No OneTemporary

Authored By
Unknown
Size
597 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
Sat, Nov 28, 03:08 (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1208656
Default Alt Text
ArcanistElseIfUsageXHPASTLinterRule.php (597 B)

Event Timeline