Skip to content

Various minor fixes / typos #1137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Ruleset.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function explain()
}//end foreach

if (count($this->deprecatedSniffs) > 0) {
echo PHP_EOL.'* Sniffs marked with an asterix are deprecated.'.PHP_EOL;
echo PHP_EOL.'* Sniffs marked with an asterisk are deprecated.'.PHP_EOL;
}

}//end explain()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function process(File $phpcsFile, $stackPtr)
return;
}

// If it is not an array check what is inside.
// If it is not an array, check what is inside.
$found = $phpcsFile->findPrevious(
T_VARIABLE,
($previousIndex - 1),
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/Files/File/FindStartOfStatementTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Tests for the \PHP_CodeSniffer\Files\File:findStartOfStatement method.
* Tests for the \PHP_CodeSniffer\Files\File::findStartOfStatement method.
*
* @author Greg Sherwood <[email protected]>
* @author Juliette Reinders Folmer <[email protected]>
Expand All @@ -15,7 +15,7 @@
use PHP_CodeSniffer\Util\Tokens;

/**
* Tests for the \PHP_CodeSniffer\Files\File:findStartOfStatement method.
* Tests for the \PHP_CodeSniffer\Files\File::findStartOfStatement method.
*
* @covers \PHP_CodeSniffer\Files\File::findStartOfStatement
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Ruleset/ExplainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function testExplainWithDeprecatedSniffs()
$expected .= ' TestStandard.SetProperty.PropertyTypeHandling'.PHP_EOL;
$expected .= ' TestStandard.ValidSniffs.RegisterEmptyArray'.PHP_EOL.PHP_EOL;

$expected .= '* Sniffs marked with an asterix are deprecated.'.PHP_EOL;
$expected .= '* Sniffs marked with an asterisk are deprecated.'.PHP_EOL;

$this->expectOutputString($expected);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ switch (true) {
case CONSTANT:
/* testCaseWithConstantAndIdenticalIsNotEnumCase */
case CONSTANT === 1:
/* testCaseWithAssigmentToConstantIsNotEnumCase */
/* testCaseWithAssignmentToConstantIsNotEnumCase */
case CONSTANT = 1:
/* testIsNotEnumCaseIsCaseInsensitive */
cAsE CONSTANT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static function dataNotEnumCases()
'testCloserMarker' => '/* testCaseConstantCloserMarker */',
],
'switch case with constant, assignment' => [
'testMarker' => '/* testCaseWithAssigmentToConstantIsNotEnumCase */',
'testMarker' => '/* testCaseWithAssignmentToConstantIsNotEnumCase */',
'expectedTokens' => [
'scope_opener' => T_COLON,
'scope_closer' => T_CLOSE_CURLY_BRACKET,
Expand Down