Completed
Pull Request — master (#38)
by Zura
01:50
created
src/Promocodes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         if (Promocode::insert($records)) {
92
-            return collect($records)->map(function ($record) {
92
+            return collect($records)->map(function($record) {
93 93
                 $record['data'] = json_decode($record['data'], true);
94 94
 
95 95
                 return $record;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function clearRedundant()
225 225
     {
226
-        Promocode::all()->each(function (Promocode $promocode) {
226
+        Promocode::all()->each(function(Promocode $promocode) {
227 227
             if ($promocode->isExpired() || ($promocode->isDisposable() && $promocode->users()->exists()) || $promocode->isOverAmount()) {
228 228
                 $promocode->users()->detach();
229 229
                 $promocode->delete();
@@ -270,8 +270,8 @@  discard block
 block discarded – undo
270 270
      */
271 271
     private function getPrefix()
272 272
     {
273
-        return (bool)config('promocodes.prefix')
274
-            ? config('promocodes.prefix') . config('promocodes.separator')
273
+        return (bool) config('promocodes.prefix')
274
+            ? config('promocodes.prefix').config('promocodes.separator')
275 275
             : '';
276 276
     }
277 277
 
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
      */
283 283
     private function getSuffix()
284 284
     {
285
-        return (bool)config('promocodes.suffix')
286
-            ? config('promocodes.separator') . config('promocodes.suffix')
285
+        return (bool) config('promocodes.suffix')
286
+            ? config('promocodes.separator').config('promocodes.suffix')
287 287
             : '';
288 288
     }
289 289
 
Please login to merge, or discard this patch.
migrations/2018_10_22_221099_add_amount_codes_row.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::table(config('promocodes.table', 'promocodes'), function (Blueprint $table) {
15
+        Schema::table(config('promocodes.table', 'promocodes'), function(Blueprint $table) {
16 16
             $table->integer('quantity')->nullable();
17 17
         });
18 18
     }
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function down()
26 26
     {
27
-        Schema::table(config('promocodes.table', 'promocodes'), function (Blueprint $table) {
27
+        Schema::table(config('promocodes.table', 'promocodes'), function(Blueprint $table) {
28 28
             $table->dropColumn('quantity');
29 29
         });
30 30
     }
Please login to merge, or discard this patch.