Completed
Pull Request — master (#32)
by
unknown
14s
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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,15 +92,15 @@
 block discarded – undo
92 92
             $key = $notifiable->rateLimitNotifiableKey();
93 93
         }
94 94
 
95
-        if (! $key && method_exists($notifiable, 'getKey')) {
95
+        if (!$key && method_exists($notifiable, 'getKey')) {
96 96
             $key = $notifiable->getKey();
97 97
         }
98 98
 
99
-        if (! $key && property_exists($notifiable, 'id')) {
99
+        if (!$key && property_exists($notifiable, 'id')) {
100 100
             $key = $notifiable->id;
101 101
         }
102 102
 
103
-        if (! $key) {
103
+        if (!$key) {
104 104
             $key = md5(json_encode($notifiable));
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/RateLimitChannelManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         // If this notification is going to be queued, we do not check for rate limiting
16 16
         // until the notification is actually picked up for sending in the queue via sendNow().
17
-        if ($notification instanceof ShouldRateLimit && ! $notification instanceof ShouldQueue) {
17
+        if ($notification instanceof ShouldRateLimit && !$notification instanceof ShouldQueue) {
18 18
             $this->sendWithRateLimitCheck($notifiables, $notification, 'send');
19 19
         } else {
20 20
             parent::send($notifiables, $notification);
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * @see \Illuminate\Notifications\NotificationSender::formatNotifiables
72 72
      */
73
-    protected function formatNotifiables(mixed $notifiables): ModelCollection|Collection|array
73
+    protected function formatNotifiables(mixed $notifiables): ModelCollection | Collection | array
74 74
     {
75
-        if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
75
+        if (!$notifiables instanceof Collection && !is_array($notifiables)) {
76 76
             return $notifiables instanceof Model
77 77
                 ? new ModelCollection([$notifiables]) : [$notifiables];
78 78
         }
Please login to merge, or discard this patch.