Skip to content

Commit 1694d1c

Browse files
committed
refactor: create variable when we need it
1 parent ea485f5 commit 1694d1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

InpsydeTemplates/Sniffs/Formatting/ShortEchoTagSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function process(File $phpcsFile, $stackPtr): void
3939

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

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

5554
$prevToken = $tokens[$prevPtr];
55+
$currentLine = $tokens[$stackPtr]['line'];
5656

5757
if ($prevToken['line'] !== $currentLine) {
5858
return;

0 commit comments

Comments
 (0)