Skip to content

Commit cf9ed6a

Browse files
committed
refactor(commands): improve readability of TestCommand.php
- Replaced anonymous function with static function for better clarity and readability
1 parent baaa7fb commit cf9ed6a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ php artisan exception-notify:test --ansi -v
6767

6868
### Notification examples
6969

70-
| discord | lark | mail | slack | telegram | weWork |
71-
|:----------------------------:|:----------------------:|:--------------------------:|:----------------------------:|:----------------------------------:|:------------------------------:|
72-
| ![discord](docs/discord.jpg) | ![lark](docs/lark.jpg) | ![mail.jpg](docs/mail.jpg) | ![slack.jpg](docs/slack.jpg) | ![telegram.jpg](docs/telegram.jpg) | ![weWork.jpg](docs/weWork.jpg) |
70+
| discord | lark | mail |
71+
|:----------------------------:|:----------------------:|:--------------------------:|
72+
| ![discord](docs/discord.jpg) | ![lark](docs/lark.jpg) | ![mail.jpg](docs/mail.jpg) |
7373

7474
### Skip report
7575

docs/discord.jpg

175 KB
Loading

src/Commands/TestCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TestCommand extends Command
2626

2727
public function handle(ExceptionNotifyManager $exceptionNotifyManager): void
2828
{
29-
collect(config('exception-notify.channels'))->each(function (array $config, string $name): void {
29+
collect(config('exception-notify.channels'))->each(static function (array $config, string $name): void {
3030
if ('notify' === $config['driver']) {
3131
config()->set("exception-notify.channels.$name.client.extender", DefaultNotifyClientExtender::class);
3232
}

0 commit comments

Comments
 (0)