From f5766ec6ede8718b04392ff9f4da46c3e6bf439e Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Tue, 17 Feb 2026 20:16:35 +0300 Subject: [PATCH] Refactor `newLine` method by extracting `buildLine` helper --- src/View/LineView.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/View/LineView.php b/src/View/LineView.php index 46a3bc2..c1c0c20 100644 --- a/src/View/LineView.php +++ b/src/View/LineView.php @@ -27,8 +27,13 @@ public function line(string $text): void */ public function newLine(int $count = 1): void { - $lines = implode('', array_fill(0, max(1, $count), PHP_EOL)); + $this->writeLine( + $this->buildLine(max(1, $count)) + ); + } - $this->writeLine($lines); + protected function buildLine(int $count): string + { + return implode('', array_fill(0, max(1, $count), PHP_EOL)); } }