Skip to content

Commit 113dc1d

Browse files
committed
refactor(config): remove unnecessary code in exception-notify configuration
- Removed unused 'http_options' and 'extender' configuration in each client section of the exception-notify configuration file
1 parent c6c72ca commit 113dc1d

File tree

4 files changed

+10
-25
lines changed

4 files changed

+10
-25
lines changed

config/exception-notify.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@
143143
],
144144
'client' => [
145145
'class' => \Guanguans\Notify\Bark\Client::class,
146-
'http_options' => [],
147-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
148146
],
149147
'message' => [
150148
'class' => \Guanguans\Notify\Bark\Messages\Message::class,
@@ -164,8 +162,6 @@
164162
],
165163
'client' => [
166164
'class' => \Guanguans\Notify\Chanify\Client::class,
167-
'http_options' => [],
168-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
169165
],
170166
'message' => [
171167
'class' => \Guanguans\Notify\Chanify\Messages\TextMessage::class,
@@ -186,8 +182,6 @@
186182
],
187183
'client' => [
188184
'class' => \Guanguans\Notify\DingTalk\Client::class,
189-
'http_options' => [],
190-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
191185
],
192186
'message' => [
193187
'class' => \Guanguans\Notify\DingTalk\Messages\MarkdownMessage::class,
@@ -209,8 +203,6 @@
209203
],
210204
'client' => [
211205
'class' => \Guanguans\Notify\Discord\Client::class,
212-
'http_options' => [],
213-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
214206
],
215207
'message' => [
216208
'class' => \Guanguans\Notify\Discord\Messages\Message::class,
@@ -230,8 +222,6 @@
230222
],
231223
'client' => [
232224
'class' => \Guanguans\Notify\Lark\Client::class,
233-
'http_options' => [],
234-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
235225
],
236226
'message' => [
237227
'class' => \Guanguans\Notify\Lark\Messages\TextMessage::class,
@@ -253,8 +243,6 @@
253243
],
254244
'client' => [
255245
'class' => \Guanguans\Notify\Ntfy\Client::class,
256-
'http_options' => [],
257-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
258246
],
259247
'message' => [
260248
'class' => \Guanguans\Notify\Ntfy\Messages\Message::class,
@@ -275,8 +263,6 @@
275263
],
276264
'client' => [
277265
'class' => \Guanguans\Notify\PushDeer\Client::class,
278-
'http_options' => [],
279-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
280266
],
281267
'message' => [
282268
'class' => \Guanguans\Notify\PushDeer\Messages\Message::class,
@@ -298,8 +284,6 @@
298284
],
299285
'client' => [
300286
'class' => \Guanguans\Notify\Slack\Client::class,
301-
'http_options' => [],
302-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
303287
],
304288
'message' => [
305289
'class' => \Guanguans\Notify\Slack\Messages\Message::class,
@@ -320,8 +304,6 @@
320304
],
321305
'client' => [
322306
'class' => \Guanguans\Notify\Telegram\Client::class,
323-
'http_options' => [],
324-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
325307
],
326308
'message' => [
327309
'class' => \Guanguans\Notify\Telegram\Messages\TextMessage::class,
@@ -341,8 +323,6 @@
341323
],
342324
'client' => [
343325
'class' => \Guanguans\Notify\WeWork\Client::class,
344-
'http_options' => [],
345-
// 'extender' => \Guanguans\LaravelExceptionNotify\DefaultNotifyClientExtender::class,
346326
],
347327
'message' => [
348328
'class' => \Guanguans\Notify\WeWork\Messages\MarkdownMessage::class,

src/Jobs/ReportExceptionJob.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
use Guanguans\LaravelExceptionNotify\ExceptionNotifyManager;
1919
use Illuminate\Bus\Queueable;
2020
use Illuminate\Contracts\Queue\ShouldQueue;
21+
use Illuminate\Foundation\Bus\Dispatchable;
2122
use Illuminate\Queue\InteractsWithQueue;
23+
use Illuminate\Queue\SerializesModels;
2224
use Illuminate\Support\Facades\Log;
2325

2426
class ReportExceptionJob implements ShouldQueue
2527
{
26-
// use \Illuminate\Foundation\Bus\Dispatchable\Dispatchable;
27-
// use \Illuminate\Queue\SerializesModels;
28+
// use SerializesModels;
29+
use Dispatchable;
2830
use InteractsWithQueue;
2931
use Queueable;
3032

src/Pipes/SprintfHtmlPipe.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818

1919
class SprintfHtmlPipe extends SprintfPipe
2020
{
21-
public function handle(Collection $collectors, \Closure $next, string $format = '<pre>%s</pre>'): Stringable
22-
{
21+
public function handle(
22+
Collection $collectors,
23+
\Closure $next,
24+
string $format = '<pre style="overflow: auto;">%s</pre>'
25+
): Stringable {
2326
return parent::handle($collectors, $next, $format);
2427
}
2528
}

src/Support/JsonFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function fix(string $json): string
8686
return $head.$this->doFix($json).$tail;
8787
}
8888

89-
// trait PadsJson
89+
/* ------------------------- trait PadsJson ------------------------- */
9090
public function pad(string $tmpJson): string
9191
{
9292
if (!$this->inStr) {

0 commit comments

Comments
 (0)