@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('subscriptions', function (Blueprint $table) { |
|
16 | + Schema::create('subscriptions', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->unsignedInteger('user_id'); |
19 | 19 | $table->string('name'); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('users', function ($table) { |
|
16 | + Schema::table('users', function($table) { |
|
17 | 17 | $table->string('fastspring_id')->nullable(); |
18 | 18 | $table->string('company')->nullable(); |
19 | 19 | $table->string('phone')->nullable(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function down() |
31 | 31 | { |
32 | - Schema::table('users', function (Blueprint $table) { |
|
32 | + Schema::table('users', function(Blueprint $table) { |
|
33 | 33 | $table->dropColumn(['fastspring_id', 'company', 'phone', 'language', 'country']); |
34 | 34 | }); |
35 | 35 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('subscription_periods', function (Blueprint $table) { |
|
16 | + Schema::create('subscription_periods', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->unsignedInteger('subscription_id'); |
19 | 19 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('invoices', function (Blueprint $table) { |
|
16 | + Schema::create('invoices', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->unsignedInteger('user_id'); |
19 | 19 | $table->string('fastspring_id')->nullable(); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | try { |
70 | 70 | // check if the related event classes are exist |
71 | 71 | // there may be not handled events |
72 | - if (! class_exists($categoryEvent) || ! class_exists($activityEvent)) { |
|
72 | + if (!class_exists($categoryEvent) || !class_exists($activityEvent)) { |
|
73 | 73 | throw new Exception('There is no event for '.$event['type']); |
74 | 74 | } |
75 | 75 |
@@ -105,7 +105,7 @@ |
||
105 | 105 | */ |
106 | 106 | protected function getFastspringIdOfCustomer() |
107 | 107 | { |
108 | - if (! $this->owner->fastspring_id) { |
|
108 | + if (!$this->owner->fastspring_id) { |
|
109 | 109 | try { |
110 | 110 | $customer = $this->owner->createAsFastspringCustomer(); |
111 | 111 | } catch (ClientException $e) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $subscription = $user->subscription(); |
47 | 47 | |
48 | - if (! $subscription) { |
|
48 | + if (!$subscription) { |
|
49 | 49 | $subscription = new Subscription(); |
50 | 50 | $subscription->user_id = $user->id; |
51 | 51 | $subscription->name = $subscriptionName; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | ]; |
217 | 217 | |
218 | 218 | $lastPeriod = SubscriptionPeriod::firstOrCreate($subscriptionPeriodData); |
219 | - } while (! ($today->greaterThanOrEqualTo($lastPeriod->start_date) |
|
219 | + } while (!($today->greaterThanOrEqualTo($lastPeriod->start_date) |
|
220 | 220 | && $today->lessThanOrEqualTo($lastPeriod->end_date) |
221 | 221 | )); |
222 | 222 | |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | */ |
247 | 247 | public function valid() |
248 | 248 | { |
249 | - return ! $this->deactivated(); |
|
249 | + return !$this->deactivated(); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | */ |
486 | 486 | public function resume() |
487 | 487 | { |
488 | - if (! $this->onGracePeriod()) { |
|
488 | + if (!$this->onGracePeriod()) { |
|
489 | 489 | throw new LogicException('Unable to resume subscription that is not within grace period or not canceled.'); |
490 | 490 | } |
491 | 491 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public static function __callStatic($method, $parameters) |
40 | 40 | { |
41 | - if (! self::$instance) { |
|
41 | + if (!self::$instance) { |
|
42 | 42 | $username = (getenv('FASTSPRING_USERNAME') ?: config('services.fastspring.username')); |
43 | 43 | $password = (getenv('FASTSPRING_PASSWORD') ?: config('services.fastspring.password')); |
44 | 44 |