From 05b956c33f4ce9ada7b89a493928e4cb2d03b298 Mon Sep 17 00:00:00 2001 From: Muhammet SAFAK Date: Wed, 6 Jul 2022 23:25:11 +0300 Subject: [PATCH] =?UTF-8?q?ask()=20y=C3=B6ntemi=20verilen=20cevab=C4=B1=20?= =?UTF-8?q?trimleyerek=20d=C3=B6nd=C3=BCrmesi=20sa=C4=9Fland=C4=B1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Console.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Console.php b/src/Console.php index 8236f22..4f50870 100644 --- a/src/Console.php +++ b/src/Console.php @@ -208,7 +208,7 @@ public function flags(): array return $this->flags; } - public function ask(string $question) + public function ask(string $question): string { $this->message( \PHP_EOL . $question . \PHP_EOL); $handle = fopen("php://stdin", "r"); @@ -216,7 +216,7 @@ public function ask(string $question) $line = fgets($handle); } while ($line == ''); fclose($handle); - return $line; + return trim((string)$line); } /**