Skip to content

Commit 5932c1a

Browse files
committed
[CLEANUP] Final removal of Rule::setValues
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
1 parent b979dc8 commit 5932c1a

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2424

2525
- Remove `DeclarationBlock::setSelector()` (#560)
2626
- Drop support for PHP < 7.2 (#420)
27+
- Final removal of `Rule::setValues()` (#562)
2728

2829
### Fixed
2930

src/Rule/Rule.php

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -189,48 +189,6 @@ public function setValue($mValue)
189189
$this->mValue = $mValue;
190190
}
191191

192-
/**
193-
* @param array<array-key, array<array-key, RuleValueList>> $aSpaceSeparatedValues
194-
*
195-
* @return RuleValueList
196-
*
197-
* @deprecated will be removed in version 9.0
198-
* Old-Style 2-dimensional array given. Retained for (some) backwards-compatibility.
199-
* Use `setValue()` instead and wrap the value inside a RuleValueList if necessary.
200-
*/
201-
public function setValues(array $aSpaceSeparatedValues)
202-
{
203-
$oSpaceSeparatedList = null;
204-
if (count($aSpaceSeparatedValues) > 1) {
205-
$oSpaceSeparatedList = new RuleValueList(' ', $this->iLineNo);
206-
}
207-
foreach ($aSpaceSeparatedValues as $aCommaSeparatedValues) {
208-
$oCommaSeparatedList = null;
209-
if (count($aCommaSeparatedValues) > 1) {
210-
$oCommaSeparatedList = new RuleValueList(',', $this->iLineNo);
211-
}
212-
foreach ($aCommaSeparatedValues as $mValue) {
213-
if (!$oSpaceSeparatedList && !$oCommaSeparatedList) {
214-
$this->mValue = $mValue;
215-
return $mValue;
216-
}
217-
if ($oCommaSeparatedList) {
218-
$oCommaSeparatedList->addListComponent($mValue);
219-
} else {
220-
$oSpaceSeparatedList->addListComponent($mValue);
221-
}
222-
}
223-
if (!$oSpaceSeparatedList) {
224-
$this->mValue = $oCommaSeparatedList;
225-
return $oCommaSeparatedList;
226-
} else {
227-
$oSpaceSeparatedList->addListComponent($oCommaSeparatedList);
228-
}
229-
}
230-
$this->mValue = $oSpaceSeparatedList;
231-
return $oSpaceSeparatedList;
232-
}
233-
234192
/**
235193
* @return array<int, array<int, RuleValueList>>
236194
*

0 commit comments

Comments
 (0)