Skip to content

Commit c1f4295

Browse files
committed
Merge branch 'feature/minor-documentation-fixes' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 4c5af31 + 51ebe2d commit c1f4295

File tree

10 files changed

+18
-17
lines changed

10 files changed

+18
-17
lines changed

src/Files/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,7 @@ public function getMemberProperties($stackPtr)
17981798
|| $this->tokens[$ptr]['code'] === T_ENUM)
17991799
) {
18001800
// T_VARIABLEs in interfaces/enums can actually be method arguments
1801-
// but they wont be seen as being inside the method because there
1801+
// but they won't be seen as being inside the method because there
18021802
// are no scope openers and closers for abstract methods. If it is in
18031803
// parentheses, we can be pretty sure it is a method argument.
18041804
if (isset($this->tokens[$stackPtr]['nested_parenthesis']) === false

src/Sniffs/AbstractArraySniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public function process(File $phpcsFile, $stackPtr)
104104
/**
105105
* Find next separator in array - either: comma or double arrow.
106106
*
107-
* @param File $phpcsFile The current file being checked.
108-
* @param int $ptr The position of current token.
109-
* @param int $arrayEnd The token that ends the array definition.
107+
* @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked.
108+
* @param int $ptr The position of current token.
109+
* @param int $arrayEnd The token that ends the array definition.
110110
*
111111
* @return int
112112
*/

src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ public function register()
3131
/**
3232
* Processes this sniff, when one of its tokens is encountered.
3333
*
34-
* @param File $phpcsFile The file being scanned.
35-
* @param int $stackPtr The position of the current token in the stack passed in $tokens.
34+
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
35+
* @param int $stackPtr The position of the current token in the stack
36+
* passed in $tokens.
3637
*
3738
* @return void
3839
*/

src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ class AnonClassDeclarationSniff extends ClassDeclarationSniff
2121
/**
2222
* The PSR2 MultiLineFunctionDeclarations sniff.
2323
*
24-
* @var MultiLineFunctionDeclarationSniff
24+
* @var \PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff
2525
*/
2626
private $multiLineSniff = null;
2727

2828
/**
2929
* The Generic FunctionCallArgumentSpacing sniff.
3030
*
31-
* @var FunctionCallArgumentSpacingSniff
31+
* @var \PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\FunctionCallArgumentSpacingSniff
3232
*/
3333
private $functionCallSniff = null;
3434

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope)
7676
/**
7777
* Check for $this variable usage between $next and $end tokens.
7878
*
79-
* @param File $phpcsFile The current file being scanned.
80-
* @param int $next The position of the next token to check.
81-
* @param int $end The position of the last token to check.
79+
* @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned.
80+
* @param int $next The position of the next token to check.
81+
* @param int $end The position of the last token to check.
8282
*
8383
* @return void
8484
*/

src/Tokenizers/PHP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ protected function tokenize($string)
12231223

12241224
/*
12251225
Tokenize the parameter labels for PHP 8.0 named parameters as a special T_PARAM_NAME
1226-
token and ensure that the colon after it is always T_COLON.
1226+
token and ensures that the colon after it is always T_COLON.
12271227
*/
12281228

12291229
if ($tokenIsArray === true

src/Util/Common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public static function isCamelCaps(
372372
for ($i = 1; $i < $length; $i++) {
373373
$ascii = ord($string[$i]);
374374
if ($ascii >= 48 && $ascii <= 57) {
375-
// The character is a number, so it cant be a capital.
375+
// The character is a number, so it can't be a capital.
376376
$isCaps = false;
377377
} else {
378378
if (strtoupper($string[$i]) === $string[$i]) {

tests/Core/Autoloader/DetermineLoadedClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Tests for the \PHP_CodeSniffer\Util\Common::isCamelCaps method.
3+
* Tests for the \PHP_CodeSniffer\Autoload::determineLoadedClass method.
44
*
55
* @author Greg Sherwood <gsherwood@squiz.net>
66
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)

tests/Core/File/FindStartOfStatementTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ public function testNestedMatch()
469469

470470

471471
/**
472-
* Test nested match expressions.
472+
* Test PHP open tag.
473473
*
474474
* @return void
475475
*/
@@ -485,7 +485,7 @@ public function testOpenTag()
485485

486486

487487
/**
488-
* Test nested match expressions.
488+
* Test PHP short open echo tag.
489489
*
490490
* @return void
491491
*/

tests/Core/Tokenizer/AttributesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function testAttributeAndLineComment()
288288

289289

290290
/**
291-
* Test that attribute followed by a line comment is parsed correctly.
291+
* Test that attributes on function declaration parameters are parsed correctly.
292292
*
293293
* @param string $testMarker The comment which prefaces the target token in the test file.
294294
* @param int $position The token position (starting from T_FUNCTION) of T_ATTRIBUTE token.

0 commit comments

Comments
 (0)