diff --git a/CHANGELOG.md b/CHANGELOG.md index 53030c63..b9030e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Removed +- Remove `Rule::setValues()` (#562) - Remove `Document::getAllSelectors()` (#561) - Remove `DeclarationBlock::getSelector()` (#559) - Remove `DeclarationBlock::setSelector()` (#560) diff --git a/src/Rule/Rule.php b/src/Rule/Rule.php index 2c56f7de..aecb6bf8 100644 --- a/src/Rule/Rule.php +++ b/src/Rule/Rule.php @@ -189,48 +189,6 @@ public function setValue($mValue) $this->mValue = $mValue; } - /** - * @param array> $aSpaceSeparatedValues - * - * @return RuleValueList - * - * @deprecated will be removed in version 9.0 - * Old-Style 2-dimensional array given. Retained for (some) backwards-compatibility. - * Use `setValue()` instead and wrap the value inside a RuleValueList if necessary. - */ - public function setValues(array $aSpaceSeparatedValues) - { - $oSpaceSeparatedList = null; - if (count($aSpaceSeparatedValues) > 1) { - $oSpaceSeparatedList = new RuleValueList(' ', $this->iLineNo); - } - foreach ($aSpaceSeparatedValues as $aCommaSeparatedValues) { - $oCommaSeparatedList = null; - if (count($aCommaSeparatedValues) > 1) { - $oCommaSeparatedList = new RuleValueList(',', $this->iLineNo); - } - foreach ($aCommaSeparatedValues as $mValue) { - if (!$oSpaceSeparatedList && !$oCommaSeparatedList) { - $this->mValue = $mValue; - return $mValue; - } - if ($oCommaSeparatedList) { - $oCommaSeparatedList->addListComponent($mValue); - } else { - $oSpaceSeparatedList->addListComponent($mValue); - } - } - if (!$oSpaceSeparatedList) { - $this->mValue = $oCommaSeparatedList; - return $oCommaSeparatedList; - } else { - $oSpaceSeparatedList->addListComponent($oCommaSeparatedList); - } - } - $this->mValue = $oSpaceSeparatedList; - return $oSpaceSeparatedList; - } - /** * @return array> *