Skip to content

Commit e33a2f2

Browse files
committed
Various minor documentation fixes
... picked up along the way.
1 parent d33a6a9 commit e33a2f2

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
@@ -2496,7 +2496,7 @@ public function hasCondition($stackPtr, $types)
24962496
* @param int $stackPtr The position of the token we are checking.
24972497
* @param int|string $type The type of token to search for.
24982498
* @param bool $first If TRUE, will return the matched condition
2499-
* furtherest away from the passed token.
2499+
* furthest away from the passed token.
25002500
* If FALSE, will return the matched condition
25012501
* closest to the passed token.
25022502
*

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
@@ -828,7 +828,7 @@ protected function tokenize($string)
828828
&& $tokens[($stackPtr + 2)][0] === T_STRING
829829
&& strtolower($tokens[($stackPtr + 2)][1]) === 'from'
830830
) {
831-
// Could be multi-line, so just the token stack.
831+
// Could be multi-line, so adjust the token stack.
832832
$token[0] = T_YIELD_FROM;
833833
$token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];
834834

@@ -960,7 +960,7 @@ protected function tokenize($string)
960960
/*
961961
Before PHP 7, the ??= operator was tokenized as
962962
T_INLINE_THEN, T_INLINE_THEN, T_EQUAL.
963-
Between PHP 7.0 and 7.2, the ??= operator was tokenized as
963+
Between PHP 7.0 and 7.3, the ??= operator was tokenized as
964964
T_COALESCE, T_EQUAL.
965965
So look for and combine these tokens in earlier versions.
966966
*/
@@ -1372,7 +1372,7 @@ function return types. We want to keep the parenthesis map clean,
13721372

13731373
if (is_array($tokens[$x]) === false && $tokens[$x] === '?') {
13741374
// Found a nullable operator, so skip it.
1375-
// But also covert the token to save the tokenizer
1375+
// But also convert the token to save the tokenizer
13761376
// a bit of time later on.
13771377
$tokens[$x] = [
13781378
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)