diff --git a/CHANGELOG.md b/CHANGELOG.md index ed27efb3..eb1dc6a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/OutputFormat.php b/src/OutputFormat.php index ce53bb1b..2b9404d7 100644 --- a/src/OutputFormat.php +++ b/src/OutputFormat.php @@ -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. */ diff --git a/src/OutputFormatter.php b/src/OutputFormatter.php index 7ef86a3c..0dfb59dc 100644 --- a/src/OutputFormatter.php +++ b/src/OutputFormatter.php @@ -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()); } } diff --git a/tests/Unit/OutputFormatTest.php b/tests/Unit/OutputFormatTest.php index 512df67f..2538bbe2 100644 --- a/tests/Unit/OutputFormatTest.php +++ b/tests/Unit/OutputFormatTest.php @@ -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 */