Skip to content

Commit 898d5cd

Browse files
oliverkleeJakeQZ
andauthored
[TASK] Drop atRuleArgs() from the AtRule interface (#1142)
The classes implementing this interface use a wide variaty of inconsistent return types when they implement this method. This is a hard blocker for introducing native return type declaration for this method. Co-authored-by: JakeQZ <[email protected]>
1 parent 13f1ff5 commit 898d5cd

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Please also have a look at our
4747

4848
### Removed
4949

50+
- Drop `atRuleArgs()` from the `AtRule` interface (#1141)
5051
- Remove `OutputFormat::get()` and `::set()` (#1108, #1110)
5152
- Drop special support for vendor prefixes (#1083)
5253
- Remove the IE hack in `Rule` (#995)

config/phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,6 @@ parameters:
108108
count: 1
109109
path: ../src/Property/CSSNamespace.php
110110

111-
-
112-
message: '#^Return type \(array\<int, string\>\) of method Sabberworm\\CSS\\Property\\CSSNamespace\:\:atRuleArgs\(\) should be compatible with return type \(string\|null\) of method Sabberworm\\CSS\\Property\\AtRule\:\:atRuleArgs\(\)$#'
113-
identifier: method.childReturnType
114-
count: 1
115-
path: ../src/Property/CSSNamespace.php
116-
117111
-
118112
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
119113
identifier: method.notFound
@@ -138,12 +132,6 @@ parameters:
138132
count: 1
139133
path: ../src/Property/Import.php
140134

141-
-
142-
message: '#^Return type \(array\<int, Sabberworm\\CSS\\Value\\URL\|string\>\) of method Sabberworm\\CSS\\Property\\Import\:\:atRuleArgs\(\) should be compatible with return type \(string\|null\) of method Sabberworm\\CSS\\Property\\AtRule\:\:atRuleArgs\(\)$#'
143-
identifier: method.childReturnType
144-
count: 1
145-
path: ../src/Property/Import.php
146-
147135
-
148136
message: '#^Only booleans are allowed in an if condition, Sabberworm\\CSS\\Value\\RuleValueList\|string\|null given\.$#'
149137
identifier: if.condNotBoolean

src/Property/AtRule.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,4 @@ interface AtRule extends Renderable, Commentable
2323
* @return non-empty-string
2424
*/
2525
public function atRuleName(): string;
26-
27-
/**
28-
* @return string|null
29-
*/
30-
public function atRuleArgs();
3126
}

0 commit comments

Comments
 (0)