Completed
Pull Request — master (#29)
by
unknown
31s
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/RateLimitChannelManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function send($notifiables, $notification): void
13 13
     {
14
-        if (! $notification instanceof ShouldRateLimit) {
14
+        if (!$notification instanceof ShouldRateLimit) {
15 15
             parent::send($notifiables, $notification);
16 16
         } else {
17 17
             $notifiables = $this->formatNotifiables($notifiables);
18 18
 
19
-            foreach($notifiables as $notifiable) {
19
+            foreach ($notifiables as $notifiable) {
20 20
                 if ($this->checkRateLimit($notifiable, $notification)) {
21 21
                     parent::send($notifiable, $notification);
22 22
                 }
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @see \Illuminate\Notifications\NotificationSender::formatNotifiables
54 54
      */
55
-    protected function formatNotifiables(mixed $notifiables): ModelCollection|Collection|array
55
+    protected function formatNotifiables(mixed $notifiables): ModelCollection | Collection | array
56 56
     {
57
-        if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
57
+        if (!$notifiables instanceof Collection && !is_array($notifiables)) {
58 58
             return $notifiables instanceof Model
59 59
                 ? new ModelCollection([$notifiables]) : [$notifiables];
60 60
         }
Please login to merge, or discard this patch.