Skip to content

Commit

Permalink
[TASK] Mark OutputFormatter as @internal
Browse files Browse the repository at this point in the history
This class should only be used for formatting CSS from
within this library. It is not intended to be called
from outside.
  • Loading branch information
oliverklee committed Feb 14, 2025
1 parent fa5ff8a commit 0a17c5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Please also have a look at our

### Changed

- Mark `OutputFormatter` as `@internal` (#896)
- Mark parsing-related methods of most CSS elements as `@internal` (#908)
- Mark `OutputFormat::nextLevel()` as `@internal` (#901)
- Only allow `string` for some `OutputFormat` properties (#885)
Expand Down
4 changes: 4 additions & 0 deletions src/OutputFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,15 @@ public function beLenient(): void
$this->bIgnoreExceptions = true;
}

/**
* @internal since 8.8.0
*/
public function getFormatter(): OutputFormatter
{
if ($this->oFormatter === null) {
$this->oFormatter = new OutputFormatter($this);
}

return $this->oFormatter;
}

Expand Down
3 changes: 3 additions & 0 deletions src/OutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Sabberworm\CSS\Comment\Commentable;
use Sabberworm\CSS\Parsing\OutputException;

/**
* @internal since 8.8.0
*/
class OutputFormatter
{
/**
Expand Down

0 comments on commit 0a17c5c

Please sign in to comment.