Page MenuHomePhorge

ArcanistSemicolonSpacingXHPASTLinterRule.php
No OneTemporary

ArcanistSemicolonSpacingXHPASTLinterRule.php

<?php
final class ArcanistSemicolonSpacingXHPASTLinterRule
extends ArcanistXHPASTLinterRule {
const ID = 43;
public function getLintName() {
return pht('Semicolon Spacing');
}
public function getLintSeverity() {
return ArcanistLintSeverity::SEVERITY_ADVICE;
}
public function process(XHPASTNode $root) {
$tokens = $root->selectTokensOfType(';');
foreach ($tokens as $token) {
$prev = $token->getPrevToken();
if ($prev->isAnyWhitespace()) {
$this->raiseLintAtToken(
$prev,
pht('Space found before semicolon.'),
'');
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Jan 19 2025, 11:02 (5 w, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1120646
Default Alt Text
ArcanistSemicolonSpacingXHPASTLinterRule.php (623 B)

Event Timeline