Skip to content

Commit 35e48cd

Browse files
authored
[TASK] Deprecate OutputFormat::level() (#870)
This method is redundant with the (magic) getter `Outputformat::getIndentationLevel()`, which follows the common accessor naming conventions.
1 parent b65d364 commit 35e48cd

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1111

1212
### Deprecated
1313

14+
- Deprecate `OutputFormat::level()` (#870)
15+
1416
### Removed
1517

1618
### Fixed

src/OutputFormat.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ public function getFormatter()
297297

298298
/**
299299
* @return int
300+
*
301+
* @deprecated #869 since version V8.8.0, will be removed in V9.0.0. Use `getIndentationLevel()` instead.
300302
*/
301303
public function level()
302304
{

src/OutputFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,6 @@ private function prepareSpace($sSpaceString)
250250
*/
251251
private function indent()
252252
{
253-
return str_repeat($this->oFormat->sIndentation, $this->oFormat->level());
253+
return str_repeat($this->oFormat->sIndentation, $this->oFormat->getIndentationLevel());
254254
}
255255
}

0 commit comments

Comments
 (0)