Skip to content

[TASK] Fix typos in comments and names and improve some comments #667

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
Aug 26, 2024
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
4 changes: 2 additions & 2 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ public function insertBefore($item, $sibling): void
* Removes an item from the CSS list.
*
* @param RuleSet|Import|Charset|CSSList $oItemToRemove
* May be a RuleSet (most likely a DeclarationBlock), a Import,
* a Charset or another CSSList (most likely a MediaQuery)
* May be a `RuleSet` (most likely a `DeclarationBlock`), an `Import`,
* a `Charset` or another `CSSList` (most likely a `MediaQuery`)
*
* @return bool whether the item was removed
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Value/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private static function parseUnicodeRangeValue(ParserState $oParserState): strin
$oParserState->consume('U+');
do {
if ($oParserState->comes('-')) {
$iCodepointMaxLength = 13; // Max length is 2 six digit code points + the dash(-) between them
$iCodepointMaxLength = 13; // Max length is 2 six-digit code points + the dash(-) between them
}
$sRange .= $oParserState->consume(1);
} while (\strlen($sRange) < $iCodepointMaxLength && \preg_match('/[A-Fa-f0-9\\?-]/', $oParserState->peek()));
Expand Down
6 changes: 3 additions & 3 deletions tests/CSSList/AtRuleBlockListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function provideMinWidthMediaRule(): array
/**
* @return array<string, array{0: string}>
*/
public static function provideSyntacticlyCorrectAtRule(): array
public static function provideSyntacticallyCorrectAtRule(): array
{
return [
'media print' => ['@media print { html { background: white; color: black; } }'],
Expand Down Expand Up @@ -107,9 +107,9 @@ public function parsesArgumentsOfMediaQueries(string $css): void
* @test
*
* @dataProvider provideMinWidthMediaRule
* @dataProvider provideSyntacticlyCorrectAtRule
* @dataProvider provideSyntacticallyCorrectAtRule
*/
public function parsesSyntacticlyCorrectAtRuleInStrictMode(string $css): void
public function parsesSyntacticallyCorrectAtRuleInStrictMode(string $css): void
{
$contents = (new Parser($css, Settings::create()->beStrict()))->parse()->getContents();

Expand Down
4 changes: 2 additions & 2 deletions tests/CSSList/DocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function setContentsReplacesContentsSetInPreviousCall(): void
/**
* @test
*/
public function insertContentBeforeInsertsContentBeforeSibbling(): void
public function insertContentBeforeInsertsContentBeforeSibling(): void
{
$bogusOne = new DeclarationBlock();
$bogusOne->setSelectors('.bogus-one');
Expand All @@ -115,7 +115,7 @@ public function insertContentBeforeInsertsContentBeforeSibbling(): void
/**
* @test
*/
public function insertContentBeforeAppendsIfSibblingNotFound(): void
public function insertContentBeforeAppendsIfSiblingNotFound(): void
{
$bogusOne = new DeclarationBlock();
$bogusOne->setSelectors('.bogus-one');
Expand Down
2 changes: 1 addition & 1 deletion tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function files(): void
}
if (\strpos($sFileName, '-') === 0) {
// Either a file which SHOULD fail (at least in strict mode)
// or a future test of a as-of-now missing feature
// or a future test of an as-of-now missing feature
continue;
}
$oParser = new Parser(\file_get_contents($sDirectory . '/' . $sFileName));
Expand Down