Skip to content

Commit

Permalink
DX: simplifying return expression in FunctionsAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Jul 10, 2018
1 parent 5a8c190 commit ffd3932
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Tokenizer/Analyzer/FunctionsAnalyzer.php
Expand Up @@ -40,8 +40,7 @@ public function isGlobalFunctionCall(Tokens $tokens, $index)

$nextIndex = $tokens->getNextMeaningfulToken($index);

return !$tokens[$prevIndex]->isGivenKind([T_DOUBLE_COLON, T_NEW, T_OBJECT_OPERATOR, T_STRING, T_FUNCTION])
&& !$tokens[$nextIndex]->isGivenKind([T_DOUBLE_COLON, T_NS_SEPARATOR])
return !$tokens[$prevIndex]->isGivenKind([T_DOUBLE_COLON, T_FUNCTION, T_NEW, T_OBJECT_OPERATOR, T_STRING])
&& $tokens[$nextIndex]->equals('(');
}

Expand Down

0 comments on commit ffd3932

Please sign in to comment.