Skip to content

Commit 224b3a2

Browse files
committed
Merge branch 'feature/minor-docs-fixes' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 2ecd990 + e33a2f2 commit 224b3a2

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/Files/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2488,7 +2488,7 @@ public function hasCondition($stackPtr, $types)
24882488
* @param int $stackPtr The position of the token we are checking.
24892489
* @param int|string $type The type of token to search for.
24902490
* @param bool $first If TRUE, will return the matched condition
2491-
* furtherest away from the passed token.
2491+
* furthest away from the passed token.
24922492
* If FALSE, will return the matched condition
24932493
* closest to the passed token.
24942494
*

src/Fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public function addContentBefore($stackPtr, $content)
743743
* @param int $change The number of spaces to adjust the indent by
744744
* (positive or negative).
745745
*
746-
* @return bool If the change was accepted.
746+
* @return void
747747
*/
748748
public function changeCodeBlockIndent($start, $end, $change)
749749
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function process(File $phpcsFile, $stackPtr)
6363
$tokens = $phpcsFile->getTokens();
6464
$token = $tokens[$stackPtr];
6565

66-
// Skip for-loop without body.
66+
// Skip if statement without body.
6767
if (isset($token['parenthesis_opener']) === false) {
6868
return;
6969
}

src/Tokenizers/PHP.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ protected function tokenize($string)
908908
&& $tokens[($stackPtr + 2)][0] === T_STRING
909909
&& strtolower($tokens[($stackPtr + 2)][1]) === 'from'
910910
) {
911-
// Could be multi-line, so just the token stack.
911+
// Could be multi-line, so adjust the token stack.
912912
$token[0] = T_YIELD_FROM;
913913
$token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];
914914

@@ -1040,7 +1040,7 @@ protected function tokenize($string)
10401040
/*
10411041
Before PHP 7, the ??= operator was tokenized as
10421042
T_INLINE_THEN, T_INLINE_THEN, T_EQUAL.
1043-
Between PHP 7.0 and 7.2, the ??= operator was tokenized as
1043+
Between PHP 7.0 and 7.3, the ??= operator was tokenized as
10441044
T_COALESCE, T_EQUAL.
10451045
So look for and combine these tokens in earlier versions.
10461046
*/
@@ -1493,7 +1493,7 @@ function return types. We want to keep the parenthesis map clean,
14931493

14941494
if (is_array($tokens[$x]) === false && $tokens[$x] === '?') {
14951495
// Found a nullable operator, so skip it.
1496-
// But also covert the token to save the tokenizer
1496+
// But also convert the token to save the tokenizer
14971497
// a bit of time later on.
14981498
$tokens[$x] = [
14991499
T_NULLABLE,

tests/Core/File/IsReferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class IsReferenceTest extends AbstractMethodUnitTest
1616

1717

1818
/**
19-
* Test a class that extends another.
19+
* Test correctly identifying whether a "bitwise and" token is a reference or not.
2020
*
2121
* @param string $identifier Comment which precedes the test case.
2222
* @param bool $expected Expected function output.

0 commit comments

Comments
 (0)