Skip to content

Commit

Permalink
Various minor documentation fixes
Browse files Browse the repository at this point in the history
... picked up along the way.
  • Loading branch information
jrfnl committed Aug 30, 2020
1 parent d33a6a9 commit e33a2f2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ public function hasCondition($stackPtr, $types)
* @param int $stackPtr The position of the token we are checking.
* @param int|string $type The type of token to search for.
* @param bool $first If TRUE, will return the matched condition
* furtherest away from the passed token.
* furthest away from the passed token.
* If FALSE, will return the matched condition
* closest to the passed token.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ public function addContentBefore($stackPtr, $content)
* @param int $change The number of spaces to adjust the indent by
* (positive or negative).
*
* @return bool If the change was accepted.
* @return void
*/
public function changeCodeBlockIndent($start, $end, $change)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function process(File $phpcsFile, $stackPtr)
$tokens = $phpcsFile->getTokens();
$token = $tokens[$stackPtr];

// Skip for-loop without body.
// Skip if statement without body.
if (isset($token['parenthesis_opener']) === false) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Tokenizers/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ protected function tokenize($string)
&& $tokens[($stackPtr + 2)][0] === T_STRING
&& strtolower($tokens[($stackPtr + 2)][1]) === 'from'
) {
// Could be multi-line, so just the token stack.
// Could be multi-line, so adjust the token stack.
$token[0] = T_YIELD_FROM;
$token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];

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

if (is_array($tokens[$x]) === false && $tokens[$x] === '?') {
// Found a nullable operator, so skip it.
// But also covert the token to save the tokenizer
// But also convert the token to save the tokenizer
// a bit of time later on.
$tokens[$x] = [
T_NULLABLE,
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/File/IsReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class IsReferenceTest extends AbstractMethodUnitTest


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

0 comments on commit e33a2f2

Please sign in to comment.