Skip to content

Commit

Permalink
[CLEANUP] Autoformat the code (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee authored Oct 31, 2024
1 parent 7a29455 commit f6feb87
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public function getSettings()
return $this->oParserSettings;
}


public function anchor(): Anchor
{
return new Anchor($this->iCurrentPosition, $this);
Expand Down
19 changes: 15 additions & 4 deletions src/Value/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,21 @@ class Size extends PrimitiveValue
* @var array<int, string>
*/
private const ABSOLUTE_SIZE_UNITS = [
'px', 'pt', 'pc',
'cm', 'mm', 'mozmm', 'in',
'vh', 'dvh', 'svh', 'lvh',
'vw', 'vmin', 'vmax', 'rem',
'px',
'pt',
'pc',
'cm',
'mm',
'mozmm',
'in',
'vh',
'dvh',
'svh',
'lvh',
'vw',
'vmin',
'vmax',
'rem',
];

/**
Expand Down
22 changes: 12 additions & 10 deletions tests/CSSList/AtRuleBlockListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@ public static function provideSyntacticallyCorrectAtRule(): array
return [
'media print' => ['@media print { html { background: white; color: black; } }'],
'keyframes' => ['@keyframes mymove { from { top: 0px; } }'],
'supports' => ['
@supports (display: flex) {
.flex-container > * {
text-shadow: 0 0 2px blue;
float: none;
'supports' => [
'
@supports (display: flex) {
.flex-container > * {
text-shadow: 0 0 2px blue;
float: none;
}
.flex-container {
display: flex;
}
}
.flex-container {
display: flex;
}
}
'],
',
],
];
}

Expand Down
5 changes: 4 additions & 1 deletion tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,10 @@ public function emptyGridLineNameLenientInFile(): void
*/
public function invalidGridLineNameInFile(): void
{
$document = self::parsedStructureForFile('invalid-grid-linename', Settings::create()->withMultibyteSupport(true));
$document = self::parsedStructureForFile(
'invalid-grid-linename',
Settings::create()->withMultibyteSupport(true)
);
$expected = 'div {}';
self::assertSame($expected, $document->render());
}
Expand Down
34 changes: 28 additions & 6 deletions tests/Value/SizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,34 @@ final class SizeTest extends TestCase
public static function provideUnit(): array
{
$units = [
'px', 'pt', 'pc',
'cm', 'mm', 'mozmm', 'in',
'vh', 'dvh', 'svh', 'lvh',
'vw', 'vmin', 'vmax', 'rem',
'%', 'em', 'ex', 'ch', 'fr',
'deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz',
'px',
'pt',
'pc',
'cm',
'mm',
'mozmm',
'in',
'vh',
'dvh',
'svh',
'lvh',
'vw',
'vmin',
'vmax',
'rem',
'%',
'em',
'ex',
'ch',
'fr',
'deg',
'grad',
'rad',
's',
'ms',
'turn',
'Hz',
'kHz',
];

return \array_combine(
Expand Down

0 comments on commit f6feb87

Please sign in to comment.