Skip to content

Commit b7367c8

Browse files
authored
[TASK] Remove OutputFormat::get() (#1108)
We now have beautiful, cleanly-typed getters to use instead. Part of #1103
1 parent 9e087c5 commit b7367c8

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

CHANGELOG.md

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

4444
### Removed
4545

46+
- Remove `OutputFormat::get()` (#1108)
4647
- Drop special support for vendor prefixes (#1083)
4748
- Remove the IE hack in `Rule` (#995)
4849
- Drop `getLineNo()` from the `Renderable` interface (#1038)

config/phpstan-baseline.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ parameters:
111111
-
112112
message: '#^Variable property access on \$this\(Sabberworm\\CSS\\OutputFormat\)\.$#'
113113
identifier: property.dynamicName
114-
count: 4
114+
count: 2
115115
path: ../src/OutputFormat.php
116116

117117
-

src/OutputFormat.php

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

183183
public function __construct() {}
184184

185-
/**
186-
* @return string|int|bool|null
187-
*/
188-
public function get(string $name)
189-
{
190-
$aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
191-
foreach ($aVarPrefixes as $prefix) {
192-
$sFieldName = $prefix . \ucfirst($name);
193-
if (isset($this->$sFieldName)) {
194-
return $this->$sFieldName;
195-
}
196-
}
197-
return null;
198-
}
199-
200185
/**
201186
* @param array<array-key, string>|string $names
202187
* @param mixed $value

0 commit comments

Comments
 (0)