diff --git a/src/Services/Balikobot.php b/src/Services/Balikobot.php index 2cd858c..a7d3319 100644 --- a/src/Services/Balikobot.php +++ b/src/Services/Balikobot.php @@ -195,7 +195,7 @@ public function trackPackageLastStatus(OrderedPackage $package): PackageStatus /** * Track package last status * - * @param \Inspirum\Balikobot\Model\Aggregates\OrderedPackageCollection $package + * @param \Inspirum\Balikobot\Model\Aggregates\OrderedPackageCollection $packages * * @return \Inspirum\Balikobot\Model\Values\PackageStatus[] * @@ -451,8 +451,11 @@ public function getBranchesForShipperService(string $shipper, ?string $service, * * @throws \Inspirum\Balikobot\Contracts\ExceptionInterface */ - public function getBranchesForShipperServiceForCountries(string $shipper, ?string $service, array $countries): iterable - { + public function getBranchesForShipperServiceForCountries( + string $shipper, + ?string $service, + array $countries + ): iterable { foreach ($countries as $country) { yield from $this->getBranchesForShipperService($shipper, $service, $country); } @@ -628,7 +631,7 @@ public function orderB2AShipment(PackageCollection $packages): OrderedPackageCol /** * Get PDF link with signed consignment delivery document by the recipient * - * @param \Inspirum\Balikobot\Model\Aggregates\OrderedPackageCollection $packages + * @param \Inspirum\Balikobot\Model\Values\OrderedPackage $package * * @return string * diff --git a/src/Services/Client.php b/src/Services/Client.php index 717e8cd..eca2065 100644 --- a/src/Services/Client.php +++ b/src/Services/Client.php @@ -388,8 +388,12 @@ public function getManipulationUnits(string $shipper): array * * @throws \Inspirum\Balikobot\Contracts\ExceptionInterface */ - public function getBranches(string $shipper, string $service = null, bool $fullData = false, string $country = null): array - { + public function getBranches( + string $shipper, + string $service = null, + bool $fullData = false, + string $country = null + ): array { $request = $fullData ? Request::FULL_BRANCHES : Request::BRANCHES; $response = $this->requester->call(API::V1, $shipper, $request . '/' . $service . '/' . $country); diff --git a/tests/Unit/Balikobot/GetBranchesTest.php b/tests/Unit/Balikobot/GetBranchesTest.php index c5a4c4b..08a83cf 100644 --- a/tests/Unit/Balikobot/GetBranchesTest.php +++ b/tests/Unit/Balikobot/GetBranchesTest.php @@ -155,9 +155,11 @@ public function testGetBranchesForShipperCallForEmptyServices() ); $service->shouldReceive('getServices')->with('zasilkovna')->andReturn([]); - $service->shouldReceive('getBranchesForShipperService')->with('zasilkovna', null, null)->andReturnUsing(function () { - yield from $this->branchesGenerator(2); - }); + $service->shouldReceive('getBranchesForShipperService') + ->with('zasilkovna', null, null) + ->andReturnUsing(function () { + yield from $this->branchesGenerator(2); + }); $count = 0; foreach ($service->getBranchesForShipper('zasilkovna') as $branch) { diff --git a/tests/Unit/OrderedPackageTest.php b/tests/Unit/OrderedPackageTest.php index d0a583e..1d2f793 100644 --- a/tests/Unit/OrderedPackageTest.php +++ b/tests/Unit/OrderedPackageTest.php @@ -67,7 +67,7 @@ public function testStaticConstructorWithFinalTrackUrl() $orderedPackage = OrderedPackage::newInstanceFromData('cp', '0001', [ 'package_id' => 1234, 'carrier_id_final' => '00605444103', - 'track_url_final' => 'https://online.gls-slovakia.sk/tt_page.php?tt_value=00605444103', + 'track_url_final' => 'https://online.gls-slovakia.sk/tt_page.php', ]); $this->assertEquals('cp', $orderedPackage->getShipper()); @@ -78,7 +78,7 @@ public function testStaticConstructorWithFinalTrackUrl() $this->assertEquals(null, $orderedPackage->getLabelUrl()); $this->assertEquals(null, $orderedPackage->getCarrierIdSwap()); $this->assertEquals('00605444103', $orderedPackage->getFinalCarrierId()); - $this->assertEquals('https://online.gls-slovakia.sk/tt_page.php?tt_value=00605444103', $orderedPackage->getFinalTrackUrl()); + $this->assertEquals('https://online.gls-slovakia.sk/tt_page.php', $orderedPackage->getFinalTrackUrl()); $this->assertEquals([], $orderedPackage->getPieces()); } }