Skip to content

Commit

Permalink
minor #3897 DX: FunctionsAnalyzer - simplifying return expression (ku…
Browse files Browse the repository at this point in the history
…bawerlos)

This PR was merged into the 2.12 branch.

Discussion
----------

DX: FunctionsAnalyzer - simplifying return expression

Just noticed after #3895 that it could be done a bit simpler.

Commits
-------

ffd3932 DX: simplifying return expression in FunctionsAnalyzer
  • Loading branch information
SpacePossum committed Jul 11, 2018
2 parents 5a8c190 + ffd3932 commit 1e6392d
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 1e6392d

Please sign in to comment.