Skip to content

Commit 90210e6

Browse files
committed
Various minor doc fixes
... picked up along the way.
1 parent 9083ffc commit 90210e6

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public static function getLoadedClassName($path)
298298
*
299299
* @param string $class The name of the class.
300300
*
301-
* @throws \Exception If the class name has not been loaded
301+
* @throws \Exception If the class name has not been loaded.
302302
* @return string
303303
*/
304304
public static function getLoadedFileName($class)

src/Fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function fixFile()
225225
*
226226
* @return string
227227
*
228-
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException when the diff command fails.
228+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException When the diff command fails.
229229
*/
230230
public function generateDiff($filePath=null, $colors=true)
231231
{

src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function process(File $phpcsFile, $stackPtr)
101101
* Get all used variables in the incrementer part of a for statement.
102102
*
103103
* @param array<int, array> $tokens Array with all code sniffer tokens.
104-
* @param array<string, mixed> $token Current for loop token
104+
* @param array<string, mixed> $token Current for loop token.
105105
*
106106
* @return string[] List of all found incrementer variables.
107107
*/

src/Tokenizers/PHP.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3538,10 +3538,10 @@ public static function resolveSimpleToken($token)
35383538
* Finds a "closer" token (closing parenthesis or square bracket for example)
35393539
* Handle parenthesis balancing while searching for closing token
35403540
*
3541-
* @param array $tokens The list of tokens to iterate searching the closing token (as returned by token_get_all)
3542-
* @param int $start The starting position
3543-
* @param string|string[] $openerTokens The opening character
3544-
* @param string $closerChar The closing character
3541+
* @param array $tokens The list of tokens to iterate searching the closing token (as returned by token_get_all).
3542+
* @param int $start The starting position.
3543+
* @param string|string[] $openerTokens The opening character.
3544+
* @param string $closerChar The closing character.
35453545
*
35463546
* @return int|null The position of the closing token, if found. NULL otherwise.
35473547
*/
@@ -3575,8 +3575,8 @@ private function findCloser(array &$tokens, $start, $openerTokens, $closerChar)
35753575
* PHP 8 attributes parser for PHP < 8
35763576
* Handles single-line and multiline attributes.
35773577
*
3578-
* @param array $tokens The original array of tokens (as returned by token_get_all)
3579-
* @param int $stackPtr The current position in token array
3578+
* @param array $tokens The original array of tokens (as returned by token_get_all).
3579+
* @param int $stackPtr The current position in token array.
35803580
*
35813581
* @return array|null The array of parsed attribute tokens
35823582
*/

src/Tokenizers/Tokenizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ abstract class Tokenizer
7676
/**
7777
* Initialise and run the tokenizer.
7878
*
79-
* @param string $content The content to tokenize,
79+
* @param string $content The content to tokenize.
8080
* @param \PHP_CodeSniffer\Config | null $config The config data for the run.
8181
* @param string $eolChar The EOL char used in the content.
8282
*

tests/Core/Tokenizer/BackfillExplicitOctalNotationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class BackfillExplicitOctalNotationTest extends AbstractTokenizerTestCase
1717
* Test that explicitly-defined octal values are tokenized as a single number and not as a number and a string.
1818
*
1919
* @param string $marker The comment which prefaces the target token in the test file.
20-
* @param string $value The expected content of the token
20+
* @param string $value The expected content of the token.
2121
* @param int|string $nextToken The expected next token.
2222
* @param string $nextContent The expected content of the next token.
2323
*

tests/Core/Tokenizer/TypedConstantsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public static function dataUntypedConstant()
109109
/**
110110
* Test the tokens in the type of a typed constant as well as the constant name are tokenized correctly.
111111
*
112-
* @param string $testMarker The comment prefacing the target token.
113-
* @param string $sequence The expected token sequence.
112+
* @param string $testMarker The comment prefacing the target token.
113+
* @param array<int|string> $sequence The expected token sequence.
114114
*
115115
* @dataProvider dataTypedConstant
116116
* @dataProvider dataNullableTypedConstant
@@ -151,7 +151,7 @@ public function testTypedConstant($testMarker, array $sequence)
151151
*
152152
* @see testTypedConstant()
153153
*
154-
* @return array<string, array<string, string>>
154+
* @return array<string, array<string, string|array<int|string>>>
155155
*/
156156
public static function dataTypedConstant()
157157
{

tests/Core/Util/HelpTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public function testReportWidthCalculations($reportWidth, $longOptions, $expecte
454454
/**
455455
* Data provider.
456456
*
457-
* @return array<string, array<string, int|string>>
457+
* @return array<string, array<string, int|string|array<string>>>
458458
*/
459459
public static function dataReportWidthCalculations()
460460
{
@@ -576,8 +576,8 @@ public static function dataColorizeVariableInput()
576576
/**
577577
* Test the various option types within a category get displayed correctly.
578578
*
579-
* @param array<string, array<string, string> $input The options to print.
580-
* @param array<string, string> $expectedRegex Regexes to validate expected output.
579+
* @param array<string, array<string, string>> $input The options to print.
580+
* @param array<string, string> $expectedRegex Regexes to validate expected output.
581581
*
582582
* @dataProvider dataPrintCategoryOptions
583583
*
@@ -611,8 +611,8 @@ public function testPrintCategoryOptionsNoColor($input, $expectedRegex)
611611
/**
612612
* Test the various option types within a category get displayed correctly.
613613
*
614-
* @param array<string, array<string, string> $input The options to print.
615-
* @param array<string, string> $expectedRegex Regexes to validate expected output.
614+
* @param array<string, array<string, string>> $input The options to print.
615+
* @param array<string, string> $expectedRegex Regexes to validate expected output.
616616
*
617617
* @dataProvider dataPrintCategoryOptions
618618
*

tests/Core/Util/SuggestTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Tests for the \PHP_CodeSniffer\Util\Sniffs\Comments::suggestType() method.
3+
* Tests for the \PHP_CodeSniffer\Util\Sniffs\Common::suggestType() method.
44
*
55
* @author Juliette Reinders Folmer <[email protected]>
66
* @copyright 2019 Juliette Reinders Folmer. All rights reserved.
@@ -13,7 +13,7 @@
1313
use PHPUnit\Framework\TestCase;
1414

1515
/**
16-
* Tests for the \PHP_CodeSniffer\Util\Sniffs\Comments::suggestType() method.
16+
* Tests for the \PHP_CodeSniffer\Util\Sniffs\Common::suggestType() method.
1717
*
1818
* @covers \PHP_CodeSniffer\Util\Common::suggestType
1919
*/

0 commit comments

Comments
 (0)