diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index a92d57d7..f55e0f05 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -15,7 +15,6 @@ use Sabberworm\CSS\Property\CSSNamespace; use Sabberworm\CSS\Property\Import; use Sabberworm\CSS\Property\Selector; -use Sabberworm\CSS\Renderable; use Sabberworm\CSS\RuleSet\AtRuleSet; use Sabberworm\CSS\RuleSet\DeclarationBlock; use Sabberworm\CSS\RuleSet\RuleSet; diff --git a/src/Position/Positionable.php b/src/Position/Positionable.php index 124752fe..e4e9d0ab 100644 --- a/src/Position/Positionable.php +++ b/src/Position/Positionable.php @@ -17,9 +17,9 @@ interface Positionable public function getLineNumber(): ?int; /** - * @deprecated in version 9.0.0, will be removed in v10.0. Use `getLineNumber()` instead. - * * @return int<0, max> + * + * @deprecated in version 9.0.0, will be removed in v10.0. Use `getLineNumber()` instead. */ public function getLineNo(): int; @@ -29,9 +29,9 @@ public function getLineNo(): int; public function getColumnNumber(): ?int; /** - * @deprecated in version 9.0.0, will be removed in v10.0. Use `getColumnNumber()` instead. - * * @return int<0, max> + * + * @deprecated in version 9.0.0, will be removed in v10.0. Use `getColumnNumber()` instead. */ public function getColNo(): int; diff --git a/src/Property/AtRule.php b/src/Property/AtRule.php index 8b0d41a1..49a160a1 100644 --- a/src/Property/AtRule.php +++ b/src/Property/AtRule.php @@ -4,9 +4,7 @@ namespace Sabberworm\CSS\Property; -use Sabberworm\CSS\Comment\Commentable; use Sabberworm\CSS\CSSList\CSSListItem; -use Sabberworm\CSS\Renderable; /** * Note that `CSSListItem` extends both `Commentable` and `Renderable`, diff --git a/src/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php index fc597ea0..8c711cf9 100644 --- a/src/RuleSet/RuleSet.php +++ b/src/RuleSet/RuleSet.php @@ -10,7 +10,6 @@ use Sabberworm\CSS\Parsing\ParserState; use Sabberworm\CSS\Parsing\UnexpectedEOFException; use Sabberworm\CSS\Parsing\UnexpectedTokenException; -use Sabberworm\CSS\Renderable; use Sabberworm\CSS\Rule\Rule; /** diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 7d1b528c..f0fee35b 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -980,11 +980,11 @@ public function lineNumbersParsing(): void // So a more explicit type check is required. // TODO: tidy this up when an interface with `getLineNo()` is added. if ( - !$contentItem instanceof Charset && - !$contentItem instanceof CSSList && - !$contentItem instanceof CSSNamespace && - !$contentItem instanceof Import && - !$contentItem instanceof RuleSet + !$contentItem instanceof Charset + && !$contentItem instanceof CSSList + && !$contentItem instanceof CSSNamespace + && !$contentItem instanceof Import + && !$contentItem instanceof RuleSet ) { self::fail('Content item is not of an expected type. It\'s a `' . \get_class($contentItem) . '`.'); } @@ -992,8 +992,8 @@ public function lineNumbersParsing(): void if ($contentItem instanceof KeyFrame) { foreach ($contentItem->getContents() as $block) { if ( - !$block instanceof CSSList && - !$block instanceof RuleSet + !$block instanceof CSSList + && !$block instanceof RuleSet ) { self::fail( 'KeyFrame content item is not of an expected type. It\'s a `' . \get_class($block) . '`.' diff --git a/tests/Unit/Comment/CommentContainerTest.php b/tests/Unit/Comment/CommentContainerTest.php index a29691b9..80bd6be2 100644 --- a/tests/Unit/Comment/CommentContainerTest.php +++ b/tests/Unit/Comment/CommentContainerTest.php @@ -42,10 +42,12 @@ public function provideCommentArray(): array return [ 'no comment' => [[]], 'one comment' => [[new Comment('Is this really a spoon?')]], - 'two comments' => [[ - new Comment('I’m a teapot.'), - new Comment('I’m a cafetière.'), - ]], + 'two comments' => [ + [ + new Comment('I’m a teapot.'), + new Comment('I’m a cafetière.'), + ], + ], ]; } @@ -87,10 +89,12 @@ public function provideAlternativeCommentArray(): array return [ 'no comment' => [[]], 'one comment' => [[new Comment('Can I eat it with my hands?')]], - 'two comments' => [[ - new Comment('I’m a beer barrel.'), - new Comment('I’m a vineyard.'), - ]], + 'two comments' => [ + [ + new Comment('I’m a beer barrel.'), + new Comment('I’m a vineyard.'), + ], + ], ]; }