Skip to content

Commit

Permalink
Merge pull request #670 from PHPCSStandards/feature/various-small-tweaks
Browse files Browse the repository at this point in the history
CS/Docs: various small tweaks
  • Loading branch information
jrfnl authored Nov 12, 2024
2 parents be5dfdc + fcf7fdd commit d228eb4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Reports/Code.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function generateFileReport($report, File $phpcsFile, $showSources=false,
return false;
}

// How many lines to show about and below the error line.
// How many lines to show above and below the error line.
$surroundingLines = 2;

$file = $report['filename'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;

/**
* Unit test class for the LanguageConstructSpacing sniff.
* Unit test class for the HereNowdocIdentifierSpacing sniff.
*
* @covers \PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\HereNowdocIdentifierSpacingSniff
*/
Expand Down
2 changes: 0 additions & 2 deletions tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,6 @@ public function testNamespaceOperatorInTypes()
*/
public function testKeywordReturnTypes($testMarker)
{
$tokens = $this->phpcsFile->getTokens();

$token = $this->getTargetToken($testMarker, T_FN);
$this->backfillHelper($token);
$this->scopePositionTestHelper($token, 11, 14);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ public function testDNFTypeParentheses($testMarker)
$this->assertArrayHasKey('parenthesis_closer', $closer, 'Parenthesis closer is not set');
$this->assertSame($closePtr, $closer['parenthesis_closer'], 'Parenthesis closer is not the expected token');

$intersectionCount = 0;
for ($i = ($openPtr + 1); $i < $closePtr; $i++) {
$this->assertArrayHasKey('nested_parenthesis', $tokens[$i], "Nested parenthesis key not set on token $i ({$tokens[$i]['type']})");
$this->assertArrayHasKey($openPtr, $tokens[$i]['nested_parenthesis'], 'Nested parenthesis is missing target parentheses set');
Expand Down

0 comments on commit d228eb4

Please sign in to comment.