Completed
Push — master ( b3e6db...e7b516 )
by Zura
01:43
created
src/PromocodesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Promocodes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/migrations/2016_05_17_221000_create_promocodes_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             
Please login to merge, or discard this patch.