Skip to content

Commit

Permalink
restore code style
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzclue authored Feb 12, 2024
1 parent 217e91b commit c3085ab
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Models/Concerns/HasSubscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public function isSubscribedTo(Plan $plan): bool

public function missingSubscriptionTo(Plan $plan): bool
{
return !$this->hasSubscriptionTo($plan);
return ! $this->hasSubscriptionTo($plan);
}

public function isNotSubscribedTo(Plan $plan): bool
{
return !$this->isSubscribedTo($plan);
return ! $this->isSubscribedTo($plan);
}

public function switchTo(Plan $plan, $expiration = null, $immediately = true): Subscription
Expand Down Expand Up @@ -216,7 +216,7 @@ public function canConsume($featureName, ?float $consumption = null): bool
return false;
}

if (!$feature->consumable) {
if (! $feature->consumable) {
return true;
}

Expand All @@ -231,12 +231,12 @@ public function canConsume($featureName, ?float $consumption = null): bool

public function cantConsume($featureName, ?float $consumption = null): bool
{
return !$this->canConsume($featureName, $consumption);
return ! $this->canConsume($featureName, $consumption);
}

public function hasFeature($featureName): bool
{
return !$this->missingFeature($featureName);
return ! $this->missingFeature($featureName);
}

public function missingFeature($featureName): bool
Expand Down Expand Up @@ -372,7 +372,7 @@ public function getFeaturesAttribute(): Collection

protected function loadSubscriptionFeatures(): Collection
{
if (!is_null($this->loadedSubscriptionFeatures)) {
if (! is_null($this->loadedSubscriptionFeatures)) {
return $this->loadedSubscriptionFeatures;
}

Expand All @@ -383,17 +383,17 @@ protected function loadSubscriptionFeatures(): Collection

protected function loadTicketFeatures(): Collection
{
if (!config('soulbscription.feature_tickets')) {
if (! config('soulbscription.feature_tickets')) {
return $this->loadedTicketFeatures = Collection::empty();
}

if (!is_null($this->loadedTicketFeatures)) {
if (! is_null($this->loadedTicketFeatures)) {
return $this->loadedTicketFeatures;
}

return $this->loadedTicketFeatures = Feature::with([
'tickets' => fn (HasMany $query) => $query->withoutExpired()->whereMorphedTo('subscriber', $this),
])
'tickets' => fn (HasMany $query) => $query->withoutExpired()->whereMorphedTo('subscriber', $this),
])
->whereHas(
'tickets',
fn (Builder $query) => $query->withoutExpired()->whereMorphedTo('subscriber', $this),
Expand Down

0 comments on commit c3085ab

Please sign in to comment.