From 380826604500cf6c2ccad02122b22b7d542fe492 Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky
Date: Thu, 6 Dec 2018 16:57:18 +0200
Subject: [PATCH] ENGCOM-3588: Static tests fix.
---
.../Grid/Massaction/AbstractMassaction.php | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
index dfe5b44453855..431c6368185cc 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
@@ -6,8 +6,8 @@
namespace Magento\Backend\Block\Widget\Grid\Massaction;
use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
-use Magento\Framework\DataObject;
use Magento\Framework\Data\Collection\AbstractDb;
+use Magento\Framework\DataObject;
/**
* Grid widget massaction block
@@ -52,7 +52,7 @@ public function __construct(
}
/**
- * @return void
+ * @inheritdoc
*/
protected function _construct()
{
@@ -217,6 +217,7 @@ public function getGridJsObjectName()
* Retrieve JSON string of selected checkboxes
*
* @return string
+ * @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelectedJson()
{
@@ -231,6 +232,7 @@ public function getSelectedJson()
* Retrieve array of selected checkboxes
*
* @return string[]
+ * @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelected()
{
@@ -252,6 +254,8 @@ public function getApplyButtonHtml()
}
/**
+ * Get mass action javascript code.
+ *
* @return string
*/
public function getJavaScript()
@@ -268,6 +272,8 @@ public function getJavaScript()
}
/**
+ * Get grid ids in JSON format.
+ *
* @return string
*/
public function getGridIdsJson()
@@ -277,7 +283,7 @@ public function getGridIdsJson()
}
/** @var \Magento\Framework\Data\Collection $allIdsCollection */
$allIdsCollection = clone $this->getParentBlock()->getCollection();
-
+
if ($this->getMassactionIdField()) {
$massActionIdField = $this->getMassactionIdField();
} else {
@@ -288,7 +294,7 @@ public function getGridIdsJson()
$allIdsCollection->getSelect()->limit();
$allIdsCollection->clear();
}
-
+
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
return join(",", $gridIds);
@@ -297,6 +303,8 @@ public function getGridIdsJson()
}
/**
+ * Get Html id.
+ *
* @return string
*/
public function getHtmlId()