Skip to content

[TASK] Remove OutputFormat::get() #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Please also have a look at our

### Removed

- Remove `OutputFormat::get()` (#1108)
- Drop special support for vendor prefixes (#1083)
- Remove the IE hack in `Rule` (#995)
- Drop `getLineNo()` from the `Renderable` interface (#1038)
Expand Down
2 changes: 1 addition & 1 deletion config/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ parameters:
-
message: '#^Variable property access on \$this\(Sabberworm\\CSS\\OutputFormat\)\.$#'
identifier: property.dynamicName
count: 4
count: 2
path: ../src/OutputFormat.php

-
Expand Down
15 changes: 0 additions & 15 deletions src/OutputFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,6 @@ class OutputFormat

public function __construct() {}

/**
* @return string|int|bool|null
*/
public function get(string $name)
{
$aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
foreach ($aVarPrefixes as $prefix) {
$sFieldName = $prefix . \ucfirst($name);
if (isset($this->$sFieldName)) {
return $this->$sFieldName;
}
}
return null;
}

/**
* @param array<array-key, string>|string $names
* @param mixed $value
Expand Down