diff --git a/src/Files/File.php b/src/Files/File.php index 9a34bd0f43..1b36cbd4cf 100644 --- a/src/Files/File.php +++ b/src/Files/File.php @@ -2496,7 +2496,7 @@ public function hasCondition($stackPtr, $types) * @param int $stackPtr The position of the token we are checking. * @param int|string $type The type of token to search for. * @param bool $first If TRUE, will return the matched condition - * furtherest away from the passed token. + * furthest away from the passed token. * If FALSE, will return the matched condition * closest to the passed token. * diff --git a/src/Fixer.php b/src/Fixer.php index 897e14771b..1e1f2561d4 100644 --- a/src/Fixer.php +++ b/src/Fixer.php @@ -743,7 +743,7 @@ public function addContentBefore($stackPtr, $content) * @param int $change The number of spaces to adjust the indent by * (positive or negative). * - * @return bool If the change was accepted. + * @return void */ public function changeCodeBlockIndent($start, $end, $change) { diff --git a/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php b/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php index 94eab1f991..cc9958c586 100644 --- a/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php +++ b/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php @@ -63,7 +63,7 @@ public function process(File $phpcsFile, $stackPtr) $tokens = $phpcsFile->getTokens(); $token = $tokens[$stackPtr]; - // Skip for-loop without body. + // Skip if statement without body. if (isset($token['parenthesis_opener']) === false) { return; } diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index 6135e957cf..b629d872c5 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -828,7 +828,7 @@ protected function tokenize($string) && $tokens[($stackPtr + 2)][0] === T_STRING && strtolower($tokens[($stackPtr + 2)][1]) === 'from' ) { - // Could be multi-line, so just the token stack. + // Could be multi-line, so adjust the token stack. $token[0] = T_YIELD_FROM; $token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1]; @@ -960,7 +960,7 @@ protected function tokenize($string) /* Before PHP 7, the ??= operator was tokenized as T_INLINE_THEN, T_INLINE_THEN, T_EQUAL. - Between PHP 7.0 and 7.2, the ??= operator was tokenized as + Between PHP 7.0 and 7.3, the ??= operator was tokenized as T_COALESCE, T_EQUAL. So look for and combine these tokens in earlier versions. */ @@ -1372,7 +1372,7 @@ function return types. We want to keep the parenthesis map clean, if (is_array($tokens[$x]) === false && $tokens[$x] === '?') { // Found a nullable operator, so skip it. - // But also covert the token to save the tokenizer + // But also convert the token to save the tokenizer // a bit of time later on. $tokens[$x] = [ T_NULLABLE, diff --git a/tests/Core/File/IsReferenceTest.php b/tests/Core/File/IsReferenceTest.php index d6c37c6c1f..1c624118c4 100644 --- a/tests/Core/File/IsReferenceTest.php +++ b/tests/Core/File/IsReferenceTest.php @@ -16,7 +16,7 @@ class IsReferenceTest extends AbstractMethodUnitTest /** - * Test a class that extends another. + * Test correctly identifying whether a "bitwise and" token is a reference or not. * * @param string $identifier Comment which precedes the test case. * @param bool $expected Expected function output.