Skip to content

Commit 2f216f1

Browse files
committed
[CLEANUP] Autoformat the code and drop unused imports
1 parent db60032 commit 2f216f1

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

src/CSSList/CSSList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Sabberworm\CSS\Property\CSSNamespace;
1616
use Sabberworm\CSS\Property\Import;
1717
use Sabberworm\CSS\Property\Selector;
18-
use Sabberworm\CSS\Renderable;
1918
use Sabberworm\CSS\RuleSet\AtRuleSet;
2019
use Sabberworm\CSS\RuleSet\DeclarationBlock;
2120
use Sabberworm\CSS\RuleSet\RuleSet;

src/Position/Positionable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ interface Positionable
1717
public function getLineNumber(): ?int;
1818

1919
/**
20-
* @deprecated in version 9.0.0, will be removed in v10.0. Use `getLineNumber()` instead.
21-
*
2220
* @return int<0, max>
21+
*
22+
* @deprecated in version 9.0.0, will be removed in v10.0. Use `getLineNumber()` instead.
2323
*/
2424
public function getLineNo(): int;
2525

@@ -29,9 +29,9 @@ public function getLineNo(): int;
2929
public function getColumnNumber(): ?int;
3030

3131
/**
32-
* @deprecated in version 9.0.0, will be removed in v10.0. Use `getColumnNumber()` instead.
33-
*
3432
* @return int<0, max>
33+
*
34+
* @deprecated in version 9.0.0, will be removed in v10.0. Use `getColumnNumber()` instead.
3535
*/
3636
public function getColNo(): int;
3737

src/Property/AtRule.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Sabberworm\CSS\Property;
66

7-
use Sabberworm\CSS\Comment\Commentable;
87
use Sabberworm\CSS\CSSList\CSSListItem;
9-
use Sabberworm\CSS\Renderable;
108

119
/**
1210
* Note that `CSSListItem` extends both `Commentable` and `Renderable`,

src/RuleSet/RuleSet.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Sabberworm\CSS\Parsing\ParserState;
1111
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
1212
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
13-
use Sabberworm\CSS\Renderable;
1413
use Sabberworm\CSS\Rule\Rule;
1514

1615
/**

tests/ParserTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -980,20 +980,20 @@ public function lineNumbersParsing(): void
980980
// So a more explicit type check is required.
981981
// TODO: tidy this up when an interface with `getLineNo()` is added.
982982
if (
983-
!$contentItem instanceof Charset &&
984-
!$contentItem instanceof CSSList &&
985-
!$contentItem instanceof CSSNamespace &&
986-
!$contentItem instanceof Import &&
987-
!$contentItem instanceof RuleSet
983+
!$contentItem instanceof Charset
984+
&& !$contentItem instanceof CSSList
985+
&& !$contentItem instanceof CSSNamespace
986+
&& !$contentItem instanceof Import
987+
&& !$contentItem instanceof RuleSet
988988
) {
989989
self::fail('Content item is not of an expected type. It\'s a `' . \get_class($contentItem) . '`.');
990990
}
991991
$actual[$contentItem->getLineNo()] = [\get_class($contentItem)];
992992
if ($contentItem instanceof KeyFrame) {
993993
foreach ($contentItem->getContents() as $block) {
994994
if (
995-
!$block instanceof CSSList &&
996-
!$block instanceof RuleSet
995+
!$block instanceof CSSList
996+
&& !$block instanceof RuleSet
997997
) {
998998
self::fail(
999999
'KeyFrame content item is not of an expected type. It\'s a `' . \get_class($block) . '`.'

tests/Unit/Comment/CommentContainerTest.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ public function provideCommentArray(): array
4242
return [
4343
'no comment' => [[]],
4444
'one comment' => [[new Comment('Is this really a spoon?')]],
45-
'two comments' => [[
46-
new Comment('I’m a teapot.'),
47-
new Comment('I’m a cafetière.'),
48-
]],
45+
'two comments' => [
46+
[
47+
new Comment('I’m a teapot.'),
48+
new Comment('I’m a cafetière.'),
49+
],
50+
],
4951
];
5052
}
5153

@@ -87,10 +89,12 @@ public function provideAlternativeCommentArray(): array
8789
return [
8890
'no comment' => [[]],
8991
'one comment' => [[new Comment('Can I eat it with my hands?')]],
90-
'two comments' => [[
91-
new Comment('I’m a beer barrel.'),
92-
new Comment('I’m a vineyard.'),
93-
]],
92+
'two comments' => [
93+
[
94+
new Comment('I’m a beer barrel.'),
95+
new Comment('I’m a vineyard.'),
96+
],
97+
],
9498
];
9599
}
96100

0 commit comments

Comments
 (0)