@@ -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) { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | $subscription = $this->subscription($subscription); |
| 142 | 142 | |
| 143 | - if (! $subscription || ! $subscription->valid()) { |
|
| 143 | + if (!$subscription || !$subscription->valid()) { |
|
| 144 | 144 | return false; |
| 145 | 145 | } |
| 146 | 146 | |
@@ -162,7 +162,7 @@ discard block |
||
| 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 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function hasFastspringId() |
| 176 | 176 | { |
| 177 | - return ! is_null($this->fastspring_id); |
|
| 177 | + return !is_null($this->fastspring_id); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | { |
| 234 | 234 | // check the fastspring_id first |
| 235 | 235 | // if there is non, no need to try |
| 236 | - if (! $this->hasFastspringId()) { |
|
| 236 | + if (!$this->hasFastspringId()) { |
|
| 237 | 237 | throw new Exception('User has no fastspring_id'); |
| 238 | 238 | } |
| 239 | 239 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | { |
| 265 | 265 | // check the fastspring_id first |
| 266 | 266 | // if there is non, no need to try |
| 267 | - if (! $this->hasFastspringId()) { |
|
| 267 | + if (!$this->hasFastspringId()) { |
|
| 268 | 268 | throw new Exception('User has no fastspring_id'); |
| 269 | 269 | } |
| 270 | 270 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | // if there is not any constructed instance |
| 30 | 30 | // construct and save it to self::$instance |
| 31 | - if (! self::$instance) { |
|
| 31 | + if (!self::$instance) { |
|
| 32 | 32 | $username = (getenv('FASTSPRING_USERNAME') ?: config('services.fastspring.username')); |
| 33 | 33 | $password = (getenv('FASTSPRING_PASSWORD') ?: config('services.fastspring.password')); |
| 34 | 34 | |
@@ -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; |