Skip to content

Commit

Permalink
magento#22073: Static test fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bystritsky authored and amol2jcommerce committed Apr 16, 2019
1 parent 998a28f commit caad52d
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use Magento\Store\Model\ScopeInterface;

/**
* Saves data from order to purchased links.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class SaveDownloadableOrderItemObserver implements ObserverInterface
Expand Down Expand Up @@ -159,7 +161,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
\Magento\Sales\Model\Order\Item::STATUS_PENDING == $orderStatusToEnableItem ?
\Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_AVAILABLE :
\Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_PENDING
)->setCreatedAt(
)->setCreatedAt(
$orderItem->getCreatedAt()
)->setUpdatedAt(
$orderItem->getUpdatedAt()
Expand All @@ -173,6 +175,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
}

/**
* Create purchased model.
*
* @return \Magento\Downloadable\Model\Link\Purchased
*/
protected function _createPurchasedModel()
Expand All @@ -181,6 +185,8 @@ protected function _createPurchasedModel()
}

/**
* Create product model.
*
* @return \Magento\Catalog\Model\Product
*/
protected function _createProductModel()
Expand All @@ -189,6 +195,8 @@ protected function _createProductModel()
}

/**
* Create purchased item model.
*
* @return \Magento\Downloadable\Model\Link\Purchased\Item
*/
protected function _createPurchasedItemModel()
Expand All @@ -197,6 +205,8 @@ protected function _createPurchasedItemModel()
}

/**
* Create items collection.
*
* @return \Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item\Collection
*/
protected function _createItemsCollection()
Expand Down

0 comments on commit caad52d

Please sign in to comment.