From 60cc91171c958786c7b2a2ee9aa39ad272153b30 Mon Sep 17 00:00:00 2001 From: Grischa Brockhaus Date: Thu, 6 Dec 2018 17:42:08 +0100 Subject: [PATCH] Wrappers missing return's --- .gitignore | 5 ++++- Library/AddressValidationWrapper.php | 2 +- Library/RateWrapper.php | 2 +- Library/ShippingWrapper.php | 12 ++++++++---- Library/TrackingWrapper.php | 4 ++-- Library/TradeabilityWrapper.php | 2 +- composer.json | 2 +- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 1a55048..4a2c949 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ vendor composer.lock -bin/ \ No newline at end of file +bin/ +/composer +/composer.phar +/.idea \ No newline at end of file diff --git a/Library/AddressValidationWrapper.php b/Library/AddressValidationWrapper.php index 01a6ed9..117576f 100644 --- a/Library/AddressValidationWrapper.php +++ b/Library/AddressValidationWrapper.php @@ -49,7 +49,7 @@ public function validate( $requestOption = AddressValidation::REQUEST_OPTION_ADDRESS_VALIDATION, $maxSuggestion = 15 ) { - $this->upsAddressValidation->validate($address, $requestOption, $maxSuggestion); + return $this->upsAddressValidation->validate($address, $requestOption, $maxSuggestion); } /** diff --git a/Library/RateWrapper.php b/Library/RateWrapper.php index 71cc3ca..c3c6365 100644 --- a/Library/RateWrapper.php +++ b/Library/RateWrapper.php @@ -43,7 +43,7 @@ public function __construct(Rate $upsRate) */ public function shopRates($rateRequest) { - $this->upsRate->shopRates($rateRequest); + return $this->upsRate->shopRates($rateRequest); } /** diff --git a/Library/ShippingWrapper.php b/Library/ShippingWrapper.php index a0b8c69..a828d1a 100644 --- a/Library/ShippingWrapper.php +++ b/Library/ShippingWrapper.php @@ -37,6 +37,7 @@ public function __construct(\Ups\Shipping $upsShipping) * @param Shipment $shipment * @param ShipmentRequestLabelSpecification|null $labelSpec * @param ShipmentRequestReceiptSpecification|null $receiptSpec + * @return \stdClass */ public function confirm( $validation, @@ -44,7 +45,7 @@ public function confirm( ShipmentRequestLabelSpecification $labelSpec = null, ShipmentRequestReceiptSpecification $receiptSpec = null ) { - $this->upsShipping->confirm( + return $this->upsShipping->confirm( $validation, $shipment, $labelSpec, @@ -54,18 +55,20 @@ public function confirm( /** * @param $shipmentDigest + * @return \stdClass */ public function accept($shipmentDigest) { - $this->upsShipping->accept($shipmentDigest); + return $this->upsShipping->accept($shipmentDigest); } /** * @param $shipmentData + * @return \stdClass */ public function void($shipmentData) { - $this->upsShipping->void($shipmentData); + return $this->upsShipping->void($shipmentData); } /** @@ -73,6 +76,7 @@ public function void($shipmentData) * @param null $labelSpecification * @param null $labelDelivery * @param null $translate + * @return \stdClass */ public function recoverLabel( $trackingData, @@ -80,7 +84,7 @@ public function recoverLabel( $labelDelivery = null, $translate = null ) { - $this->upsShipping->recoverLabel( + return $this->upsShipping->recoverLabel( $trackingData, $labelSpecification, $labelDelivery, diff --git a/Library/TrackingWrapper.php b/Library/TrackingWrapper.php index cc8ac9b..b4167db 100644 --- a/Library/TrackingWrapper.php +++ b/Library/TrackingWrapper.php @@ -45,7 +45,7 @@ public function __construct(Tracking $upsTracking) */ public function track($trackingNumber, $requestOption = 'activity') { - $this->upsTracking->track($trackingNumber, $requestOption); + return $this->upsTracking->track($trackingNumber, $requestOption); } /** @@ -59,7 +59,7 @@ public function track($trackingNumber, $requestOption = 'activity') */ public function trackByReference($referenceNumber, $requestOption = 'activity') { - $this->upsTracking->trackByReference($referenceNumber, $requestOption); + return $this->upsTracking->trackByReference($referenceNumber, $requestOption); } /** diff --git a/Library/TradeabilityWrapper.php b/Library/TradeabilityWrapper.php index c101b65..8694e99 100644 --- a/Library/TradeabilityWrapper.php +++ b/Library/TradeabilityWrapper.php @@ -41,7 +41,7 @@ public function __construct(Tradeability $upsTradeability) */ public function getLandedCosts(LandedCostRequest $request) { - $this->upsTradeability->getLandedCosts($request); + return $this->upsTradeability->getLandedCosts($request); } /** diff --git a/composer.json b/composer.json index 5a6628f..7c88195 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "octante/ups-api-bundle", + "name": "brockhaus/ups-api-bundle", "type": "symfony-bundle", "description": "UPS API Bundle for Symfony2 and Symfony3", "keywords": ["ups", "ups bundle", "symfony", "shipping"],