1
0
Fork 0

Fix code style

pull/484/head
Stephan Unverwerth 2017-09-28 16:07:02 +02:00
parent 73e8907874
commit a5c3adf24e
1 changed files with 5 additions and 7 deletions

View File

@ -52,14 +52,14 @@ class TreeAnalyzer
$this->collectDefinitionsAndReferences($this->sourceFileNode);
}
private function collectDiagnostics($node) {
private function collectDiagnostics($node)
{
if (($error = PhpParser\DiagnosticsProvider::checkDiagnostics($node)) !== null) {
$range = PhpParser\PositionUtilities::getRangeFromPosition($error->start, $error->length, $this->sourceFileNode->fileContents);
if ($error->kind == \Microsoft\PhpParser\DiagnosticKind::Error) {
$severity = DiagnosticSeverity::ERROR;
}
else {
} else {
$severity = DiagnosticSeverity::WARNING;
}
@ -92,8 +92,7 @@ class TreeAnalyzer
if ($child !== null) {
if ($child instanceof Node) {
$this->update($child);
}
else {
} else {
$this->collectDiagnostics($child);
}
}
@ -103,8 +102,7 @@ class TreeAnalyzer
if ($node instanceof Node) {
$this->update($node);
}
else {
} else {
$this->collectDiagnostics($node);
}
}