Skip to content
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 Build/php-cs-fixer/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
->setRiskyAllowed(true)
->setRules(
[
'@PER-CS2x0' => true,
'@PER-CS2x0:risky' => true,
'@PER-CS3x0' => true,
'@PER-CS3x0:risky' => true,

'@PHPUnit5x0Migration:risky' => true,
'@PHPUnit5x2Migration:risky' => true,
Expand Down
4 changes: 2 additions & 2 deletions src/RuleSet/RuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ public function addDeclaration(Declaration $declarationToAdd, ?Declaration $sibl
foreach ($this->declarations as $declarationsForAProperty) {
foreach ($declarationsForAProperty as $declaration) {
if (
$declaration->getLineNumber() === $siblingLineNumber &&
$declaration->getColumnNumber() >= $siblingColumnNumber
$declaration->getLineNumber() === $siblingLineNumber
&& $declaration->getColumnNumber() >= $siblingColumnNumber
) {
$declaration->setPosition($siblingLineNumber, $declaration->getColumnNumber() + 1);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Value/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ private static function parseColorFunction(ParserState $parserState): CSSFunctio

// With a `var` argument, the function can have fewer arguments.
// And as of CSS Color Module Level 4, the alpha argument is optional.
$canCloseNow =
$containsVar
$canCloseNow
= $containsVar
|| ($mayHaveOptionalAlpha && $argumentIndex >= $expectedArgumentCount - 2);
if ($canCloseNow && $parserState->comes(')')) {
break;
Expand Down
4 changes: 2 additions & 2 deletions tests/Comment/CommentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function stripCommentsFromOutput(): void

$expected1 = "\n"
. "@import url(\"some/url.css\") screen;\n\n"
. ".foo, #bar {\n" .
"\tbackground-color: #000;\n"
. ".foo, #bar {\n"
. "\tbackground-color: #000;\n"
. "}\n\n"
. "@media screen {\n"
. "\t#foo.bar {\n"
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/RuleSet/DeclarationListTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ public static function provideInitialPropertyNamesAndIndexOfOne(): array
foreach ($initialPropertyNamesSets as $setName => $data) {
$initialPropertyNames = $data[0];
for ($index = 0; $index < \count($initialPropertyNames); ++$index) {
$initialPropertyNamesAndIndexSets[$setName . ', index ' . $index] =
[$initialPropertyNames, $index];
$initialPropertyNamesAndIndexSets[$setName . ', index ' . $index]
= [$initialPropertyNames, $index];
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/Unit/Value/CSSStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ public function getArrayRepresentationIncludesContents(): void
*/
public function doesNotEscapeSingleQuotesThatDoNotNeedToBeEscaped(): void
{
$input = "data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none'" .
" xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd'" .
" d='M14.3145 2 3V11.9987H17.5687L18 8.20761H14.3145L14.32 6.31012C14.32 5.32134 14.4207" .
' 4.79153 15.9426 4.79153H17.977V1H14.7223C10.8129 1 9.43687 2.83909 9.43687 ' .
" 5.93187V8.20804H7V11.9991H9.43687V23H14.3145Z' fill='black'/%3E%3C/svg%3E%0A";
$input = "data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none'"
. " xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd'"
. " d='M14.3145 2 3V11.9987H17.5687L18 8.20761H14.3145L14.32 6.31012C14.32 5.32134 14.4207"
. ' 4.79153 15.9426 4.79153H17.977V1H14.7223C10.8129 1 9.43687 2.83909 9.43687 '
. " 5.93187V8.20804H7V11.9991H9.43687V23H14.3145Z' fill='black'/%3E%3C/svg%3E%0A";

$outputFormat = OutputFormat::createPretty();

Expand Down