Completed
Push — master ( 1e183e...e43d90 )
by
unknown
13s
created
src/LaravelNotificationRateLimitServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function register()
26 26
     {
27
-        $this->app->singleton(ChannelManager::class, function ($app) {
27
+        $this->app->singleton(ChannelManager::class, function($app) {
28 28
             return new RateLimitChannelManager($app);
29 29
         });
30 30
 
Please login to merge, or discard this patch.
src/RateLimitedNotification.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             if ($strategy == 'serialize') {
43 43
                 return [$serialized_notification];
44 44
             } else {
45
-                if (! in_array($strategy, hash_algos())) {
45
+                if (!in_array($strategy, hash_algos())) {
46 46
                     throw new \Exception("Unsupported unique notification strategy hashing algorithm: $strategy");
47 47
                 }
48 48
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
             $key = $notifiable->rateLimitNotifiableKey();
117 117
         }
118 118
 
119
-        if (! $key && method_exists($notifiable, 'getKey')) {
119
+        if (!$key && method_exists($notifiable, 'getKey')) {
120 120
             $key = $notifiable->getKey();
121 121
         }
122 122
 
123
-        if (! $key && property_exists($notifiable, 'id')) {
123
+        if (!$key && property_exists($notifiable, 'id')) {
124 124
             $key = $notifiable->id;
125 125
         }
126 126
 
127
-        if (! $key) {
127
+        if (!$key) {
128 128
             $key = md5(json_encode($notifiable));
129 129
         }
130 130
 
Please login to merge, or discard this patch.
src/RateLimitChannelManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         // If this notification is going to be queued, we do not check for rate limiting
17 17
         // until the notification is actually picked up for sending in the queue via sendNow().
18
-        if ($notification instanceof ShouldRateLimit && ! $notification instanceof ShouldQueue) {
18
+        if ($notification instanceof ShouldRateLimit && !$notification instanceof ShouldQueue) {
19 19
             $this->sendWithRateLimitCheck('send', $notifiables, $notification);
20 20
         } else {
21 21
             parent::send($notifiables, $notification);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 report($e);
91 91
             }
92 92
 
93
-            if (! $sending_permitted) {
93
+            if (!$sending_permitted) {
94 94
                 continue;
95 95
             }
96 96
 
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
      *
108 108
      * @see \Illuminate\Notifications\NotificationSender::formatNotifiables
109 109
      */
110
-    protected function formatNotifiables(mixed $notifiables): ModelCollection|Collection|array
110
+    protected function formatNotifiables(mixed $notifiables): ModelCollection | Collection | array
111 111
     {
112
-        if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
112
+        if (!$notifiables instanceof Collection && !is_array($notifiables)) {
113 113
             return $notifiables instanceof Model
114 114
                 ? new ModelCollection([$notifiables]) : [$notifiables];
115 115
         }
Please login to merge, or discard this patch.