Skip to content
2 changes: 0 additions & 2 deletions app/code/Magento/Catalog/Block/Product/View/BaseImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* Simple product data view
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class BaseImage extends \Magento\Catalog\Block\Product\View\AbstractView
{
Expand Down
11 changes: 4 additions & 7 deletions app/code/Magento/Catalog/Block/Product/View/Description.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
* See COPYING.txt for license details.
*/

/**
* Product description block
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Catalog\Block\Product\View;

use Magento\Catalog\Model\Product;

/**
* Product description block
*
* @api
* @since 100.0.2
*/
Expand All @@ -25,8 +22,6 @@ class Description extends \Magento\Framework\View\Element\Template
protected $_product = null;

/**
* Core registry
*
* @var \Magento\Framework\Registry
*/
protected $_coreRegistry = null;
Expand All @@ -46,6 +41,8 @@ public function __construct(
}

/**
* Return the product
*
* @return Product
*/
public function getProduct()
Expand Down
7 changes: 0 additions & 7 deletions app/code/Magento/Catalog/Block/Product/View/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/**
* Product options block
*
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
Expand All @@ -25,22 +24,16 @@ class Options extends \Magento\Framework\View\Element\Template
protected $_product;

/**
* Product option
*
* @var \Magento\Catalog\Model\Product\Option
*/
protected $_option;

/**
* Core registry
*
* @var \Magento\Framework\Registry
*/
protected $_registry = null;

/**
* Catalog product
*
* @var Product
*/
protected $_catalogProduct;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Product options abstract type block
*
* @author Magento Core Team <core@magentocommerce.com>
*/

namespace Magento\Catalog\Block\Product\View\Options;
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Catalog/Block/Product/View/Type/Simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Simple product data view
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Catalog\Block\Product\View\Type;

Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Catalog/Block/Product/View/Type/Virtual.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Simple product data view
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Catalog\Block\Product\View\Type;

Expand Down
15 changes: 5 additions & 10 deletions app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,26 @@
* See COPYING.txt for license details.
*/

namespace Magento\Catalog\Block\Product\Widget\Html;

/**
* New products widget pager block
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Catalog\Block\Product\Widget\Html;

class Pager extends \Magento\Theme\Block\Html\Pager
{
/**
* Collection size
*
* Size of collection which may has a manual limitation
*
* @var int
*/
protected $_collectionSize;

/**
* Current page
*
* @var int
*/
protected $_currentPage;

/**
* Last page
*
* @var int
*/
protected $_lastPage;
Expand Down Expand Up @@ -206,6 +198,9 @@ public function getPages()
} elseif ($this->getCurrentPage() > $this->getLastPageNum() - $half) {
$finish = $this->getLastPageNum();
$start = $finish - $this->_displayPages + 1;
} else {
$start = 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredden This seems to be a change that was not written in the pr. It does seem logical that it was added, but it could influence the method.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change, the linter complains that $start and $finish are potentially undefined when calling range($start, $finish); on the next line of code. This seems like a necessary change to ensure the code functions as expected. While technically out of scope for "remove a comment" (this pull request), this pull request also contains a lot of other out-of-scope changes (like updating the license holder(!) and defining class constant visibility). How should we proceed?

$finish = $this->_displayPages;
}
$pages = range($start, $finish);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Catalog category widgets controller for CMS WYSIWYG
*
* @author Magento Core Team <core@magentocommerce.com>
*/
abstract class Widget extends \Magento\Backend\App\Action
{
Expand All @@ -19,7 +17,7 @@ abstract class Widget extends \Magento\Backend\App\Action
*
* @see _isAllowed()
*/
const ADMIN_RESOURCE = 'Magento_Catalog::categories';
public const ADMIN_RESOURCE = 'Magento_Catalog::categories';

/**
* @var \Magento\Framework\View\LayoutFactory
Expand All @@ -39,6 +37,8 @@ public function __construct(
}

/**
* Return the category tree block
*
* @return BlockInterface
*/
protected function _getCategoryTreeBlock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* Adminhtml entity sets controller
*
* @author Magento Core Team <core@magentocommerce.com>
*/
abstract class Set extends \Magento\Backend\App\Action
{
Expand All @@ -17,11 +15,9 @@ abstract class Set extends \Magento\Backend\App\Action
*
* @see _isAllowed()
*/
const ADMIN_RESOURCE = 'Magento_Catalog::sets';
public const ADMIN_RESOURCE = 'Magento_Catalog::sets';

/**
* Core registry
*
* @var \Magento\Framework\Registry
*/
protected $_coreRegistry;
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Catalog/Helper/Catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* Adminhtml Catalog helper
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Catalog extends \Magento\Framework\App\Helper\AbstractHelper
{
Expand Down
11 changes: 3 additions & 8 deletions app/code/Magento/Catalog/Helper/Product/Composite.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,17 @@
* Adminhtml catalog product composite helper
*
* @api
*
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
*/
class Composite extends \Magento\Framework\App\Helper\AbstractHelper
{
/**
* Core registry
*
* @var Registry
*/
protected $_coreRegistry = null;

/**
* Catalog product
*
* @var Product
*/
protected $_catalogProduct = null;
Expand Down Expand Up @@ -91,8 +85,9 @@ protected function _initUpdateResultLayout()
}

/**
* Prepares and render result of composite product configuration update for a case
* when single configuration submitted
* Prepares and render result of composite product configuration update
*
* This is for a case when single configuration was submitted
*
* @param \Magento\Framework\DataObject $updateResult
* @return \Magento\Framework\View\Result\Layout
Expand Down
19 changes: 6 additions & 13 deletions app/code/Magento/Catalog/Model/AbstractModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

/**
* Abstract model for catalog entities
*
* @phpcs:ignore Magento2.Classes.AbstractApi.AbstractApi
* @api
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
abstract class AbstractModel extends \Magento\Framework\Model\AbstractExtensibleModel
Expand All @@ -34,29 +35,21 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractExtensible
protected $_storeValuesFlags;

/**
* Locked attributes
*
* @var array
*/
protected $_lockedAttributes = [];

/**
* Is model deleteable
*
* @var boolean
*/
protected $_isDeleteable = true;

/**
* Is model readonly
*
* @var boolean
*/
protected $_isReadonly = false;

/**
* Store manager
*
* @var \Magento\Store\Model\StoreManagerInterface
*/
protected $_storeManager;
Expand Down Expand Up @@ -313,8 +306,8 @@ private function getAttributeScopeOverriddenValue()
/**
* Retrieve default value for attribute code
*
* @param string $attributeCode
* @return array|boolean
* @param string $attributeCode
* @return array|boolean
*
* @deprecated 101.0.0
*/
Expand Down Expand Up @@ -348,8 +341,8 @@ public function setExistsStoreValueFlag($attributeCode)
/**
* Check if object attribute has value in current store
*
* @param string $attributeCode
* @return bool
* @param string $attributeCode
* @return bool
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
*
* @deprecated 101.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
namespace Magento\Catalog\Model\Attribute\Backend;

/**
*
* Special Start Date attribute backend
*
* @api
*
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Startdate extends \Magento\Eav\Model\Entity\Attribute\Backend\Datetime
{
/**
* Date model
*
* @var \Magento\Framework\Stdlib\DateTime\DateTime
*/
protected $_date;

/**
* Constructor
*
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
*/
Expand Down Expand Up @@ -53,6 +46,7 @@ protected function _getValueForSave($object)

/**
* Before save hook.
*
* Prepare attribute value for save
*
* @param \Magento\Framework\DataObject $object
Expand All @@ -72,6 +66,7 @@ public function beforeSave($object)

/**
* Product from date attribute validate function.
*
* In case invalid data throws exception.
*
* @param \Magento\Framework\DataObject $object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
* Catalog Category Attribute Default and Available Sort By Backend Model
*
* @api
*
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Sortby extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/
namespace Magento\Catalog\Model\Category\Attribute\Source;

use Magento\Theme\Model\PageLayout\Config\Builder;

/**
* Catalog category landing page attribute source
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Layout extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
Expand All @@ -19,7 +19,8 @@ class Layout extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource

/**
* @inheritdoc
* @deprecated 103.0.1 since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
* @var array
* @deprecated 103.0.1 since the cache is now handled by Builder::$configFiles
*/
protected $_options = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@

/**
* Catalog category landing page attribute source
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mode extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
/**
* {@inheritdoc}
* @inheritDoc
* @codeCoverageIgnore
*/
public function getAllOptions()
Expand Down
Loading