Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed May 29, 2024
1 parent 0cd45ee commit a56d37a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/TokenRunner/Analyzer/FixerAnalyzer/BlockFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function findInTokensByEdge(Tokens $tokens, int $position): ?BlockInfo
return null;
}

if ($position !== null && $token->equals('(')) {
if ($token->equals('(')) {
$closingPosition = $tokens->getNextMeaningfulToken($position);
if ($closingPosition !== null) {
$closingToken = $tokens[$closingPosition];
Expand All @@ -84,11 +84,6 @@ public function findInTokensByEdge(Tokens $tokens, int $position): ?BlockInfo
}
}

// some invalid code
if ($position === null) {
return null;
}

$blockType = $this->getBlockTypeByToken($token);

return $this->createBlockInfo($token, $position, $tokens, $blockType);
Expand Down

0 comments on commit a56d37a

Please sign in to comment.