Passed
Branch master (97f42b)
by Cesar
03:28
created
databases/migrations/2017_07_06_000000_create_table_magic_links.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create(config('magiclink.magiclink_table', 'magic_links'), function (Blueprint $table) {
16
+        Schema::create(config('magiclink.magiclink_table', 'magic_links'), function(Blueprint $table) {
17 17
             $table->uuid('id')->primary();
18 18
             $table->string('token', 255);
19 19
             $table->text('action');
Please login to merge, or discard this patch.
migrations/2021_03_06_211907_add_access_code_to_magic_links_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('magic_links', function (Blueprint $table) {
16
+        Schema::table('magic_links', function(Blueprint $table) {
17 17
             $table->string('access_code')->nullable();
18 18
         });
19 19
     }
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function down()
27 27
     {
28 28
         if (Schema::hasColumn('magic_links', 'access_code')) {
29
-            Schema::table('magic_links', function (Blueprint $table) {
29
+            Schema::table('magic_links', function(Blueprint $table) {
30 30
                 $table->dropColumn('access_code');
31 31
             });
32 32
         }
Please login to merge, or discard this patch.
src/Middlewares/MagiclinkMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
         $magicLink = MagicLink::getValidMagicLinkByToken($token);
19 19
 
20
-        if (! $magicLink) {
20
+        if ( ! $magicLink) {
21 21
             return $this->badResponse();
22 22
         }
23 23
 
Please login to merge, or discard this patch.
src/AccessCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
     {
86 86
         $accessCodeCookies = request()->cookie($this->cookieName);
87 87
 
88
-        if (! $accessCodeCookies) {
88
+        if ( ! $accessCodeCookies) {
89 89
             return null;
90 90
         }
91 91
 
Please login to merge, or discard this patch.
src/Actions/DownloadFileAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function __construct(string $path, ?string $name = null, array $headers = [])
23 23
     {
24 24
         $this->path = $path;
25
-        if (! is_null($name)) {
25
+        if ( ! is_null($name)) {
26 26
             $this->name($name);
27 27
         }
28 28
         $this->headers($headers);
Please login to merge, or discard this patch.
src/MagicLink.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         parent::boot();
45 45
 
46
-        static::creating(function ($model) {
46
+        static::creating(function($model) {
47 47
             $model->id = Str::uuid();
48 48
         });
49 49
     }
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
 
165 165
         return static::where('id', $tokenId)
166 166
                     ->where('token', $tokenSecret)
167
-                    ->where(function ($query) {
167
+                    ->where(function($query) {
168 168
                         $query
169 169
                             ->whereNull('available_at')
170 170
                             ->orWhere('available_at', '>=', Carbon::now());
171 171
                     })
172
-                    ->where(function ($query) {
172
+                    ->where(function($query) {
173 173
                         $query
174 174
                             ->whereNull('max_visits')
175 175
                             ->orWhereRaw('max_visits > num_visits');
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public static function deleteMagicLinkExpired()
205 205
     {
206
-        static::where(function ($query) {
206
+        static::where(function($query) {
207 207
             $query
208 208
                 ->where('available_at', '<', Carbon::now())
209
-                ->orWhere(function ($query) {
209
+                ->orWhere(function($query) {
210 210
                     $query
211 211
                         ->whereNotNull('max_visits')
212 212
                         ->whereRaw('max_visits <= num_visits');
Please login to merge, or discard this patch.
routes/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
             'web',
11 11
         ],
12 12
     ],
13
-    function () {
13
+    function() {
14 14
         Route::get(
15 15
             config('magiclink.url.validate_path', 'magiclink').'/{token}',
16 16
             'MagicLink\Controllers\MagicLinkController@access'
Please login to merge, or discard this patch.