Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored and github-actions[bot] committed Jan 13, 2024
1 parent 721cb25 commit 24ebac7
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Gateways/BaseGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Statamic\Extend\HasHandle;
use Statamic\Extend\RegistersItself;

abstract class BaseGateway
{
Expand Down
1 change: 1 addition & 0 deletions src/Gateways/Builtin/MollieGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
class MollieGateway extends BaseGateway implements Gateway
{
protected $mollie;

protected static $handle = 'mollie';

public function name(): string
Expand Down
1 change: 1 addition & 0 deletions src/Gateways/Builtin/PayPalGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
class PayPalGateway extends BaseGateway implements Gateway
{
protected $paypalClient;

protected static $handle = 'paypal';

public function name(): string
Expand Down
1 change: 1 addition & 0 deletions src/Gateways/Builtin/StripeGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
class StripeGateway extends BaseGateway implements Gateway
{
protected bool $isUsingTestMode = false;

protected static $handle = 'stripe';

public function name(): string
Expand Down
2 changes: 1 addition & 1 deletion src/Gateways/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function resolve()

$gateway = SimpleCommerce::gateways()
->filter(function ($gateway) {
return $gateway['class']::handle() === $this->handle || $gateway['class'] === $this->handle;
return $this->handle === $gateway['class']::handle() || $gateway['class'] === $this->handle;
})
->first();

Expand Down
1 change: 0 additions & 1 deletion src/Orders/Calculator/ShippingTaxCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Closure;
use DoubleThreeDigital\SimpleCommerce\Contracts\Order;
use DoubleThreeDigital\SimpleCommerce\Contracts\ShippingMethod;
use DoubleThreeDigital\SimpleCommerce\Facades\Shipping;
use DoubleThreeDigital\SimpleCommerce\SimpleCommerce;
use Statamic\Facades\Site;
Expand Down
2 changes: 1 addition & 1 deletion src/Shipping/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function resolve()

$shippingMethod = SimpleCommerce::shippingMethods($siteHandle)
->filter(function ($shippingMethod) {
return $shippingMethod['class']::handle() === $this->handle || $shippingMethod['class'] === $this->handle;
return $this->handle === $shippingMethod['class']::handle() || $shippingMethod['class'] === $this->handle;
})
->first();

Expand Down
2 changes: 1 addition & 1 deletion src/Tags/CheckoutTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function wildcard(string $tag)
$gatewayHandle = last(explode(':', $tag));

$gateway = SimpleCommerce::gateways()
->filter(fn ($gateway) => $gateway['class']::handle() === $gatewayHandle)
->filter(fn ($gateway) => $gatewayHandle === $gateway['class']::handle())
->first();

if (! $gateway) {
Expand Down

0 comments on commit 24ebac7

Please sign in to comment.