Skip to content

Commit

Permalink
Fix comment and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
convenient committed Oct 4, 2022
1 parent 7ad0745 commit 58d4633
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ReturnProcessor/GetSalesChannelForOrderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Ampersand\DisableStockReservation\ReturnProcessor;

use Magento\Framework\ObjectManagerInterface;
use Magento\InventorySales\Model\ReturnProcessor\GetSalesChannelForOrder as GetSalesChannelForOrder24;

class GetSalesChannelForOrderFactory
{
Expand All @@ -12,7 +13,7 @@ class GetSalesChannelForOrderFactory
private $objectManager;

/**
* ResponseFactory constructor.
* constructor.
*/
public function __construct(
ObjectManagerInterface $objectManager
Expand All @@ -24,14 +25,12 @@ public function __construct(
* For magento 2.4 return the core provided class
* For magento 2.3 return the workaround copy of that class
*
* @return GetSalesChannelForOrder|\Magento\InventorySales\Model\ReturnProcessor\GetSalesChannelForOrder|mixed
* @return GetSalesChannelForOrder|GetSalesChannelForOrder24|mixed
*/
public function create()
{
if (\class_exists(\Magento\InventorySales\Model\ReturnProcessor\GetSalesChannelForOrder::class)) {
return $this->objectManager->create(
\Magento\InventorySales\Model\ReturnProcessor\GetSalesChannelForOrder::class
);
if (\class_exists(GetSalesChannelForOrder24::class)) {
return $this->objectManager->create(GetSalesChannelForOrder24::class);
}
return $this->objectManager->create(
GetSalesChannelForOrder::class
Expand Down

0 comments on commit 58d4633

Please sign in to comment.