From 900883cb432d8efd2cebee680b836f200fdc8e3e Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 10 Feb 2025 09:49:04 +0100 Subject: [PATCH] [TASK] Mark `OutputFormatter` as `@internal` This class should only be used for formatting CSS from within this library. It is not intended to be called from outside. --- CHANGELOG.md | 1 + src/OutputFormat.php | 4 ++++ src/OutputFormatter.php | 3 +++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362a6546..9f34e14b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Please also have a look at our ### Changed +- Mark `OutputFormatter` as `@internal` (#896) - Make `Selector` a `Renderable` (#1017) - Mark `Selector::isValid()` as `@internal` (#1037) - Mark parsing-related methods of most CSS elements as `@internal` (#908) diff --git a/src/OutputFormat.php b/src/OutputFormat.php index 47242968..b65986bb 100644 --- a/src/OutputFormat.php +++ b/src/OutputFormat.php @@ -751,11 +751,15 @@ public function beLenient(): void $this->bIgnoreExceptions = true; } + /** + * @internal since 8.8.0 + */ public function getFormatter(): OutputFormatter { if ($this->outputFormatter === null) { $this->outputFormatter = new OutputFormatter($this); } + return $this->outputFormatter; } diff --git a/src/OutputFormatter.php b/src/OutputFormatter.php index 7b61b0ab..fb122fe7 100644 --- a/src/OutputFormatter.php +++ b/src/OutputFormatter.php @@ -7,6 +7,9 @@ use Sabberworm\CSS\Comment\Commentable; use Sabberworm\CSS\Parsing\OutputException; +/** + * @internal since 8.8.0 + */ class OutputFormatter { /**