Passed
Branch master (3a4bd7)
by Pulkit
06:09
created
src/Dispatcher/AlertDispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
src/config/laravel_alert_notifications.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,20 +10,20 @@
 block discarded – undo
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),
Please login to merge, or discard this patch.
src/AlertNotificationsServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Slack/ExceptionOccurredPayload.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
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
             ]
Please login to merge, or discard this patch.