Passed
Push — master ( eba659...b75679 )
by Justin
04:34
created
src/Billable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
      */
163 163
     public function onPlan($plan)
164 164
     {
165
-        return !is_null($this->subscriptions->first(function ($value) use ($plan) {
165
+        return !is_null($this->subscriptions->first(function($value) use ($plan) {
166 166
             return $value->plan === $plan && $value->valid();
167 167
         }));
168 168
     }
Please login to merge, or discard this patch.
src/Http/Controllers/WebhookController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
             // prepare category event class names like OrderAny
72 72
             $explodedType = explode('.', $event['type']);
73 73
             $category = array_shift($explodedType);
74
-            $categoryEvent = '\TwentyTwoDigital\CashierFastspring\Events\\' . Str::studly($category) . 'Any';
74
+            $categoryEvent = '\TwentyTwoDigital\CashierFastspring\Events\\'.Str::studly($category).'Any';
75 75
 
76 76
             // prepare category event class names like activity
77 77
             $activity = str_replace('.', ' ', $event['type']);
78
-            $activityEvent = '\TwentyTwoDigital\CashierFastspring\Events\\' . Str::studly($activity);
78
+            $activityEvent = '\TwentyTwoDigital\CashierFastspring\Events\\'.Str::studly($activity);
79 79
 
80 80
             // there may be some exceptions on events
81 81
             // so if anything goes bad its ID won't be added on the successfullEvents
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 // check if the related event classes are exist
86 86
                 // there may be not handled events
87 87
                 if (!class_exists($categoryEvent) || !class_exists($activityEvent)) {
88
-                    throw new Exception('There is no event for ' . $event['type']);
88
+                    throw new Exception('There is no event for '.$event['type']);
89 89
                 }
90 90
 
91 91
                 // trigger events
Please login to merge, or discard this patch.
src/CashierServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,20 +29,20 @@
 block discarded – undo
29 29
 
30 30
         // publish migrations
31 31
         $this->publishes([
32
-            __DIR__ . '/../resources/migrations/create_subscriptions_table_for_cashier_fastspring.php' => sprintf(
33
-                database_path('migrations') . '/%s_create_subscriptions_table_for_cashier_fastspring.php',
32
+            __DIR__.'/../resources/migrations/create_subscriptions_table_for_cashier_fastspring.php' => sprintf(
33
+                database_path('migrations').'/%s_create_subscriptions_table_for_cashier_fastspring.php',
34 34
                 date('Y_m_d_His', $time)
35 35
             ),
36
-            __DIR__ . '/../resources/migrations/upgrade_user_table_for_cashier_fastspring.php' => sprintf(
37
-                database_path('migrations') . '/%s_upgrade_user_table_for_cashier_fastspring.php',
36
+            __DIR__.'/../resources/migrations/upgrade_user_table_for_cashier_fastspring.php' => sprintf(
37
+                database_path('migrations').'/%s_upgrade_user_table_for_cashier_fastspring.php',
38 38
                 date('Y_m_d_His', ++$time)
39 39
             ),
40
-            __DIR__ . '/../resources/migrations/create_invoices_table_for_cashier_fastspring.php' => sprintf(
41
-                database_path('migrations') . '/%s_create_invoices_table_for_cashier_fastspring.php',
40
+            __DIR__.'/../resources/migrations/create_invoices_table_for_cashier_fastspring.php' => sprintf(
41
+                database_path('migrations').'/%s_create_invoices_table_for_cashier_fastspring.php',
42 42
                 date('Y_m_d_His', ++$time)
43 43
             ),
44
-            __DIR__ . '/../resources/migrations/create_subscription_periods_table_for_cashier_fastspring.php' => sprintf(
45
-                database_path('migrations') . '/%s_create_subscription_periods_table_for_cashier_fastspring.php',
44
+            __DIR__.'/../resources/migrations/create_subscription_periods_table_for_cashier_fastspring.php' => sprintf(
45
+                database_path('migrations').'/%s_create_subscription_periods_table_for_cashier_fastspring.php',
46 46
                 date('Y_m_d_His', ++$time)
47 47
             ),
48 48
         ]);
Please login to merge, or discard this patch.
src/Listeners/SubscriptionChargeCompleted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         $periodEndDate = $nextDate->subDay()->format('Y-m-d H:i:s');
68 68
 
69 69
         // yeap, weird way
70
-        $methodName = 'sub' . Str::title($subscription->interval_unit) . 'sNoOverflow';
70
+        $methodName = 'sub'.Str::title($subscription->interval_unit).'sNoOverflow';
71 71
         $periodStartDate = $nextDate->$methodName($subscription->interval_length)->addDay()->format('Y-m-d H:i:s');
72 72
 
73 73
         // fill the model
Please login to merge, or discard this patch.
src/Subscription.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                     break;
220 220
 
221 221
                 default:
222
-                    throw new Exception('Unexcepted interval unit: ' . $subscription->interval_unit);
222
+                    throw new Exception('Unexcepted interval unit: '.$subscription->interval_unit);
223 223
             }
224 224
 
225 225
             $subscriptionPeriodData = [
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
             return $this;
435 435
         }
436 436
 
437
-        throw new Exception('Swap operation failed. Response: ' . json_encode($response));
437
+        throw new Exception('Swap operation failed. Response: '.json_encode($response));
438 438
     }
439 439
 
440 440
     /**
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
             return $this;
461 461
         }
462 462
 
463
-        throw new Exception('Cancel operation failed. Response: ' . json_encode($response));
463
+        throw new Exception('Cancel operation failed. Response: '.json_encode($response));
464 464
     }
465 465
 
466 466
     /**
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
             return $this;
485 485
         }
486 486
 
487
-        throw new Exception('CancelNow operation failed. Response: ' . json_encode($response));
487
+        throw new Exception('CancelNow operation failed. Response: '.json_encode($response));
488 488
     }
489 489
 
490 490
     /**
@@ -516,6 +516,6 @@  discard block
 block discarded – undo
516 516
             return $this;
517 517
         }
518 518
 
519
-        throw new Exception('Resume operation failed. Response: ' . json_encode($response));
519
+        throw new Exception('Resume operation failed. Response: '.json_encode($response));
520 520
     }
521 521
 }
Please login to merge, or discard this patch.