Skip to content

Commit

Permalink
fix: PHPStan changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bird87ZA committed Feb 11, 2025
1 parent 0f9eff5 commit 2b95793
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Installment/Banner/InstallmentBannerSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private function getCountryCode(SalesChannelContext $salesChannelContext): strin
return $isoCode;
}

return $salesChannelContext->getShippingLocation()->getCountry()->getIso();
return $salesChannelContext->getShippingLocation()->getCountry()->getIso() ?? '';
}

private function pageOfCorrectType(Page $page): bool
Expand Down
2 changes: 1 addition & 1 deletion src/Util/PayLaterAvailabilityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class PayLaterAvailabilityChecker
{
/**
* @var array<string, array<string, float>>
* @var array<string, array<string, string|float>>
*
* @see https://developer.paypal.com/studio/checkout/pay-later/{{countryCode}}
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Util/Availability/AvailabilityContextBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* file that was distributed with this source code.
*/

namespace Swag\PayPal\Test\Util\Lifecycle;
namespace Swag\PayPal\Test\Util\Availability;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Util/Availability/AvailabilityServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* file that was distributed with this source code.
*/

namespace Swag\PayPal\Test\Util\Lifecycle;
namespace Swag\PayPal\Test\Util\Availability;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
Expand Down
5 changes: 2 additions & 3 deletions tests/Util/Lifecycle/Method/PayLaterMethodDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Swag\PayPal\Test\Util\Lifecycle\Method;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Shopware\Core\Framework\Log\Package;
use Swag\PayPal\Checkout\Payment\Method\PayLaterHandler;
Expand Down Expand Up @@ -64,9 +65,7 @@ public function testGetTechnicalName(): void
static::assertSame('swag_paypal_pay_later', $this->payLaterMethodData->getTechnicalName());
}

/**
* @dataProvider availabilityProvider
*/
#[DataProvider('availabilityProvider')]
public function testIsAvailable(string $currencyCode, string $countryCode, float $totalAmount, bool $expected): void
{
$availabilityContext = $this->createMock(AvailabilityContext::class);
Expand Down

0 comments on commit 2b95793

Please sign in to comment.