Skip to content

Commit

Permalink
refactor: create variable when we need it
Browse files Browse the repository at this point in the history
  • Loading branch information
shvlv committed Aug 21, 2024
1 parent ea485f5 commit 1694d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion InpsydeTemplates/Sniffs/Formatting/ShortEchoTagSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function process(File $phpcsFile, $stackPtr): void

/** @var array<int, Token> $tokens */
$tokens = $phpcsFile->getTokens();
$currentLine = $tokens[$stackPtr]['line'];

$prevPtr = $phpcsFile->findPrevious(
Tokens::$emptyTokens,
Expand All @@ -53,6 +52,7 @@ public function process(File $phpcsFile, $stackPtr): void
}

$prevToken = $tokens[$prevPtr];
$currentLine = $tokens[$stackPtr]['line'];

if ($prevToken['line'] !== $currentLine) {
return;
Expand Down

0 comments on commit 1694d1c

Please sign in to comment.