Passed
Push — master ( a270d3...cb2da0 )
by Cesar
03:32
created
src/MagicLink.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         parent::boot();
46 46
 
47
-        static::creating(function ($model) {
47
+        static::creating(function($model) {
48 48
             $model->id = Str::uuid();
49 49
         });
50 50
     }
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function baseUrl(?string $baseUrl): self
76 76
     {
77
-        $this->attributes['base_url'] = rtrim($baseUrl, '/') . '/';
77
+        $this->attributes['base_url'] = rtrim($baseUrl, '/').'/';
78 78
 
79 79
         return $this;
80 80
     }
81 81
 
82 82
     public function getUrlAttribute(): string
83 83
     {
84
-        $baseUrl = rtrim($this->attributes['base_url'] ?? '', '/') . '/'; // Use the stored base_url or an empty string
84
+        $baseUrl = rtrim($this->attributes['base_url'] ?? '', '/').'/'; // Use the stored base_url or an empty string
85 85
 
86 86
         return url(sprintf(
87 87
             '%s%s/%s%s%s',
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
 
177 177
         return static::where('id', $tokenId)
178 178
                     ->where('token', $tokenSecret)
179
-                    ->where(function ($query) {
179
+                    ->where(function($query) {
180 180
                         $query
181 181
                             ->whereNull('available_at')
182 182
                             ->orWhere('available_at', '>=', Carbon::now());
183 183
                     })
184
-                    ->where(function ($query) {
184
+                    ->where(function($query) {
185 185
                         $query
186 186
                             ->whereNull('max_visits')
187 187
                             ->orWhereRaw('max_visits > num_visits');
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public static function deleteMagicLinkExpired()
217 217
     {
218
-        $query = MagicLink::where(function ($query) {
218
+        $query = MagicLink::where(function($query) {
219 219
             $query
220 220
                 ->where('available_at', '<', Carbon::now())
221
-                ->orWhere(function ($query) {
221
+                ->orWhere(function($query) {
222 222
                     $query
223 223
                         ->whereNotNull('max_visits')
224 224
                         ->whereRaw('max_visits <= num_visits');
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
 
235
-        $query->get()->each(function (MagicLink $magiclink) {
235
+        $query->get()->each(function(MagicLink $magiclink) {
236 236
             $magiclink->delete();
237 237
 
238 238
             event(new MagicLinkWasDeleted($magiclink));
Please login to merge, or discard this patch.