@@ -1370,7 +1370,7 @@ protected function _addRate(SimpleXMLElement $shipmentDetails)
1370
1370
* @throws LocalizedException
1371
1371
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
1372
1372
*/
1373
- protected function _getQuotesRest () : Result \ ProxyDeferred
1373
+ protected function _getQuotesRest ()
1374
1374
{
1375
1375
$ rawRequest = $ this ->_rawRequest ;
1376
1376
$ url = $ this ->getGatewayURL ();
@@ -1485,7 +1485,7 @@ private function getDhlAccessToken() : string
1485
1485
*/
1486
1486
private function getRestHeaders (): array
1487
1487
{
1488
- return $ headers = [
1488
+ return [
1489
1489
"Authorization " => "Basic " . $ this ->getDhlAccessToken (),
1490
1490
"Content-Type " => "application/json " ,
1491
1491
"x-version " => "2.12.0 "
@@ -1552,7 +1552,7 @@ protected function _parseRestResponse($rateResponse): Result
1552
1552
* @throws LocalizedException
1553
1553
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
1554
1554
*/
1555
- protected function _addRestRate ($ product , $ exchangeRates ): self
1555
+ protected function _addRestRate (array $ product , array $ exchangeRates ): self
1556
1556
{
1557
1557
if (isset ($ product ['productName ' ])
1558
1558
&& isset ($ product ['productCode ' ])
@@ -2333,7 +2333,7 @@ protected function _doShipmentRequestRest(): DataObject
2333
2333
* @param string|string[] $trackings
2334
2334
* @return \Magento\Shipping\Model\Tracking\Result|null
2335
2335
*/
2336
- public function getTracking ($ trackings ): ?\Magento \Shipping \Model \Tracking \Result
2336
+ public function getTracking (string | array $ trackings ): ?\Magento \Shipping \Model \Tracking \Result
2337
2337
{
2338
2338
if (!is_array ($ trackings )) {
2339
2339
$ trackings = [$ trackings ];
@@ -2518,11 +2518,11 @@ protected function _parseXmlTrackingResponse($trackings, $response)
2518
2518
}
2519
2519
2520
2520
/**
2521
- * @param string[] $trackings
2521
+ * @param string $trackings
2522
2522
* @return void
2523
2523
* @throws Throwable
2524
2524
*/
2525
- protected function _getRestTracking ($ trackings )
2525
+ protected function _getRestTracking (string $ trackings ): void
2526
2526
{
2527
2527
$ url = $ this ->getGatewayURL ().'/tracking? ' ;
2528
2528
@@ -2557,13 +2557,13 @@ protected function _getRestTracking($trackings)
2557
2557
}
2558
2558
2559
2559
/**
2560
- * @param string[] $trackings
2560
+ * @param string $trackings
2561
2561
* @param string $response
2562
2562
* @return void
2563
2563
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
2564
2564
* @SuppressWarnings(PHPMD.NPathComplexity)
2565
2565
*/
2566
- protected function _parseRestTrackingResponse ($ trackings , $ response )
2566
+ protected function _parseRestTrackingResponse (string $ trackings , string $ response ): void
2567
2567
{
2568
2568
$ errorTitle = __ ('Unable to retrieve tracking ' );
2569
2569
$ resultArr = [];
0 commit comments