Skip to content

Commit bb14224

Browse files
committed
[SQUASH-ME] Squiz/StaticThisUsage: fix singular vs plural $type
1 parent 47b45bc commit bb14224

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function processTokenWithinScope(File $phpcsFile, int $stackPtr, int $cur
6161
return;
6262
}
6363

64-
$type = 'methods';
64+
$type = 'method';
6565
} else {
66-
$type = 'closures';
66+
$type = 'closure';
6767
}
6868

6969
$methodProps = $phpcsFile->getMethodProperties($stackPtr);
@@ -84,7 +84,7 @@ public function processTokenWithinScope(File $phpcsFile, int $stackPtr, int $cur
8484
* @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned.
8585
* @param int $next The position of the next token to check.
8686
* @param int $end The position of the last token to check.
87-
* @param string $type Either 'method' or 'closure'.
87+
* @param string $type Type of context being checked. Either 'method' or 'closure'.
8888
*
8989
* @return void
9090
*/
@@ -143,6 +143,6 @@ protected function processTokenOutsideScope(File $phpcsFile, int $stackPtr)
143143
return;
144144
}
145145

146-
$this->checkThisUsage($phpcsFile, $stackPtr, $tokens[$stackPtr]['scope_closer'], 'closures');
146+
$this->checkThisUsage($phpcsFile, $stackPtr, $tokens[$stackPtr]['scope_closer'], 'closure');
147147
}
148148
}

0 commit comments

Comments
 (0)