Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove forbidden @author tag from Magento_Catalog (part 3) #36989

Open
wants to merge 8 commits into
base: 2.4-develop
Choose a base branch
from
6 changes: 2 additions & 4 deletions app/code/Magento/Catalog/Block/Product/View/BaseImage.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/
namespace Magento\Catalog\Block\Product\View;

/**
* Simple product data view
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class BaseImage extends \Magento\Catalog\Block\Product\View\AbstractView
{
Expand Down
15 changes: 6 additions & 9 deletions app/code/Magento/Catalog/Block/Product/View/Description.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/

/**
* 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
6 changes: 0 additions & 6 deletions app/code/Magento/Catalog/Block/Product/View/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,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;

/**
* 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
6 changes: 2 additions & 4 deletions app/code/Magento/Catalog/Block/Product/View/Type/Simple.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/

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

Expand Down
6 changes: 2 additions & 4 deletions app/code/Magento/Catalog/Block/Product/View/Type/Virtual.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/

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

Expand Down
19 changes: 7 additions & 12 deletions app/code/Magento/Catalog/Block/Product/Widget/Html/Pager.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2012 Adobe
* All Rights Reserved.
*/

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
@@ -1,16 +1,14 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/
namespace Magento\Catalog\Controller\Adminhtml\Category;

use Magento\Framework\View\Element\BlockInterface;

/**
* 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
10 changes: 3 additions & 7 deletions app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/
namespace Magento\Catalog\Controller\Adminhtml\Product;

/**
* 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
6 changes: 2 additions & 4 deletions app/code/Magento/Catalog/Helper/Catalog.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/
namespace Magento\Catalog\Helper;

/**
* Adminhtml Catalog helper
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Catalog extends \Magento\Framework\App\Helper\AbstractHelper
{
Expand Down
15 changes: 5 additions & 10 deletions app/code/Magento/Catalog/Helper/Product/Composite.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2013 Adobe
* All Rights Reserved.
*/
namespace Magento\Catalog\Helper\Product;

Expand All @@ -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
3 changes: 0 additions & 3 deletions app/code/Magento/Catalog/Model/AbstractModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* phpcs:disable Magento2.Classes.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 Down Expand Up @@ -46,8 +45,6 @@ abstract class AbstractModel extends \Magento\Framework\Model\AbstractExtensible
protected $_isDeleteable = true;

/**
* Is model readonly
*
* @var boolean
*/
protected $_isReadonly = false;
Expand Down
13 changes: 4 additions & 9 deletions app/code/Magento/Catalog/Model/Attribute/Backend/Startdate.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/
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
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/

namespace Magento\Catalog\Model\Category\Attribute\Backend;
Expand All @@ -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
Loading