@@ -1370,7 +1370,7 @@ protected function _addRate(SimpleXMLElement $shipmentDetails)
13701370 * @throws LocalizedException
13711371 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
13721372 */
1373- protected function _getQuotesRest () : Result \ ProxyDeferred
1373+ protected function _getQuotesRest ()
13741374 {
13751375 $ rawRequest = $ this ->_rawRequest ;
13761376 $ url = $ this ->getGatewayURL ();
@@ -1485,7 +1485,7 @@ private function getDhlAccessToken() : string
14851485 */
14861486 private function getRestHeaders (): array
14871487 {
1488- return $ headers = [
1488+ return [
14891489 "Authorization " => "Basic " . $ this ->getDhlAccessToken (),
14901490 "Content-Type " => "application/json " ,
14911491 "x-version " => "2.12.0 "
@@ -1552,7 +1552,7 @@ protected function _parseRestResponse($rateResponse): Result
15521552 * @throws LocalizedException
15531553 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
15541554 */
1555- protected function _addRestRate ($ product , $ exchangeRates ): self
1555+ protected function _addRestRate (array $ product , array $ exchangeRates ): self
15561556 {
15571557 if (isset ($ product ['productName ' ])
15581558 && isset ($ product ['productCode ' ])
@@ -2333,7 +2333,7 @@ protected function _doShipmentRequestRest(): DataObject
23332333 * @param string|string[] $trackings
23342334 * @return \Magento\Shipping\Model\Tracking\Result|null
23352335 */
2336- public function getTracking ($ trackings ): ?\Magento \Shipping \Model \Tracking \Result
2336+ public function getTracking (string | array $ trackings ): ?\Magento \Shipping \Model \Tracking \Result
23372337 {
23382338 if (!is_array ($ trackings )) {
23392339 $ trackings = [$ trackings ];
@@ -2518,11 +2518,11 @@ protected function _parseXmlTrackingResponse($trackings, $response)
25182518 }
25192519
25202520 /**
2521- * @param string[] $trackings
2521+ * @param string $trackings
25222522 * @return void
25232523 * @throws Throwable
25242524 */
2525- protected function _getRestTracking ($ trackings )
2525+ protected function _getRestTracking (string $ trackings ): void
25262526 {
25272527 $ url = $ this ->getGatewayURL ().'/tracking? ' ;
25282528
@@ -2557,13 +2557,13 @@ protected function _getRestTracking($trackings)
25572557 }
25582558
25592559 /**
2560- * @param string[] $trackings
2560+ * @param string $trackings
25612561 * @param string $response
25622562 * @return void
25632563 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
25642564 * @SuppressWarnings(PHPMD.NPathComplexity)
25652565 */
2566- protected function _parseRestTrackingResponse ($ trackings , $ response )
2566+ protected function _parseRestTrackingResponse (string $ trackings , string $ response ): void
25672567 {
25682568 $ errorTitle = __ ('Unable to retrieve tracking ' );
25692569 $ resultArr = [];
0 commit comments