Skip to content

Commit 59d93d7

Browse files
authored
Merge pull request #673 from PHPCSStandards/feature/various-minor-doc-fixes
Docs: various minor fixes
2 parents 0011e8a + 2532a5f commit 59d93d7

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

PHPCSUtils/Internal/IsShortArrayOrList.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,13 @@ private function isSquareBracket()
352352
/**
353353
* Verify that the current set of brackets is not affected by known PHPCS cross-version tokenizer issues.
354354
*
355-
* List of current tokenizer issues which affect the short array/short list tokenization:
356-
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/pull/3632 PHPCS#3632} (PHPCS < 3.7.2)
357-
*
358355
* List of previous tokenizer issues which affected the short array/short list tokenization for reference:
359356
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/issues/1284 PHPCS#1284} (PHPCS < 2.8.1)
360357
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/issues/1381 PHPCS#1381} (PHPCS < 2.9.0)
361358
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/issues/1971 PHPCS#1971} (PHPCS 2.8.0 - 3.2.3)
362359
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/pull/3013 PHPCS#3013} (PHPCS < 3.5.6)
363360
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/pull/3172 PHPCS#3172} (PHPCS < 3.6.0)
361+
* - {@link https://github.com/squizlabs/PHP_CodeSniffer/pull/3632 PHPCS#3632} (PHPCS < 3.7.2)
364362
*
365363
* @since 1.0.0
366364
*
@@ -370,7 +368,7 @@ private function isSquareBracket()
370368
private function isShortArrayBracket()
371369
{
372370
if ($this->tokens[$this->opener]['code'] === \T_OPEN_SQUARE_BRACKET) {
373-
// Currently there are no known issues with the tokenization in PHPCS 3.9.0 and higher.
371+
// Currently there are no known issues with the tokenization in PHPCS.
374372
return false;
375373
}
376374

PHPCSUtils/Tokens/Collections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ final class Collections
383383
/**
384384
* OO scopes in which constants can be declared.
385385
*
386-
* Note: traits can only declare constants since PHP 8.2.
386+
* - PHP 8.2 added support for constants in traits.
387387
*
388388
* @since 1.0.0 Use the {@see Collections::ooConstantScopes()} method for access.
389389
*

PHPCSUtils/Utils/Namespaces.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static function getType(File $phpcsFile, $stackPtr)
116116
}
117117

118118
if (($tokens[$next]['code'] === \T_NS_SEPARATOR
119-
|| $tokens[$next]['code'] === \T_NAME_FULLY_QUALIFIED) // PHP 8.0 parse error.
119+
|| $tokens[$next]['code'] === \T_NAME_FULLY_QUALIFIED) // PHP >= 8.0 parse error.
120120
&& ($start !== $stackPtr
121121
|| $phpcsFile->findNext($findAfter, ($stackPtr + 1), null, false, null, true) !== false)
122122
) {

Tests/Utils/FileInfo/HasSheBangPHPAndUTF8BomTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
use PHPCSUtils\Utils\FileInfo;
1515

1616
/**
17-
* Tests for the \PHPCSUtils\Utils\FileInfo::hasSheBang() method.
17+
* Tests for the \PHPCSUtils\Utils\FileInfo::hasSheBang() and \PHPCSUtils\Utils\FileInfo::hasByteOrderMark() methods.
1818
*
19+
* @covers \PHPCSUtils\Utils\FileInfo::hasByteOrderMark
1920
* @covers \PHPCSUtils\Utils\FileInfo::hasSheBang
2021
*
2122
* @since 1.1.0

Tests/Utils/ObjectDeclarations/GetNameDiffTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static function dataGetNameNull()
9393
*
9494
* @param string $testMarker The comment which prefaces the target token in the test file.
9595
* @param string $expected Expected function output.
96-
* @param int|string|null $targetType Token type of the token to get as stackPtr.
96+
* @param int|string|null $targetType Optional. Token type of the token to get as stackPtr.
9797
*
9898
* @return void
9999
*/

phpcsutils-autoload.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* PHPCSUtils, utility functions and classes for PHP_CodeSniffer sniff developers.
44
*
55
* Autoloader for the PHPCSUtils files.
6-
* Also provides PHPCS cross-version class aliases.
76
*
87
* - If an external standard only supports PHPCS >= 3.1.0 and uses the PHPCS
98
* native unit test framework, this file does not need to be included.

0 commit comments

Comments
 (0)