From d4d4df7d58c32b52278174990747d8195143beea Mon Sep 17 00:00:00 2001 From: Joel Male Date: Sun, 8 Sep 2024 12:20:30 +1000 Subject: [PATCH] pint fixes --- src/CartCollection.php | 4 +++- src/CartConditionCollection.php | 4 +++- src/Exceptions/InvalidConditionException.php | 4 +++- src/Exceptions/InvalidItemException.php | 4 +++- src/Exceptions/UnknownModelException.php | 4 +++- src/Validators/CartConditionValidator.php | 4 +++- src/Validators/CartItemValidator.php | 4 +++- tests/Unit/CartTest.php | 2 +- tests/Unit/CartTestEventsTest.php | 15 ++++++++------- tests/Unit/CartTestMultipleInstancesTest.php | 4 ++-- tests/Unit/ItemTest.php | 2 +- tests/Unit/ItemTestOtherFormatTest.php | 2 +- 12 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/CartCollection.php b/src/CartCollection.php index 18ee559..61b4a2d 100644 --- a/src/CartCollection.php +++ b/src/CartCollection.php @@ -4,4 +4,6 @@ use Illuminate\Support\Collection; -class CartCollection extends Collection {} +class CartCollection extends Collection +{ +} diff --git a/src/CartConditionCollection.php b/src/CartConditionCollection.php index 23c24c0..3ab94b5 100644 --- a/src/CartConditionCollection.php +++ b/src/CartConditionCollection.php @@ -4,4 +4,6 @@ use Illuminate\Support\Collection; -class CartConditionCollection extends Collection {} +class CartConditionCollection extends Collection +{ +} diff --git a/src/Exceptions/InvalidConditionException.php b/src/Exceptions/InvalidConditionException.php index d237983..1fcfd76 100644 --- a/src/Exceptions/InvalidConditionException.php +++ b/src/Exceptions/InvalidConditionException.php @@ -2,4 +2,6 @@ namespace Wearepixel\Cart\Exceptions; -class InvalidConditionException extends \Exception {} +class InvalidConditionException extends \Exception +{ +} diff --git a/src/Exceptions/InvalidItemException.php b/src/Exceptions/InvalidItemException.php index 3c7134a..38a316c 100644 --- a/src/Exceptions/InvalidItemException.php +++ b/src/Exceptions/InvalidItemException.php @@ -2,4 +2,6 @@ namespace Wearepixel\Cart\Exceptions; -class InvalidItemException extends \Exception {} +class InvalidItemException extends \Exception +{ +} diff --git a/src/Exceptions/UnknownModelException.php b/src/Exceptions/UnknownModelException.php index 140f39b..dda5213 100644 --- a/src/Exceptions/UnknownModelException.php +++ b/src/Exceptions/UnknownModelException.php @@ -2,4 +2,6 @@ namespace Wearepixel\Cart\Exceptions; -class UnknownModelException extends \Exception {} +class UnknownModelException extends \Exception +{ +} diff --git a/src/Validators/CartConditionValidator.php b/src/Validators/CartConditionValidator.php index 8cb4b8d..9522126 100644 --- a/src/Validators/CartConditionValidator.php +++ b/src/Validators/CartConditionValidator.php @@ -2,4 +2,6 @@ namespace Wearepixel\Cart\Validators; -class CartConditionValidator extends Validator {} +class CartConditionValidator extends Validator +{ +} diff --git a/src/Validators/CartItemValidator.php b/src/Validators/CartItemValidator.php index d593612..4952185 100644 --- a/src/Validators/CartItemValidator.php +++ b/src/Validators/CartItemValidator.php @@ -2,4 +2,6 @@ namespace Wearepixel\Cart\Validators; -class CartItemValidator extends Validator {} +class CartItemValidator extends Validator +{ +} diff --git a/tests/Unit/CartTest.php b/tests/Unit/CartTest.php index 73cb23e..ecbf8ef 100644 --- a/tests/Unit/CartTest.php +++ b/tests/Unit/CartTest.php @@ -13,7 +13,7 @@ $events, 'shopping', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); }); diff --git a/tests/Unit/CartTestEventsTest.php b/tests/Unit/CartTestEventsTest.php index d098ea0..1bf77c7 100644 --- a/tests/Unit/CartTestEventsTest.php +++ b/tests/Unit/CartTestEventsTest.php @@ -3,7 +3,8 @@ use Wearepixel\Cart\Cart; use Wearepixel\Cart\Tests\Helpers\SessionMock; -beforeEach(function () {}); +beforeEach(function () { +}); afterEach(function () { Mockery::close(); @@ -18,7 +19,7 @@ $events, 'cart', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); expect(true)->toBeTrue(); @@ -35,7 +36,7 @@ $events, 'cart', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); $cart->add(455, 'Sample Item', 100.99, 2, []); @@ -54,7 +55,7 @@ $events, 'cart', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); $cart->add(455, 'Sample Item 1', 100.99, 2, []); @@ -98,7 +99,7 @@ $events, 'cart', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); $cart->add($items); @@ -143,7 +144,7 @@ $events, 'cart', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); $cart->add($items); @@ -190,7 +191,7 @@ $events, 'cart', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); $cart->add($items); diff --git a/tests/Unit/CartTestMultipleInstancesTest.php b/tests/Unit/CartTestMultipleInstancesTest.php index eb1017c..333d92c 100644 --- a/tests/Unit/CartTestMultipleInstancesTest.php +++ b/tests/Unit/CartTestMultipleInstancesTest.php @@ -12,7 +12,7 @@ $events, 'shopping', 'uniquesessionkey123', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); $this->cart2 = new Cart( @@ -20,7 +20,7 @@ $events, 'wishlist', 'uniquesessionkey456', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); }); diff --git a/tests/Unit/ItemTest.php b/tests/Unit/ItemTest.php index fd18d39..0fc3222 100644 --- a/tests/Unit/ItemTest.php +++ b/tests/Unit/ItemTest.php @@ -14,7 +14,7 @@ $events, 'shopping', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMock.php') + require(__DIR__ . '/../Helpers/ConfigMock.php') ); }); diff --git a/tests/Unit/ItemTestOtherFormatTest.php b/tests/Unit/ItemTestOtherFormatTest.php index 928e8af..ba2150e 100644 --- a/tests/Unit/ItemTestOtherFormatTest.php +++ b/tests/Unit/ItemTestOtherFormatTest.php @@ -12,7 +12,7 @@ $events, 'shopping', 'SAMPLESESSIONKEY', - require (__DIR__ . '/../Helpers/ConfigMockOtherFormat.php') + require(__DIR__ . '/../Helpers/ConfigMockOtherFormat.php') ); });