From cd7ce3e03bfef828a25229d34fb8fe6c7889cc30 Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky
Date: Fri, 12 Apr 2019 14:49:46 +0300
Subject: [PATCH] magento/magento2#22073: Static test fix.
---
.../Observer/SaveDownloadableOrderItemObserver.php | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/app/code/Magento/Downloadable/Observer/SaveDownloadableOrderItemObserver.php b/app/code/Magento/Downloadable/Observer/SaveDownloadableOrderItemObserver.php
index 19339e4484ef6..7c1d2748a3e9c 100644
--- a/app/code/Magento/Downloadable/Observer/SaveDownloadableOrderItemObserver.php
+++ b/app/code/Magento/Downloadable/Observer/SaveDownloadableOrderItemObserver.php
@@ -9,6 +9,8 @@
use Magento\Store\Model\ScopeInterface;
/**
+ * Saves data from order to purchased links.
+ *
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class SaveDownloadableOrderItemObserver implements ObserverInterface
@@ -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()
@@ -173,6 +175,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
}
/**
+ * Create purchased model.
+ *
* @return \Magento\Downloadable\Model\Link\Purchased
*/
protected function _createPurchasedModel()
@@ -181,6 +185,8 @@ protected function _createPurchasedModel()
}
/**
+ * Create product model.
+ *
* @return \Magento\Catalog\Model\Product
*/
protected function _createProductModel()
@@ -189,6 +195,8 @@ protected function _createProductModel()
}
/**
+ * Create purchased item model.
+ *
* @return \Magento\Downloadable\Model\Link\Purchased\Item
*/
protected function _createPurchasedItemModel()
@@ -197,6 +205,8 @@ protected function _createPurchasedItemModel()
}
/**
+ * Create items collection.
+ *
* @return \Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item\Collection
*/
protected function _createItemsCollection()