Skip to content

Commit c07b4cc

Browse files
committed
Various minor doc fixes
... picked up along the way.
1 parent 0d143c0 commit c07b4cc

File tree

17 files changed

+29
-29
lines changed

17 files changed

+29
-29
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
@@ -228,7 +228,7 @@ public function fixFile()
228228
*
229229
* @return string
230230
*
231-
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException when the diff command fails.
231+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException When the diff command fails.
232232
*/
233233
public function generateDiff($filePath=null, $colors=true)
234234
{

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/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function register()
6363
* the token was found.
6464
*
6565
* @return int
66-
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jslint.js could not be run
66+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jslint.js could not be run.
6767
*/
6868
public function process(File $phpcsFile, $stackPtr)
6969
{

src/Standards/Generic/Sniffs/Debug/ESLintSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function register()
5454
* the token was found.
5555
*
5656
* @return int
57-
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jshint.js could not be run
57+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jshint.js could not be run.
5858
*/
5959
public function process(File $phpcsFile, $stackPtr)
6060
{

src/Standards/Generic/Sniffs/Debug/JSHintSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function register()
4848
* the token was found.
4949
*
5050
* @return int
51-
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jshint.js could not be run
51+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jshint.js could not be run.
5252
*/
5353
public function process(File $phpcsFile, $stackPtr)
5454
{

src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)
182182
/**
183183
* Returns the declaration names for classes/interfaces/functions with a namespace.
184184
*
185-
* @param array $tokens Token stack for this file
185+
* @param array $tokens Token stack for this file.
186186
* @param int $stackPtr The position where the namespace building will start.
187187
*
188188
* @return string

src/Standards/Squiz/Sniffs/Debug/JSLintSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function register()
4747
* the token was found.
4848
*
4949
* @return int
50-
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jslint.js could not be run
50+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jslint.js could not be run.
5151
*/
5252
public function process(File $phpcsFile, $stackPtr)
5353
{

src/Tokenizers/CSS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CSS extends PHP
2222
*
2323
* Pre-checks the content to see if it looks minified.
2424
*
25-
* @param string $content The content to tokenize,
25+
* @param string $content The content to tokenize.
2626
* @param \PHP_CodeSniffer\Config $config The config data for the run.
2727
* @param string $eolChar The EOL char used in the content.
2828
*

src/Tokenizers/JS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class JS extends Tokenizer
251251
*
252252
* Pre-checks the content to see if it looks minified.
253253
*
254-
* @param string $content The content to tokenize,
254+
* @param string $content The content to tokenize.
255255
* @param \PHP_CodeSniffer\Config $config The config data for the run.
256256
* @param string $eolChar The EOL char used in the content.
257257
*

src/Tokenizers/PHP.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3712,10 +3712,10 @@ public static function resolveSimpleToken($token)
37123712
* Finds a "closer" token (closing parenthesis or square bracket for example)
37133713
* Handle parenthesis balancing while searching for closing token
37143714
*
3715-
* @param array $tokens The list of tokens to iterate searching the closing token (as returned by token_get_all)
3716-
* @param int $start The starting position
3717-
* @param string|string[] $openerTokens The opening character
3718-
* @param string $closerChar The closing character
3715+
* @param array $tokens The list of tokens to iterate searching the closing token (as returned by token_get_all).
3716+
* @param int $start The starting position.
3717+
* @param string|string[] $openerTokens The opening character.
3718+
* @param string $closerChar The closing character.
37193719
*
37203720
* @return int|null The position of the closing token, if found. NULL otherwise.
37213721
*/
@@ -3749,8 +3749,8 @@ private function findCloser(array &$tokens, $start, $openerTokens, $closerChar)
37493749
* PHP 8 attributes parser for PHP < 8
37503750
* Handles single-line and multiline attributes.
37513751
*
3752-
* @param array $tokens The original array of tokens (as returned by token_get_all)
3753-
* @param int $stackPtr The current position in token array
3752+
* @param array $tokens The original array of tokens (as returned by token_get_all).
3753+
* @param int $stackPtr The current position in token array.
37543754
*
37553755
* @return array|null The array of parsed attribute tokens
37563756
*/

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
@@ -462,7 +462,7 @@ public function testReportWidthCalculations($reportWidth, $longOptions, $expecte
462462
/**
463463
* Data provider.
464464
*
465-
* @return array<string, array<string, int|string>>
465+
* @return array<string, array<string, int|string|array<string>>>
466466
*/
467467
public static function dataReportWidthCalculations()
468468
{
@@ -584,8 +584,8 @@ public static function dataColorizeVariableInput()
584584
/**
585585
* Test the various option types within a category get displayed correctly.
586586
*
587-
* @param array<string, array<string, string> $input The options to print.
588-
* @param array<string, string> $expectedRegex Regexes to validate expected output.
587+
* @param array<string, array<string, string>> $input The options to print.
588+
* @param array<string, string> $expectedRegex Regexes to validate expected output.
589589
*
590590
* @dataProvider dataPrintCategoryOptions
591591
*
@@ -619,8 +619,8 @@ public function testPrintCategoryOptionsNoColor($input, $expectedRegex)
619619
/**
620620
* Test the various option types within a category get displayed correctly.
621621
*
622-
* @param array<string, array<string, string> $input The options to print.
623-
* @param array<string, string> $expectedRegex Regexes to validate expected output.
622+
* @param array<string, array<string, string>> $input The options to print.
623+
* @param array<string, string> $expectedRegex Regexes to validate expected output.
624624
*
625625
* @dataProvider dataPrintCategoryOptions
626626
*

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
*/

tests/TestSuite7.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TestSuite extends PHPUnit_TestSuite
1919
/**
2020
* Runs the tests and collects their result in a TestResult.
2121
*
22-
* @param \PHPUnit\Framework\TestResult $result A test result.
22+
* @param \PHPUnit\Framework\TestResult|null $result A test result.
2323
*
2424
* @return \PHPUnit\Framework\TestResult
2525
*/

0 commit comments

Comments
 (0)