From cb0b3d407dc1ac5c42e202a515a2aee97574b57d Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Tue, 7 Jul 2020 11:01:36 +0300 Subject: [PATCH] magento2/issues/12087: Fix static test. --- app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php | 1 + app/code/Magento/Widget/Model/Widget.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php index 87ae52b2eadda..44c43055df8b9 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -136,6 +136,7 @@ public function addFields() * @return \Magento\Framework\Data\Form\Element\AbstractElement * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _addField($parameter) { diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php index 12af534325224..c01d8b226197d 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -293,6 +293,7 @@ public function getWidgetsArray($filters = []) * @param array $params Pre-configured Widget Params * @param bool $asIs Return result as widget directive(true) or as placeholder image(false) * @return string Widget directive ready to parse + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getWidgetDeclaration($type, $params = [], $asIs = true) { @@ -460,6 +461,8 @@ protected function sortParameters($firstElement, $secondElement) } /** + * Encode reserved chars + * * @param $string * @return string|string[] */ @@ -478,6 +481,8 @@ private function encodeReservedChars($string) } /** + * Decode reserved chars + * * @param $string * @return array */ @@ -496,6 +501,8 @@ public function decodeReservedChars($string) } /** + * Is text type Widget parameter + * * @param $widget * @param $name * @return bool