From e107ede5ccabd870f7b98949013b7a1123352d31 Mon Sep 17 00:00:00 2001 From: Pavel Panzyga Date: Sun, 16 Oct 2022 15:58:34 +0300 Subject: [PATCH] Add verbosity level checking to console alerts. --- src/Illuminate/Console/Concerns/InteractsWithIO.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Console/Concerns/InteractsWithIO.php b/src/Illuminate/Console/Concerns/InteractsWithIO.php index 0e6a16872ef6..13f6197589e2 100644 --- a/src/Illuminate/Console/Concerns/InteractsWithIO.php +++ b/src/Illuminate/Console/Concerns/InteractsWithIO.php @@ -364,17 +364,18 @@ public function warn($string, $verbosity = null) * Write a string in an alert box. * * @param string $string + * @param int|string|null $verbosity * @return void */ - public function alert($string) + public function alert($string, $verbosity = null) { $length = Str::length(strip_tags($string)) + 12; - $this->comment(str_repeat('*', $length)); - $this->comment('* '.$string.' *'); - $this->comment(str_repeat('*', $length)); + $this->comment(str_repeat('*', $length), $verbosity); + $this->comment('* '.$string.' *', $verbosity); + $this->comment(str_repeat('*', $length), $verbosity); - $this->newLine(); + $this->comment('', $verbosity); } /**