Skip to content

Commit

Permalink
Fix: Correct method invocation in forCli method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
saMahmoudzadeh committed Mar 10, 2024
1 parent 20d2d1e commit 5f1b120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/ChannelListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function forCli($channels)
return mb_strlen($channelName);
});

$terminalWidth = $this->getTerminalWidth();
$terminalWidth = static::getTerminalWidth();

$channelCount = $this->determineChannelCountOutput($channels, $terminalWidth);

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5f1b120

Please sign in to comment.