Skip to content

Commit cde73cd

Browse files
authored
[TASK] Add type declarations for OutputFormat::indentWith* (#873)
Also improve the naming of the parameters.
1 parent 19cccef commit cde73cd

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Please also have a look at our
2121
### Changed
2222

2323
- Use more native type declarations and strict mode
24-
(#641, #772, #774, #778, #804, #841)
24+
(#641, #772, #774, #778, #804, #841, #873)
2525
- Add visibility to all class/interface constants (#469)
2626

2727
### Deprecated

src/OutputFormat.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,23 +243,19 @@ public function __call(string $sMethodName, array $aArguments)
243243
}
244244

245245
/**
246-
* @param int $iNumber
247-
*
248-
* @return self
246+
* @return $this fluent interface
249247
*/
250-
public function indentWithTabs($iNumber = 1)
248+
public function indentWithTabs(int $numberOfTabs = 1): self
251249
{
252-
return $this->setIndentation(\str_repeat("\t", $iNumber));
250+
return $this->setIndentation(\str_repeat("\t", $numberOfTabs));
253251
}
254252

255253
/**
256-
* @param int $iNumber
257-
*
258-
* @return self
254+
* @return $this fluent interface
259255
*/
260-
public function indentWithSpaces($iNumber = 2)
256+
public function indentWithSpaces(int $numberOfSpaces = 2): self
261257
{
262-
return $this->setIndentation(\str_repeat(' ', $iNumber));
258+
return $this->setIndentation(\str_repeat(' ', $numberOfSpaces));
263259
}
264260

265261
/**

0 commit comments

Comments
 (0)