From 0c77addc50a2b7f549980652b070b25d149306f0 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 7 Mar 2023 13:33:49 +0000 Subject: [PATCH 1/3] Remove forbidden @author tag --- app/code/Magento/Customer/Block/Address/Book.php | 1 - .../Customer/Block/Address/Renderer/RendererInterface.php | 1 - .../Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php | 2 -- app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php | 2 -- .../Magento/Customer/Block/Adminhtml/Form/Element/Image.php | 2 -- .../Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php | 2 -- .../Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php | 2 -- app/code/Magento/Customer/Block/Adminhtml/Group.php | 2 -- .../Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php | 2 -- .../Customer/Block/Adminhtml/System/Config/Validatevat.php | 2 -- app/code/Magento/Customer/Block/Form/Login.php | 1 - .../Customer/Controller/Adminhtml/System/Config/Validatevat.php | 2 -- app/code/Magento/Customer/Model/Address/Form.php | 2 -- .../Magento/Customer/Model/Attribute/Backend/Data/Boolean.php | 2 -- app/code/Magento/Customer/Model/Attribute/Data/AbstractData.php | 2 -- app/code/Magento/Customer/Model/Attribute/Data/Boolean.php | 2 -- app/code/Magento/Customer/Model/Attribute/Data/Date.php | 2 -- app/code/Magento/Customer/Model/Attribute/Data/File.php | 2 -- app/code/Magento/Customer/Model/Attribute/Data/Hidden.php | 2 -- app/code/Magento/Customer/Model/Attribute/Data/Image.php | 2 -- 20 files changed, 37 deletions(-) diff --git a/app/code/Magento/Customer/Block/Address/Book.php b/app/code/Magento/Customer/Block/Address/Book.php index f37ae21a9b83c..be4ac1101a9d4 100644 --- a/app/code/Magento/Customer/Block/Address/Book.php +++ b/app/code/Magento/Customer/Block/Address/Book.php @@ -13,7 +13,6 @@ * Customer address book block * * @api - * @author Magento Core Team * @since 100.0.2 */ class Book extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/Customer/Block/Address/Renderer/RendererInterface.php b/app/code/Magento/Customer/Block/Address/Renderer/RendererInterface.php index cb942b13410e7..fa619e60170bd 100644 --- a/app/code/Magento/Customer/Block/Address/Renderer/RendererInterface.php +++ b/app/code/Magento/Customer/Block/Address/Renderer/RendererInterface.php @@ -12,7 +12,6 @@ * Address renderer interface * * @api - * @author Magento Core Team */ interface RendererInterface { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php index dc445e4b2dd35..8c27d0e47c8a3 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php @@ -6,8 +6,6 @@ /** * Customer Widget Form Boolean Element Block - * - * @author Magento Core Team */ namespace Magento\Customer\Block\Adminhtml\Form\Element; diff --git a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php index 7e254b3227752..be36ab2e6bed4 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php @@ -7,8 +7,6 @@ /** * Customer Widget Form File Element Block - * - * @author Magento Core Team */ class File extends \Magento\Framework\Data\Form\Element\AbstractElement { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php index 2f6609486ee73..3254682552d1f 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php @@ -6,8 +6,6 @@ /** * Customer Widget Form Image File Element Block - * - * @author Magento Core Team */ namespace Magento\Customer\Block\Adminhtml\Form\Element; diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php index 64fe7c8b6188a..77c1e28daabee 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php @@ -7,8 +7,6 @@ /** * Country customer grid column filter - * - * @author Magento Core Team */ class Country extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php index 726daf69dc587..fe4dfe8bc3604 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php @@ -11,8 +11,6 @@ /** * Adminhtml customers wishlist grid item action renderer for few action controls in one cell - * - * @author Magento Core Team */ class Multiaction extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Action { diff --git a/app/code/Magento/Customer/Block/Adminhtml/Group.php b/app/code/Magento/Customer/Block/Adminhtml/Group.php index b5448fb3c115d..8ac0179088dab 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Group.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Group.php @@ -6,8 +6,6 @@ /** * Adminhtml customers group page content block - * - * @author Magento Core Team */ namespace Magento\Customer\Block\Adminhtml; diff --git a/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php index ebdf0090fe1c8..ad72d9e88a187 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php @@ -11,8 +11,6 @@ /** * VAT ID element renderer - * - * @author Magento Core Team */ class Vat extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element { diff --git a/app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php b/app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php index 8cbe5c0680bd3..5327dba890594 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php +++ b/app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php @@ -6,8 +6,6 @@ /** * Adminhtml VAT ID validation block - * - * @author Magento Core Team */ namespace Magento\Customer\Block\Adminhtml\System\Config; diff --git a/app/code/Magento/Customer/Block/Form/Login.php b/app/code/Magento/Customer/Block/Form/Login.php index d3d3306a49b44..3b9c6527916cb 100644 --- a/app/code/Magento/Customer/Block/Form/Login.php +++ b/app/code/Magento/Customer/Block/Form/Login.php @@ -9,7 +9,6 @@ * Customer login form block * * @api - * @author Magento Core Team * @since 100.0.2 */ class Login extends \Magento\Framework\View\Element\Template diff --git a/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php index 31d23c9e3694e..1ba5393d12717 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php @@ -7,8 +7,6 @@ /** * VAT validation controller - * - * @author Magento Core Team */ abstract class Validatevat extends \Magento\Backend\App\Action { diff --git a/app/code/Magento/Customer/Model/Address/Form.php b/app/code/Magento/Customer/Model/Address/Form.php index 279628bba1392..2a010a280ff77 100644 --- a/app/code/Magento/Customer/Model/Address/Form.php +++ b/app/code/Magento/Customer/Model/Address/Form.php @@ -6,8 +6,6 @@ /** * Customer Address Form Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Address; diff --git a/app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php b/app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php index c62d724178378..84f09de699e91 100644 --- a/app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php +++ b/app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php @@ -7,8 +7,6 @@ /** * Boolean customer attribute backend model - * - * @author Magento Core Team */ class Boolean extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend { diff --git a/app/code/Magento/Customer/Model/Attribute/Data/AbstractData.php b/app/code/Magento/Customer/Model/Attribute/Data/AbstractData.php index b68fb20019da9..05b20dfa5823c 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/AbstractData.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/AbstractData.php @@ -6,8 +6,6 @@ /** * Customer Attribute Abstract Data Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Attribute\Data; diff --git a/app/code/Magento/Customer/Model/Attribute/Data/Boolean.php b/app/code/Magento/Customer/Model/Attribute/Data/Boolean.php index b40bdd12fb051..7b9aedf1a6327 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/Boolean.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/Boolean.php @@ -6,8 +6,6 @@ /** * Customer Attribute Boolean Data Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Attribute\Data; diff --git a/app/code/Magento/Customer/Model/Attribute/Data/Date.php b/app/code/Magento/Customer/Model/Attribute/Data/Date.php index 1841b245099a3..0014fd3f56ce7 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/Date.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/Date.php @@ -6,8 +6,6 @@ /** * Customer Attribute Date Data Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Attribute\Data; diff --git a/app/code/Magento/Customer/Model/Attribute/Data/File.php b/app/code/Magento/Customer/Model/Attribute/Data/File.php index afdfe0b300957..04c79888c6035 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/File.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/File.php @@ -6,8 +6,6 @@ /** * Customer Attribute File Data Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Attribute\Data; diff --git a/app/code/Magento/Customer/Model/Attribute/Data/Hidden.php b/app/code/Magento/Customer/Model/Attribute/Data/Hidden.php index 2ec12654b08b2..f7ceb2ce500fb 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/Hidden.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/Hidden.php @@ -6,8 +6,6 @@ /** * Customer Attribute Hidden text Data Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Attribute\Data; diff --git a/app/code/Magento/Customer/Model/Attribute/Data/Image.php b/app/code/Magento/Customer/Model/Attribute/Data/Image.php index 11685f6b23ad6..c28ee87aaaf60 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/Image.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/Image.php @@ -6,8 +6,6 @@ /** * Customer Attribute Image File Data Model - * - * @author Magento Core Team */ namespace Magento\Customer\Model\Attribute\Data; From d957153bf2ef403b172c7e76edacf427e3999699 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 7 Mar 2023 13:40:02 +0000 Subject: [PATCH 2/3] Remove forbidden @author tag --- .../Magento/Customer/Model/ResourceModel/Group/Collection.php | 2 -- .../Customer/Model/ResourceModel/Online/Grid/Collection.php | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php b/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php index 6e93210d04c3c..c7ac2817d741c 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php +++ b/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php @@ -7,8 +7,6 @@ /** * Customer group collection - * - * @author Magento Core Team */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/Customer/Model/ResourceModel/Online/Grid/Collection.php b/app/code/Magento/Customer/Model/ResourceModel/Online/Grid/Collection.php index 712ba02d59355..c3a43fb14bf9c 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/Online/Grid/Collection.php +++ b/app/code/Magento/Customer/Model/ResourceModel/Online/Grid/Collection.php @@ -16,8 +16,6 @@ /** * Flat customer online grid collection - * - * @author Magento Core Team */ class Collection extends SearchResult { From 239013ee08cca7da137eb668a0e7900af3ebe34e Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 14 Mar 2023 20:51:44 +0000 Subject: [PATCH 3/3] Fix static test failures --- app/code/Magento/Customer/Block/Address/Book.php | 2 ++ .../Customer/Block/Adminhtml/Form/Element/Boolean.php | 5 +++-- .../Magento/Customer/Block/Adminhtml/Form/Element/File.php | 2 -- .../Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php | 2 ++ .../Controller/Adminhtml/System/Config/Validatevat.php | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Customer/Block/Address/Book.php b/app/code/Magento/Customer/Block/Address/Book.php index be4ac1101a9d4..9a98ca4aae5da 100644 --- a/app/code/Magento/Customer/Block/Address/Book.php +++ b/app/code/Magento/Customer/Block/Address/Book.php @@ -166,6 +166,7 @@ public function getAdditionalAddresses() try { $addresses = $this->addressesGrid->getAdditionalAddresses(); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + return false; } return empty($addresses) ? false : $addresses; } @@ -197,6 +198,7 @@ public function getCustomer() try { $customer = $this->currentCustomer->getCustomer(); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + return null; } return $customer; } diff --git a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php index 8c27d0e47c8a3..0cca291d90b52 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php @@ -4,15 +4,16 @@ * See COPYING.txt for license details. */ +namespace Magento\Customer\Block\Adminhtml\Form\Element; + /** * Customer Widget Form Boolean Element Block */ -namespace Magento\Customer\Block\Adminhtml\Form\Element; - class Boolean extends \Magento\Framework\Data\Form\Element\Select { /** * Prepare default SELECT values + * * @return void */ protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php index be36ab2e6bed4..2f70d54c9646a 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php @@ -16,8 +16,6 @@ class File extends \Magento\Framework\Data\Form\Element\AbstractElement protected $_assetRepo; /** - * Adminhtml data - * * @var \Magento\Backend\Helper\Data */ protected $_adminhtmlData = null; diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php index 77c1e28daabee..d8bbd8cee966a 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php @@ -32,6 +32,8 @@ public function __construct( } /** + * Return options + * * @return array */ protected function _getOptions() diff --git a/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php index 1ba5393d12717..c7952bd2be8cd 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php @@ -15,7 +15,7 @@ abstract class Validatevat extends \Magento\Backend\App\Action * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Customer::manage'; + public const ADMIN_RESOURCE = 'Magento_Customer::manage'; /** * Perform customer VAT ID validation