Skip to content

Commit 5964c68

Browse files
Remove unnecessary classes, change package dependency in composer.json
1 parent bb52bd0 commit 5964c68

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

Service/DeliveryOptions/Locations.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace Vendic\PostnlApi\Service\DeliveryOptions;
44

5+
use Magento\Checkout\Model\Session;
6+
use Magento\Framework\Exception\LocalizedException;
57
use Magento\Framework\Serialize\SerializerInterface;
68
use TIG\PostNL\Helper\AddressEnhancer;
79
use TIG\PostNL\Service\Carrier\Price\Calculator;
810
use TIG\PostNL\Webservices\Endpoints\Locations as LocationsEndpoint;
9-
use Magento\Checkout\Model\Session;
10-
use Magento\Framework\Exception\LocalizedException;
1111
use Vendic\PostnlApi\Api\Data\LocationInterface;
1212
use Vendic\PostnlApi\Api\Data\LocationInterfaceFactory;
1313
use Vendic\PostnlApi\Api\Data\PostnlRequestInterface;
@@ -78,7 +78,7 @@ private function getLocations($address)
7878
$quote = $this->checkoutSession->getQuote();
7979
$storeId = $quote->getStoreId();
8080
$this->locationsEndpoint->changeAPIKeyByStoreId($storeId);
81-
$this->locationsEndpoint->updateParameters($address ,$deliveryDate);
81+
$this->locationsEndpoint->updateParameters($address, $deliveryDate);
8282
$response = $this->locationsEndpoint->call();
8383
//@codingStandardsIgnoreLine
8484
if (!is_object($response) || !isset($response->GetLocationsResult->ResponseLocation)) {
@@ -93,7 +93,7 @@ private function getLocations($address)
9393
$factory = $this->locationFactory;
9494

9595
return array_map(
96-
static function (array $locationData) use ($factory) {
96+
static function (array $locationData) use ($factory) {
9797
return $factory->create(['data' => $locationData]);
9898
},
9999
$responseArray

Service/DeliveryOptions/Save.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Vendic\PostnlApi\Service\DeliveryOptions;
44

55
use Magento\Checkout\Model\Session as CheckoutSession;
6-
use Magento\Framework\Exception\CouldNotSaveException;
76
use Magento\Framework\Exception\LocalizedException;
87
use TIG\PostNL\Config\Provider\AddressConfiguration;
98
use TIG\PostNL\Config\Provider\ProductOptions;

Service/DeliveryOptions/Timeframes.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use TIG\PostNL\Service\Shipment\EpsCountries;
1818
use TIG\PostNL\Service\Shipping\LetterboxPackage;
1919
use TIG\PostNL\Service\Validation\CountryShipping;
20-
use TIG\PostNL\Webservices\Endpoints\DeliveryDate;
2120
use TIG\PostNL\Webservices\Endpoints\TimeFrame;
2221
use Vendic\PostnlApi\Api\Data\PostnlRequestInterface;
2322
use Vendic\PostnlApi\Api\TimeframesInterface;

Test/Integration/RequestBuilder/LocationsRequestTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
namespace Vendic\PostnlApi\Test\Integration\RequestBuilder;
77

8-
use Magento\Framework\ObjectManagerInterface;
98
use Magento\TestFramework\Helper\Bootstrap;
109
use Magento\Quote\Model\Quote\Address as QuoteAddress;
1110
use PHPUnit\Framework\TestCase;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Adds Magento 2 service methods to the tig/postnl module.",
44
"require": {
55
"php": "~7.4|~8.1",
6-
"tig/postnl-magento2": ">=1.12 <1.21",
6+
"tig/postnl-magento2": "^1.21",
77
"magento/magento-composer-installer": "*"
88
},
99
"require-dev": {

0 commit comments

Comments
 (0)