diff --git a/InpsydeTemplates/Sniffs/Formatting/ShortEchoTagSniff.php b/InpsydeTemplates/Sniffs/Formatting/ShortEchoTagSniff.php index d573b3f..f3c4f71 100644 --- a/InpsydeTemplates/Sniffs/Formatting/ShortEchoTagSniff.php +++ b/InpsydeTemplates/Sniffs/Formatting/ShortEchoTagSniff.php @@ -39,7 +39,6 @@ public function process(File $phpcsFile, $stackPtr): void /** @var array $tokens */ $tokens = $phpcsFile->getTokens(); - $currentLine = $tokens[$stackPtr]['line']; $prevPtr = $phpcsFile->findPrevious( Tokens::$emptyTokens, @@ -53,6 +52,7 @@ public function process(File $phpcsFile, $stackPtr): void } $prevToken = $tokens[$prevPtr]; + $currentLine = $tokens[$stackPtr]['line']; if ($prevToken['line'] !== $currentLine) { return;