diff --git a/app/code/Magento/Captcha/Block/Captcha.php b/app/code/Magento/Captcha/Block/Captcha.php index 11029e17e8be8..7118426015f92 100644 --- a/app/code/Magento/Captcha/Block/Captcha.php +++ b/app/code/Magento/Captcha/Block/Captcha.php @@ -4,22 +4,17 @@ * All Rights Reserved. */ -/** - * Captcha block - * - * @author Magento Core Team - */ 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 5fd3cab7464ad..9a0aadab3e3c7 100644 --- a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php +++ b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php @@ -6,8 +6,6 @@ /** * Captcha helper for adminhtml area - * - * @author Magento Core Team */ 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 153e03888bb96..3c02ef88372f9 100644 --- a/app/code/Magento/Captcha/Model/Config/Font.php +++ b/app/code/Magento/Captcha/Model/Config/Font.php @@ -6,16 +6,12 @@ /** * Captcha image model - * - * @author Magento Core Team */ 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 11cf63c7904f8..3139734bfcf20 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php +++ b/app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php @@ -6,8 +6,6 @@ /** * Data source to fill "Forms" field - * - * @author Magento Core Team */ 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 df7369ca82a6f..6da42d82a677a 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/Backend.php +++ b/app/code/Magento/Captcha/Model/Config/Form/Backend.php @@ -6,8 +6,6 @@ /** * Captcha image model - * - * @author Magento Core Team */ 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 21e65a5858dfb..570c871f565c0 100644 --- a/app/code/Magento/Captcha/Model/Config/Form/Frontend.php +++ b/app/code/Magento/Captcha/Model/Config/Form/Frontend.php @@ -6,8 +6,6 @@ /** * Captcha image model - * - * @author Magento Core Team */ 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 6411b41344882..ce5883bd335de 100644 --- a/app/code/Magento/Captcha/Model/Config/Mode.php +++ b/app/code/Magento/Captcha/Model/Config/Mode.php @@ -6,8 +6,6 @@ /** * Captcha image model - * - * @author Magento Core Team */ 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 4ee23dfe73f94..eeaf631f65632 100644 --- a/app/code/Magento/Captcha/Model/ResourceModel/Log.php +++ b/app/code/Magento/Captcha/Model/ResourceModel/Log.php @@ -3,28 +3,25 @@ * Copyright 2015 Adobe * All Rights Reserved. */ + namespace Magento\Captcha\Model\ResourceModel; /** * Log Attempts resource - * - * @author Magento Core Team */ 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 9aff235ac4b90..4d129aa46eda5 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php @@ -3,11 +3,11 @@ * Copyright 2013 Adobe * All Rights Reserved. */ + namespace Magento\Cms\Block\Adminhtml\Page\Widget; /** * CMS page chooser for Wysiwyg CMS widget - * */ class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended { diff --git a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php index 239386d706e85..4bb35399e23b8 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php @@ -3,12 +3,11 @@ * Copyright 2013 Adobe * All Rights Reserved. */ + namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content; /** * New directory block for Wysiwyg Images - * - * @author Magento Core Team */ 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 64f6f471576a8..dd603580bdc31 100644 --- a/app/code/Magento/Cms/Block/Widget/Block.php +++ b/app/code/Magento/Cms/Block/Widget/Block.php @@ -3,7 +3,6 @@ * Copyright 2013 Adobe * All Rights Reserved. */ - declare(strict_types=1); namespace Magento\Cms\Block\Widget; @@ -15,8 +14,6 @@ /** * Cms Static Block Widget - * - * @author Magento Core Team */ 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 c7b3686ee75a3..0f4609913c50a 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php @@ -3,12 +3,11 @@ * Copyright 2013 Adobe * All Rights Reserved. */ + namespace Magento\Cms\Controller\Adminhtml\Wysiwyg; /** * Images manage controller for Cms WYSIWYG editor - * - * @author Magento Core Team */ 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;