From 5f1b120677d76c999170aa8703a00d8f2b51e998 Mon Sep 17 00:00:00 2001 From: "S.a Mahmoudzadeh" Date: Mon, 11 Mar 2024 02:56:58 +0330 Subject: [PATCH] Fix: Correct method invocation in forCli method The forCli method in both ChannelListCommand and RouteListCommand classes had an issue with the method invocation. It was incorrectly called using $this instead of the proper static keyword. This commit corrects the invocation to use the static:: keyword. --- src/Illuminate/Foundation/Console/ChannelListCommand.php | 2 +- src/Illuminate/Foundation/Console/RouteListCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/ChannelListCommand.php b/src/Illuminate/Foundation/Console/ChannelListCommand.php index 8e4d8bacce60..7f9492caf6d3 100644 --- a/src/Illuminate/Foundation/Console/ChannelListCommand.php +++ b/src/Illuminate/Foundation/Console/ChannelListCommand.php @@ -78,7 +78,7 @@ protected function forCli($channels) return mb_strlen($channelName); }); - $terminalWidth = $this->getTerminalWidth(); + $terminalWidth = static::getTerminalWidth(); $channelCount = $this->determineChannelCountOutput($channels, $terminalWidth); diff --git a/src/Illuminate/Foundation/Console/RouteListCommand.php b/src/Illuminate/Foundation/Console/RouteListCommand.php index 11a8c7247cbe..3c232a760557 100644 --- a/src/Illuminate/Foundation/Console/RouteListCommand.php +++ b/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -350,7 +350,7 @@ protected function forCli($routes) $maxMethod = mb_strlen($routes->max('method')); - $terminalWidth = $this->getTerminalWidth(); + $terminalWidth = static::getTerminalWidth(); $routeCount = $this->determineRouteCountOutput($routes, $terminalWidth);