From 58fcc09fc1c098e9c4933e6cb7c2767ae8b5ba77 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 13 Nov 2025 10:17:12 +0100 Subject: [PATCH] [CLEANUP] Reformat the code with the PER-2 configuration --- src/Comment/Comment.php | 2 +- src/RuleSet/DeclarationBlock.php | 12 ++++++------ tests/OutputFormatTest.php | 24 ++++++++++++------------ tests/Unit/Value/CalcFunctionTest.php | 1 + 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/Comment/Comment.php b/src/Comment/Comment.php index 33188988f..6f29682c2 100644 --- a/src/Comment/Comment.php +++ b/src/Comment/Comment.php @@ -5,9 +5,9 @@ namespace Sabberworm\CSS\Comment; use Sabberworm\CSS\OutputFormat; -use Sabberworm\CSS\Renderable; use Sabberworm\CSS\Position\Position; use Sabberworm\CSS\Position\Positionable; +use Sabberworm\CSS\Renderable; class Comment implements Positionable, Renderable { diff --git a/src/RuleSet/DeclarationBlock.php b/src/RuleSet/DeclarationBlock.php index 6e2e1a60d..2cd2ef997 100644 --- a/src/RuleSet/DeclarationBlock.php +++ b/src/RuleSet/DeclarationBlock.php @@ -190,9 +190,9 @@ public function addRule(Rule $ruleToAdd, ?Rule $sibling = null): void } /** - * @see RuleSet::getRules() - * * @return array, Rule> + * + * @see RuleSet::getRules() */ public function getRules(?string $searchPattern = null): array { @@ -200,9 +200,9 @@ public function getRules(?string $searchPattern = null): array } /** - * @see RuleSet::setRules() - * * @param array $rules + * + * @see RuleSet::setRules() */ public function setRules(array $rules): void { @@ -210,9 +210,9 @@ public function setRules(array $rules): void } /** - * @see RuleSet::getRulesAssoc() - * * @return array + * + * @see RuleSet::getRulesAssoc() */ public function getRulesAssoc(?string $searchPattern = null): array { diff --git a/tests/OutputFormatTest.php b/tests/OutputFormatTest.php index 6167e796b..20c463e14 100644 --- a/tests/OutputFormatTest.php +++ b/tests/OutputFormatTest.php @@ -16,18 +16,18 @@ final class OutputFormatTest extends TestCase { private const TEST_CSS = "\n" - . ".main, .test {\n" - . "\tfont: italic normal bold 16px/1.2 \"Helvetica\", Verdana, sans-serif;\n" - . "\tbackground: white;\n" - . "}\n" - . "\n" - . "@media screen {\n" - . "\t.main {\n" - . "\t\tbackground-size: 100% 100%;\n" - . "\t\tfont-size: 1.3em;\n" - . "\t\tbackground-color: #fff;\n" - . "\t}\n" - . "}\n"; + . ".main, .test {\n" + . "\tfont: italic normal bold 16px/1.2 \"Helvetica\", Verdana, sans-serif;\n" + . "\tbackground: white;\n" + . "}\n" + . "\n" + . "@media screen {\n" + . "\t.main {\n" + . "\t\tbackground-size: 100% 100%;\n" + . "\t\tfont-size: 1.3em;\n" + . "\t\tbackground-color: #fff;\n" + . "\t}\n" + . "}\n"; /** * @var Parser diff --git a/tests/Unit/Value/CalcFunctionTest.php b/tests/Unit/Value/CalcFunctionTest.php index f4907d477..65f23e131 100644 --- a/tests/Unit/Value/CalcFunctionTest.php +++ b/tests/Unit/Value/CalcFunctionTest.php @@ -47,6 +47,7 @@ public function parseSimpleCalc(): void self::assertSame(20.0, $components[2]->getSize()); self::assertSame('px', $components[2]->getUnit()); } + /** * @test */