From 55c134248f09bfee76479fcf0e52059ce82b34be Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Mon, 9 Dec 2024 12:01:11 -0300 Subject: [PATCH] EscapeOutput: remove unused variable `$end` This commit removes the unnecessary initialization of the variable `$end` at the beginning of the sniff code. Every single `case` statement of the `switch` that follows either re-initialize the variable with a different value or returns without using the variable. --- WordPress/Sniffs/Security/EscapeOutputSniff.php | 1 - 1 file changed, 1 deletion(-) diff --git a/WordPress/Sniffs/Security/EscapeOutputSniff.php b/WordPress/Sniffs/Security/EscapeOutputSniff.php index 92c1b2ef0..7861940ca 100644 --- a/WordPress/Sniffs/Security/EscapeOutputSniff.php +++ b/WordPress/Sniffs/Security/EscapeOutputSniff.php @@ -185,7 +185,6 @@ public function getGroups() { */ public function process_token( $stackPtr ) { $start = ( $stackPtr + 1 ); - $end = $start; switch ( $this->tokens[ $stackPtr ]['code'] ) { case \T_STRING: