@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | parent::boot(); |
| 23 | 23 | |
| 24 | - static::creating(function ($model) { |
|
| 24 | + static::creating(function($model) { |
|
| 25 | 25 | $model->id = Str::uuid(); |
| 26 | 26 | }); |
| 27 | 27 | } |
@@ -121,12 +121,12 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | return self::where('id', $tokenId) |
| 123 | 123 | ->where('token', $tokenSecret) |
| 124 | - ->where(function ($query) { |
|
| 124 | + ->where(function($query) { |
|
| 125 | 125 | $query |
| 126 | 126 | ->whereNull('available_at') |
| 127 | 127 | ->orWhere('available_at', '>=', Carbon::now()); |
| 128 | 128 | }) |
| 129 | - ->where(function ($query) { |
|
| 129 | + ->where(function($query) { |
|
| 130 | 130 | $query |
| 131 | 131 | ->whereNull('max_visits') |
| 132 | 132 | ->orWhereRaw('max_visits > num_visits'); |
@@ -160,10 +160,10 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public static function deleteMagicLinkExpired() |
| 162 | 162 | { |
| 163 | - self::where(function ($query) { |
|
| 163 | + self::where(function($query) { |
|
| 164 | 164 | $query |
| 165 | 165 | ->where('available_at', '<', Carbon::now()) |
| 166 | - ->orWhere(function ($query) { |
|
| 166 | + ->orWhere(function($query) { |
|
| 167 | 167 | $query |
| 168 | 168 | ->whereNotNull('max_visits') |
| 169 | 169 | ->whereRaw('max_visits <= num_visits'); |
@@ -13,7 +13,7 @@ |
||
| 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'); |
@@ -13,7 +13,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -10,7 +10,7 @@ |
||
| 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' |
@@ -17,7 +17,7 @@ |
||
| 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 | |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | { |
| 86 | 86 | $accessCodeCookies = request()->cookie($this->cookieNam); |
| 87 | 87 | |
| 88 | - if (! $accessCodeCookies) { |
|
| 88 | + if ( ! $accessCodeCookies) { |
|
| 89 | 89 | return null; |
| 90 | 90 | } |
| 91 | 91 | |