Skip to content

[TASK] Remove the deprecated OutputFormat::level() #874

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 2 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -28,6 +28,7 @@ Please also have a look at our

### Removed

- Remove `OutputFormat::level()` (#874))
- Remove expansion of shorthand properties (#838)
- Remove `Parser::setCharset/getCharset` (#808)
- Remove `Rule::getValues()` (#582)
Expand Down
8 changes: 0 additions & 8 deletions src/OutputFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,6 @@ public function getFormatter()
return $this->oFormatter;
}

/**
* @return int
*/
public function level()
{
return $this->iIndentationLevel;
}

/**
* Creates an instance of this class without any particular formatting settings.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/OutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@ private function prepareSpace($sSpaceString): string
*/
private function indent(): string
{
return \str_repeat($this->oFormat->sIndentation, $this->oFormat->level());
return \str_repeat($this->oFormat->sIndentation, $this->oFormat->getIndentationLevel());
}
}
11 changes: 0 additions & 11 deletions tests/Unit/OutputFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -833,17 +833,6 @@ public function getFormatterCalledTwoTimesReturnsSameInstance(): void
self::assertSame($firstCallResult, $secondCallResult);
}

/**
* @test
*/
public function levelReturnsIndentationLevel(): void
{
$value = 4;
$this->subject->setIndentationLevel($value);

self::assertSame($value, $this->subject->level());
}

/**
* @test
*/
Expand Down