File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ Please also have a look at our
32
32
33
33
### Changed
34
34
35
+ - ` setPosition() ` (in ` Rule ` and other classes) now has fluent interface,
36
+ returning itself (#1259 )
35
37
- ` RuleSet::removeRule() ` now only allows ` Rule ` as the parameter
36
38
(implementing classes are ` AtRuleSet ` and ` DeclarationBlock ` );
37
39
use ` removeMatchingRules() ` or ` removeAllRules() ` for other functions (#1255 )
Original file line number Diff line number Diff line change @@ -58,11 +58,15 @@ public function getColNo(): int
58
58
/**
59
59
* @param int<0, max>|null $lineNumber
60
60
* @param int<0, max>|null $columnNumber
61
+ *
62
+ * @return $this fluent interface
61
63
*/
62
- public function setPosition (?int $ lineNumber , ?int $ columnNumber = null ): void
64
+ public function setPosition (?int $ lineNumber , ?int $ columnNumber = null ): Positionable
63
65
{
64
66
// The conditional is for backwards compatibility (backcompat); `0` will not be allowed in future.
65
67
$ this ->lineNumber = $ lineNumber !== 0 ? $ lineNumber : null ;
66
68
$ this ->columnNumber = $ columnNumber ;
69
+
70
+ return $ this ;
67
71
}
68
72
}
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ public function getColNo(): int;
40
40
* Providing zero for this parameter is deprecated in version 8.9.0, and will not be supported from v9.0.
41
41
* Use `null` instead when no line number is available.
42
42
* @param int<0, max>|null $columnNumber
43
+ *
44
+ * @return $this fluent interface
43
45
*/
44
- public function setPosition (?int $ lineNumber , ?int $ columnNumber = null ): void ;
46
+ public function setPosition (?int $ lineNumber , ?int $ columnNumber = null ): Positionable ;
45
47
}
You can’t perform that action at this time.
0 commit comments