diff --git a/app/code/Magento/Captcha/Block/Captcha.php b/app/code/Magento/Captcha/Block/Captcha.php index 3bb7ec9ee3896..198d43f5bcb7e 100644 --- a/app/code/Magento/Captcha/Block/Captcha.php +++ b/app/code/Magento/Captcha/Block/Captcha.php @@ -1,25 +1,20 @@ - */ namespace Magento\Captcha\Block; /** + * Captcha block + * * @api * @since 100.0.2 */ class Captcha extends \Magento\Framework\View\Element\Template { /** - * Captcha data - * * @var \Magento\Captcha\Helper\Data */ protected $_captchaData = null; diff --git a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php index adf8b7df39d87..9a0aadab3e3c7 100644 --- a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php +++ b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php @@ -1,13 +1,11 @@ */ namespace Magento\Captcha\Helper\Adminhtml; @@ -42,6 +40,7 @@ public function __construct( * @param string $key The last part of XML_PATH_$area_CAPTCHA_ constant (case insensitive) * @param \Magento\Store\Model\Store $store * @return \Magento\Framework\App\Config\Element + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getConfig($key, $store = null) { @@ -53,6 +52,7 @@ public function getConfig($key, $store = null) * * @param mixed $website * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getWebsiteCode($website = null) { diff --git a/app/code/Magento/Captcha/Model/Config/Font.php b/app/code/Magento/Captcha/Model/Config/Font.php index cce57e6ced81a..a7385395ba0c8 100644 --- a/app/code/Magento/Captcha/Model/Config/Font.php +++ b/app/code/Magento/Captcha/Model/Config/Font.php @@ -1,21 +1,17 @@ */ namespace Magento\Captcha\Model\Config; class Font implements \Magento\Framework\Option\ArrayInterface { /** - * Captcha data - * * @var \Magento\Captcha\Helper\Data */ protected $_captchaData = null; diff --git a/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php b/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php index 811e455af534a..6638c9c112b4e 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php +++ b/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php @@ -1,13 +1,11 @@ */ namespace Magento\Captcha\Model\Config\Form; diff --git a/app/code/Magento/Captcha/Model/Config/Form/Backend.php b/app/code/Magento/Captcha/Model/Config/Form/Backend.php index 9fad494277cbf..49852394c8036 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/Backend.php +++ b/app/code/Magento/Captcha/Model/Config/Form/Backend.php @@ -1,13 +1,11 @@ */ namespace Magento\Captcha\Model\Config\Form; diff --git a/app/code/Magento/Captcha/Model/Config/Form/Frontend.php b/app/code/Magento/Captcha/Model/Config/Form/Frontend.php index 84c1a0018b6cd..dc6790fd82644 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/Frontend.php +++ b/app/code/Magento/Captcha/Model/Config/Form/Frontend.php @@ -1,13 +1,11 @@ */ namespace Magento\Captcha\Model\Config\Form; diff --git a/app/code/Magento/Captcha/Model/Config/Mode.php b/app/code/Magento/Captcha/Model/Config/Mode.php index b1f0239e73537..d893aae9f8983 100644 --- a/app/code/Magento/Captcha/Model/Config/Mode.php +++ b/app/code/Magento/Captcha/Model/Config/Mode.php @@ -1,13 +1,11 @@ */ namespace Magento\Captcha\Model\Config; diff --git a/app/code/Magento/Captcha/Model/ResourceModel/Log.php b/app/code/Magento/Captcha/Model/ResourceModel/Log.php index 83d055da7c26d..7f658b11e743c 100644 --- a/app/code/Magento/Captcha/Model/ResourceModel/Log.php +++ b/app/code/Magento/Captcha/Model/ResourceModel/Log.php @@ -1,30 +1,27 @@ */ class Log extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { /** * Remote Address log type */ - const TYPE_REMOTE_ADDRESS = 1; + public const TYPE_REMOTE_ADDRESS = 1; /** * Type User Login Name */ - const TYPE_LOGIN = 2; + public const TYPE_LOGIN = 2; /** - * Core Date - * * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_coreDate; diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php index 7d313d641d7d7..50574d5222d7e 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php @@ -1,13 +1,13 @@ */ class Newfolder extends \Magento\Backend\Block\Template { diff --git a/app/code/Magento/Cms/Block/Widget/Block.php b/app/code/Magento/Cms/Block/Widget/Block.php index c665f2afc5d38..dd603580bdc31 100644 --- a/app/code/Magento/Cms/Block/Widget/Block.php +++ b/app/code/Magento/Cms/Block/Widget/Block.php @@ -1,9 +1,8 @@ */ class Block extends \Magento\Framework\View\Element\Template implements BlockInterface, IdentityInterface { @@ -33,8 +30,6 @@ class Block extends \Magento\Framework\View\Element\Template implements BlockInt protected static $_widgetUsageMap = []; /** - * Block factory - * * @var \Magento\Cms\Model\BlockFactory */ protected $_blockFactory; @@ -77,6 +72,7 @@ protected function _beforeToHtml() if (isset(self::$_widgetUsageMap[$blockHash])) { return $this; } + self::$_widgetUsageMap[$blockHash] = true; $block = $this->getBlock(); @@ -87,9 +83,10 @@ protected function _beforeToHtml() $this->setText( $this->_filterProvider->getBlockFilter()->setStoreId($storeId)->filter($block->getContent()) ); - } catch (NoSuchEntityException $e) { + } catch (NoSuchEntityException $e) { // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch } } + unset(self::$_widgetUsageMap[$blockHash]); return $this; } @@ -132,7 +129,7 @@ private function getBlock(): ?CmsBlock $this->block = $block; return $block; - } catch (NoSuchEntityException $e) { + } catch (NoSuchEntityException $e) { // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch } } diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php index 5dedc7a1a8395..d08b67c57d2a0 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php @@ -1,14 +1,13 @@ */ abstract class Images extends \Magento\Backend\App\Action { @@ -17,11 +16,9 @@ abstract class Images extends \Magento\Backend\App\Action * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Cms::media_gallery'; + public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery'; /** - * Core registry - * * @var \Magento\Framework\Registry */ protected $_coreRegistry = null;