@@ -93,7 +93,7 @@ |
||
| 93 | 93 | * Your code will be validated to be unique for one request. |
| 94 | 94 | * |
| 95 | 95 | * @param $collection |
| 96 | - * @param $new |
|
| 96 | + * @param string $new |
|
| 97 | 97 | * |
| 98 | 98 | * @return bool |
| 99 | 99 | */ |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function clearRedundant() |
| 174 | 174 | { |
| 175 | - Promocode::all()->each(function ($promocode) { |
|
| 175 | + Promocode::all()->each(function($promocode) { |
|
| 176 | 176 | if ($promocode->isExpired() || ($promocode->isDisposable() && $promocode->users()->exists())) { |
| 177 | 177 | $promocode->users()->detach(); |
| 178 | 178 | $promocode->delete(); |
@@ -225,8 +225,8 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | private function getPrefix() |
| 227 | 227 | { |
| 228 | - return (bool)config('promocodes.prefix') |
|
| 229 | - ? config('promocodes.prefix') . config('promocodes.separator') |
|
| 228 | + return (bool) config('promocodes.prefix') |
|
| 229 | + ? config('promocodes.prefix').config('promocodes.separator') |
|
| 230 | 230 | : ''; |
| 231 | 231 | } |
| 232 | 232 | |
@@ -237,8 +237,8 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | private function getSuffix() |
| 239 | 239 | { |
| 240 | - return (bool)config('promocodes.suffix') |
|
| 241 | - ? config('promocodes.separator') . config('promocodes.suffix') |
|
| 240 | + return (bool) config('promocodes.suffix') |
|
| 241 | + ? config('promocodes.separator').config('promocodes.suffix') |
|
| 242 | 242 | : ''; |
| 243 | 243 | } |
| 244 | 244 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | __DIR__.'/config/promocodes.php', 'promocodes' |
| 34 | 34 | ); |
| 35 | 35 | |
| 36 | - $this->app->singleton('promocodes', function ($app) { |
|
| 36 | + $this->app->singleton('promocodes', function($app) { |
|
| 37 | 37 | return new Promocodes(); |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create(config('promocodes.table', 'promocodes'), function (Blueprint $table) { |
|
| 15 | + Schema::create(config('promocodes.table', 'promocodes'), function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | |
| 18 | 18 | $table->string('code', 32)->unique(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $table->timestamp('expires_at')->nullable(); |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | - Schema::create(config('promocodes.relation_table', 'promocode_user'), function (Blueprint $table) { |
|
| 27 | + Schema::create(config('promocodes.relation_table', 'promocode_user'), function(Blueprint $table) { |
|
| 28 | 28 | $table->unsignedInteger('user_id'); |
| 29 | 29 | $table->unsignedInteger('promocode_id'); |
| 30 | 30 | |