Skip to content

Commit

Permalink
PHPStan cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
spitfire305 committed Apr 24, 2024
1 parent f9502e4 commit b867494
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions app/Services/PayPalService.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ public function subscribe(string $pledge): void
$this->user->save();

$sub = new Subscription();
$sub->user_id = $this->user->id; // @phpstan-ignore-line
$sub->type = 'kanka'; // @phpstan-ignore-line
$sub->stripe_id = 'manual_sub_' . uniqid(); // @phpstan-ignore-line
$sub->stripe_status = 'canceled'; // @phpstan-ignore-line
$sub->stripe_price = 'paypal_' . $this->user->pledge; // @phpstan-ignore-line
$sub->quantity = 1; // @phpstan-ignore-line
$sub->ends_at = Carbon::now()->addYear(); // @phpstan-ignore-line
$sub->user_id = $this->user->id;
$sub->type = 'kanka';
$sub->stripe_id = 'manual_sub_' . uniqid();
$sub->stripe_status = 'canceled';
$sub->stripe_price = 'paypal_' . $this->user->pledge;
$sub->quantity = 1;
$sub->ends_at = Carbon::now()->addYear();
$sub->save();
} else {
// Add the subscription to the user level
Expand Down
14 changes: 7 additions & 7 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ public function asUser(bool $subscribed = false): self
$user->save();

$sub = new Subscription();
$sub->user_id = $user->id; // @phpstan-ignore-line
$sub->type = 'kanka'; // @phpstan-ignore-line
$sub->stripe_id = 'manual_sub_' . uniqid(); // @phpstan-ignore-line
$sub->stripe_status = 'canceled'; // @phpstan-ignore-line
$sub->stripe_price = 'paypal_' . $user->pledge; // @phpstan-ignore-line
$sub->quantity = 1; // @phpstan-ignore-line
$sub->ends_at = Carbon::now()->addYear(); // @phpstan-ignore-line
$sub->user_id = $user->id;
$sub->type = 'kanka';
$sub->stripe_id = 'manual_sub_' . uniqid();
$sub->stripe_status = 'canceled';
$sub->stripe_price = 'paypal_' . $user->pledge;
$sub->quantity = 1;
$sub->ends_at = Carbon::now()->addYear();
$sub->save();
}
return $this;
Expand Down

0 comments on commit b867494

Please sign in to comment.