Skip to content

Commit a031106

Browse files
authored
[TASK ] Remove OutputFormat::set() (#1110)
Part of #1103 Closes #1103
1 parent fff77eb commit a031106

File tree

3 files changed

+1
-49
lines changed

3 files changed

+1
-49
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Please also have a look at our
4343

4444
### Removed
4545

46-
- Remove `OutputFormat::get()` (#1108)
46+
- Remove `OutputFormat::get()` and `::set()` (#1108, #1110)
4747
- Drop special support for vendor prefixes (#1083)
4848
- Remove the IE hack in `Rule` (#995)
4949
- Drop `getLineNo()` from the `Renderable` interface (#1038)

config/phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,6 @@ parameters:
102102
count: 2
103103
path: ../src/CSSList/KeyFrame.php
104104

105-
-
106-
message: '#^Returning false in non return bool class method\. Use null with type\|null instead or add bool return type$#'
107-
identifier: typePerfect.nullOverFalse
108-
count: 1
109-
path: ../src/OutputFormat.php
110-
111-
-
112-
message: '#^Variable property access on \$this\(Sabberworm\\CSS\\OutputFormat\)\.$#'
113-
identifier: property.dynamicName
114-
count: 2
115-
path: ../src/OutputFormat.php
116-
117105
-
118106
message: '#^Default value of the parameter \#2 \$bIncludeEnd \(false\) of method Sabberworm\\CSS\\Parsing\\ParserState\:\:consumeUntil\(\) is incompatible with type string\.$#'
119107
identifier: parameter.defaultValue

src/OutputFormat.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -182,42 +182,6 @@ class OutputFormat
182182

183183
public function __construct() {}
184184

185-
/**
186-
* @param array<array-key, string>|string $names
187-
* @param mixed $value
188-
*
189-
* @return self|false
190-
*/
191-
public function set($names, $value)
192-
{
193-
$aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
194-
if (\is_string($names) && \strpos($names, '*') !== false) {
195-
$names =
196-
[
197-
\str_replace('*', 'Before', $names),
198-
\str_replace('*', 'Between', $names),
199-
\str_replace('*', 'After', $names),
200-
];
201-
} elseif (!\is_array($names)) {
202-
$names = [$names];
203-
}
204-
foreach ($aVarPrefixes as $prefix) {
205-
$bDidReplace = false;
206-
foreach ($names as $name) {
207-
$sFieldName = $prefix . \ucfirst($name);
208-
if (isset($this->$sFieldName)) {
209-
$this->$sFieldName = $value;
210-
$bDidReplace = true;
211-
}
212-
}
213-
if ($bDidReplace) {
214-
return $this;
215-
}
216-
}
217-
// Break the chain so the user knows this option is invalid
218-
return false;
219-
}
220-
221185
/**
222186
* @param non-empty-string $sMethodName
223187
* @param array<array-key, mixed> $arguments

0 commit comments

Comments
 (0)