Skip to content

Commit

Permalink
Merge pull request #234 from PHPCSStandards/feature/minor-cs-tweaks
Browse files Browse the repository at this point in the history
CS: minor tweaks
  • Loading branch information
jrfnl authored Jun 17, 2023
2 parents 056ac4d + e401c6f commit 055056c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Universal/Sniffs/Classes/ModifierKeywordOrderSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use PHPCSUtils\Utils\ObjectDeclarations;

/**
Expand Down Expand Up @@ -177,7 +176,7 @@ private function handleError(File $phpcsFile, $firstKeyword, $secondKeyword)
$i = ($secondKeyword + 1);
while ($tokens[$i]['code'] === \T_WHITESPACE) {
$phpcsFile->fixer->replaceToken($i, '');
$i++;
++$i;
}

// Use the original token content as the case used for keywords is not the concern of this sniff.
Expand Down
2 changes: 1 addition & 1 deletion Universal/Sniffs/Constants/ModifierKeywordOrderSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private function handleError(File $phpcsFile, $firstKeyword, $secondKeyword)
$i = ($secondKeyword + 1);
while ($tokens[$i]['code'] === \T_WHITESPACE) {
$phpcsFile->fixer->replaceToken($i, '');
$i++;
++$i;
}

// Use the original token content as the case used for keywords is not the concern of this sniff.
Expand Down
2 changes: 1 addition & 1 deletion Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function process(File $phpcsFile, $stackPtr)
$this->tabWidth = Helper::getTabWidth($phpcsFile);
}

if (defined('PHP_CODESNIFFER_IN_TESTS')) {
if (\defined('PHP_CODESNIFFER_IN_TESTS')) {
$this->tabWidth = Helper::getCommandLineData($phpcsFile, 'tabWidth');
}

Expand Down

0 comments on commit 055056c

Please sign in to comment.