Skip to content

Commit

Permalink
Merge branch 'feature/minor-documentation-fixes' of https://github.co…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Dec 22, 2022
2 parents 4c5af31 + 51ebe2d commit c1f4295
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Sniffs/AbstractArraySniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Tokenizers/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Util/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Autoloader/DetermineLoadedClassTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Tests for the \PHP_CodeSniffer\Util\Common::isCamelCaps method.
* Tests for the \PHP_CodeSniffer\Autoload::determineLoadedClass method.
*
* @author Greg Sherwood <[email protected]>
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/File/FindStartOfStatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public function testNestedMatch()


/**
* Test nested match expressions.
* Test PHP open tag.
*
* @return void
*/
Expand All @@ -485,7 +485,7 @@ public function testOpenTag()


/**
* Test nested match expressions.
* Test PHP short open echo tag.
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Tokenizer/AttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c1f4295

Please sign in to comment.