From f6feb879e1e6ff7bb87c147310c8bc4a38b49d65 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 31 Oct 2024 15:09:10 +0100 Subject: [PATCH] [CLEANUP] Autoformat the code (#748) --- src/Parsing/ParserState.php | 1 - src/Value/Size.php | 19 +++++++++++---- tests/CSSList/AtRuleBlockListTest.php | 22 +++++++++-------- tests/ParserTest.php | 5 +++- tests/Value/SizeTest.php | 34 ++++++++++++++++++++++----- 5 files changed, 59 insertions(+), 22 deletions(-) diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index b69e1309..fa146d7e 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -117,7 +117,6 @@ public function getSettings() return $this->oParserSettings; } - public function anchor(): Anchor { return new Anchor($this->iCurrentPosition, $this); diff --git a/src/Value/Size.php b/src/Value/Size.php index 31574720..0ba4bd66 100644 --- a/src/Value/Size.php +++ b/src/Value/Size.php @@ -20,10 +20,21 @@ class Size extends PrimitiveValue * @var array */ 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', ]; /** diff --git a/tests/CSSList/AtRuleBlockListTest.php b/tests/CSSList/AtRuleBlockListTest.php index f996ff82..73e6c38b 100644 --- a/tests/CSSList/AtRuleBlockListTest.php +++ b/tests/CSSList/AtRuleBlockListTest.php @@ -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; - } - } - '], + ', + ], ]; } diff --git a/tests/ParserTest.php b/tests/ParserTest.php index dcbcc1c0..e57511ff 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -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()); } diff --git a/tests/Value/SizeTest.php b/tests/Value/SizeTest.php index 6a05c3e9..d4c5438a 100644 --- a/tests/Value/SizeTest.php +++ b/tests/Value/SizeTest.php @@ -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(