Completed
Push — master ( 9c2e57...960d6d )
by Zura
03:25
created
src/ServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
     public function boot()
15 15
     {
16 16
         $this->publishes([
17
-            __DIR__ . '/../config/promocodes.php' => config_path('promocodes.php'),
17
+            __DIR__.'/../config/promocodes.php' => config_path('promocodes.php'),
18 18
         ]);
19 19
 
20 20
         $this->publishes([
21
-            __DIR__ . '/../migrations' => database_path('migrations'),
21
+            __DIR__.'/../migrations' => database_path('migrations'),
22 22
         ], 'migrations');
23 23
     }
24 24
 
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
     public function register()
31 31
     {
32 32
         $this->mergeConfigFrom(
33
-            __DIR__ . '/../config/promocodes.php', 'promocodes'
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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         if (Promocode::insert($records)) {
90
-            return collect($records)->map(function ($record) {
90
+            return collect($records)->map(function($record) {
91 91
                 $record['data'] = json_decode($record['data'], true);
92 92
 
93 93
                 return $record;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function clearRedundant()
216 216
     {
217
-        Promocode::all()->each(function (Promocode $promocode) {
217
+        Promocode::all()->each(function(Promocode $promocode) {
218 218
             if ($promocode->isExpired() || ($promocode->isDisposable() && $promocode->users()->exists())) {
219 219
                 $promocode->users()->detach();
220 220
                 $promocode->delete();
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
      */
262 262
     private function getPrefix()
263 263
     {
264
-        return (bool)config('promocodes.prefix')
265
-            ? config('promocodes.prefix') . config('promocodes.separator')
264
+        return (bool) config('promocodes.prefix')
265
+            ? config('promocodes.prefix').config('promocodes.separator')
266 266
             : '';
267 267
     }
268 268
 
@@ -273,8 +273,8 @@  discard block
 block discarded – undo
273 273
      */
274 274
     private function getSuffix()
275 275
     {
276
-        return (bool)config('promocodes.suffix')
277
-            ? config('promocodes.separator') . config('promocodes.suffix')
276
+        return (bool) config('promocodes.suffix')
277
+            ? config('promocodes.separator').config('promocodes.suffix')
278 278
             : '';
279 279
     }
280 280
 
Please login to merge, or discard this patch.