diff --git a/src/Files/File.php b/src/Files/File.php index a15af762fc..ad1ca0b236 100644 --- a/src/Files/File.php +++ b/src/Files/File.php @@ -1798,7 +1798,7 @@ public function getMemberProperties($stackPtr) || $this->tokens[$ptr]['code'] === T_ENUM) ) { // T_VARIABLEs in interfaces/enums can actually be method arguments - // but they wont be seen as being inside the method because there + // but they won't be seen as being inside the method because there // are no scope openers and closers for abstract methods. If it is in // parentheses, we can be pretty sure it is a method argument. if (isset($this->tokens[$stackPtr]['nested_parenthesis']) === false diff --git a/src/Sniffs/AbstractArraySniff.php b/src/Sniffs/AbstractArraySniff.php index 141b9a133c..efe9969d8d 100644 --- a/src/Sniffs/AbstractArraySniff.php +++ b/src/Sniffs/AbstractArraySniff.php @@ -104,9 +104,9 @@ public function process(File $phpcsFile, $stackPtr) /** * Find next separator in array - either: comma or double arrow. * - * @param File $phpcsFile The current file being checked. - * @param int $ptr The position of current token. - * @param int $arrayEnd The token that ends the array definition. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $ptr The position of current token. + * @param int $arrayEnd The token that ends the array definition. * * @return int */ diff --git a/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php b/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php index d5c7ddb724..1c2b1aee93 100644 --- a/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php +++ b/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php @@ -31,8 +31,9 @@ public function register() /** * Processes this sniff, when one of its tokens is encountered. * - * @param File $phpcsFile The file being scanned. - * @param int $stackPtr The position of the current token in the stack passed in $tokens. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the stack + * passed in $tokens. * * @return void */ diff --git a/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php b/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php index 7a33bd9471..db67fb9428 100644 --- a/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php +++ b/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php @@ -21,14 +21,14 @@ class AnonClassDeclarationSniff extends ClassDeclarationSniff /** * The PSR2 MultiLineFunctionDeclarations sniff. * - * @var MultiLineFunctionDeclarationSniff + * @var \PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff */ private $multiLineSniff = null; /** * The Generic FunctionCallArgumentSpacing sniff. * - * @var FunctionCallArgumentSpacingSniff + * @var \PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\FunctionCallArgumentSpacingSniff */ private $functionCallSniff = null; diff --git a/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php b/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php index 79cb9f3f48..f3b5495d90 100644 --- a/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php +++ b/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php @@ -76,9 +76,9 @@ public function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) /** * Check for $this variable usage between $next and $end tokens. * - * @param File $phpcsFile The current file being scanned. - * @param int $next The position of the next token to check. - * @param int $end The position of the last token to check. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $next The position of the next token to check. + * @param int $end The position of the last token to check. * * @return void */ diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index 1dde9d1e82..3fc67b0c81 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -1223,7 +1223,7 @@ protected function tokenize($string) /* Tokenize the parameter labels for PHP 8.0 named parameters as a special T_PARAM_NAME - token and ensure that the colon after it is always T_COLON. + token and ensures that the colon after it is always T_COLON. */ if ($tokenIsArray === true diff --git a/src/Util/Common.php b/src/Util/Common.php index caf4db772b..ce7967cc33 100644 --- a/src/Util/Common.php +++ b/src/Util/Common.php @@ -372,7 +372,7 @@ public static function isCamelCaps( for ($i = 1; $i < $length; $i++) { $ascii = ord($string[$i]); if ($ascii >= 48 && $ascii <= 57) { - // The character is a number, so it cant be a capital. + // The character is a number, so it can't be a capital. $isCaps = false; } else { if (strtoupper($string[$i]) === $string[$i]) { diff --git a/tests/Core/Autoloader/DetermineLoadedClassTest.php b/tests/Core/Autoloader/DetermineLoadedClassTest.php index 2188fd700a..c0f38fa6f1 100644 --- a/tests/Core/Autoloader/DetermineLoadedClassTest.php +++ b/tests/Core/Autoloader/DetermineLoadedClassTest.php @@ -1,6 +1,6 @@ * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) diff --git a/tests/Core/File/FindStartOfStatementTest.php b/tests/Core/File/FindStartOfStatementTest.php index 464021f6fc..ff859eca1c 100644 --- a/tests/Core/File/FindStartOfStatementTest.php +++ b/tests/Core/File/FindStartOfStatementTest.php @@ -469,7 +469,7 @@ public function testNestedMatch() /** - * Test nested match expressions. + * Test PHP open tag. * * @return void */ @@ -485,7 +485,7 @@ public function testOpenTag() /** - * Test nested match expressions. + * Test PHP short open echo tag. * * @return void */ diff --git a/tests/Core/Tokenizer/AttributesTest.php b/tests/Core/Tokenizer/AttributesTest.php index 9d2746a9b8..8ac826f2f6 100644 --- a/tests/Core/Tokenizer/AttributesTest.php +++ b/tests/Core/Tokenizer/AttributesTest.php @@ -288,7 +288,7 @@ public function testAttributeAndLineComment() /** - * Test that attribute followed by a line comment is parsed correctly. + * Test that attributes on function declaration parameters are parsed correctly. * * @param string $testMarker The comment which prefaces the target token in the test file. * @param int $position The token position (starting from T_FUNCTION) of T_ATTRIBUTE token.