@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | public $exception; |
21 | 21 | public $dontAlertExceptions; |
22 | 22 | |
23 | - public function __construct(Exception $exception, array $dontAlertExceptions = []) |
|
23 | + public function __construct(Exception $exception, array $dontAlertExceptions = [ ]) |
|
24 | 24 | { |
25 | 25 | $this->exception = $exception; |
26 | 26 | $this->dontAlertExceptions = $dontAlertExceptions; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | protected function shouldAlert() |
38 | 38 | { |
39 | - if (!config('laravel_alert_notifications.throttle_enabled')) { |
|
39 | + if ( ! config('laravel_alert_notifications.throttle_enabled')) { |
|
40 | 40 | return true; |
41 | 41 | } |
42 | 42 | if ($this->isDonotAlertException()) { |
@@ -10,20 +10,20 @@ |
||
10 | 10 | 'enabled' => true, |
11 | 11 | 'toAddress' => env('ALERT_NOTIFICATION_MAIL_TO_ADDRESS'), |
12 | 12 | 'fromAddress' => env('ALERT_NOTIFICATION_MAIL_FROM_ADDRESS'), |
13 | - 'mailSubject' => '['. env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME') |
|
13 | + 'mailSubject' => '[' . env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME') |
|
14 | 14 | ], |
15 | 15 | 'microsoft_teams' => [ |
16 | 16 | 'enabled' => true, |
17 | 17 | 'proxy' => env('ALERT_NOTIFICATION_CURL_PROXY', null), |
18 | 18 | 'themeColor' => 'ff5864', |
19 | - 'cardSubject' => '['. env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME'), |
|
19 | + 'cardSubject' => '[' . env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME'), |
|
20 | 20 | 'webhook' => env('ALERT_NOTIFICATION_MICROSOFT_TEAMS_WEBHOOK') |
21 | 21 | ], |
22 | 22 | 'slack' => [ |
23 | 23 | 'enabled' => true, |
24 | 24 | 'proxy' => env('ALERT_NOTIFICATION_CURL_PROXY', null), |
25 | - 'subject' => '['. env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME'), |
|
26 | - 'username' => '['. env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME'), |
|
25 | + 'subject' => '[' . env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME'), |
|
26 | + 'username' => '[' . env('APP_ENV') . '] [' . trim(`hostname`) . '] ' . env('APP_NAME'), |
|
27 | 27 | 'emoji' => ':slack:', |
28 | 28 | 'webhook' => env('ALERT_NOTIFICATION_SLACK_WEBHOOK', null), |
29 | 29 | 'channel' => env('ALERT_NOTIFICATION_SLACK_CHANNEL', null), |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function boot() |
22 | 22 | { |
23 | - $this->loadViewsFrom(__DIR__.'/views', 'laravel_alert_notifications'); |
|
23 | + $this->loadViewsFrom(__DIR__ . '/views', 'laravel_alert_notifications'); |
|
24 | 24 | |
25 | 25 | $this->publishes([ |
26 | - __DIR__.'/config/laravel_alert_notifications.php' => config_path('laravel_alert_notifications.php'), |
|
26 | + __DIR__ . '/config/laravel_alert_notifications.php' => config_path('laravel_alert_notifications.php'), |
|
27 | 27 | ], 'config'); |
28 | 28 | $this->publishes([ |
29 | - __DIR__.'/views' => resource_path('views/vendor/laravel_alert_notifications'), |
|
29 | + __DIR__ . '/views' => resource_path('views/vendor/laravel_alert_notifications'), |
|
30 | 30 | ], 'views'); |
31 | 31 | } |
32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function register() |
39 | 39 | { |
40 | 40 | $this->mergeConfigFrom( |
41 | - __DIR__.'/config/laravel_alert_notifications.php', |
|
41 | + __DIR__ . '/config/laravel_alert_notifications.php', |
|
42 | 42 | 'laravel_alert_notifications' |
43 | 43 | ); |
44 | 44 | } |
@@ -19,12 +19,12 @@ |
||
19 | 19 | "attachments" => [ |
20 | 20 | [ |
21 | 21 | "text" => "*Environment:* " . config('app.env') . " " . config('laravel_alert_notifications.slack.subject') |
22 | - . "\n" . "Request Url: " . Request::fullUrl() |
|
23 | - . "\n" . "Message: " . $this->exception->getMessage() |
|
24 | - . "\n" . "Exception: " . get_class($this->exception) |
|
25 | - . "\n" . "Exception Code: " . $this->exception->getCode() |
|
26 | - . "\n" . "In File: *" . $this->exception->getFile() . '* on line ' . $this->exception->getLine() |
|
27 | - . "\n" . "Server: " . "```" . $this->exception->getTraceAsString() . "```" |
|
22 | + . "\n" . "Request Url: " . Request::fullUrl() |
|
23 | + . "\n" . "Message: " . $this->exception->getMessage() |
|
24 | + . "\n" . "Exception: " . get_class($this->exception) |
|
25 | + . "\n" . "Exception Code: " . $this->exception->getCode() |
|
26 | + . "\n" . "In File: *" . $this->exception->getFile() . '* on line ' . $this->exception->getLine() |
|
27 | + . "\n" . "Server: " . "```" . $this->exception->getTraceAsString() . "```" |
|
28 | 28 | , "mrkdwn"=> true |
29 | 29 | ] |
30 | 30 | ] |
@@ -18,13 +18,13 @@ |
||
18 | 18 | "icon_emoji" => config('laravel_alert_notifications.slack.emoji'), |
19 | 19 | "attachments" => [ |
20 | 20 | [ |
21 | - "text" => "*Environment:* " . config('app.env') . " " . config('laravel_alert_notifications.slack.subject') |
|
22 | - . "\n" . "Request Url: " . Request::fullUrl() |
|
23 | - . "\n" . "Message: " . $this->exception->getMessage() |
|
24 | - . "\n" . "Exception: " . get_class($this->exception) |
|
21 | + "text" => "*Environment:* " . config('app.env') . " " . config('laravel_alert_notifications.slack.subject') |
|
22 | + . "\n" . "Request Url: " . Request::fullUrl() |
|
23 | + . "\n" . "Message: " . $this->exception->getMessage() |
|
24 | + . "\n" . "Exception: " . get_class($this->exception) |
|
25 | 25 | . "\n" . "Exception Code: " . $this->exception->getCode() |
26 | - . "\n" . "In File: *" . $this->exception->getFile() . '* on line ' . $this->exception->getLine() |
|
27 | - . "\n" . "Server: " . "```" . $this->exception->getTraceAsString() . "```" |
|
26 | + . "\n" . "In File: *" . $this->exception->getFile() . '* on line ' . $this->exception->getLine() |
|
27 | + . "\n" . "Server: " . "```" . $this->exception->getTraceAsString() . "```" |
|
28 | 28 | , "mrkdwn"=> true |
29 | 29 | ] |
30 | 30 | ] |