Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,23 @@
* See COPYING.txt for license details.
*/

/**
* Product image attribute frontend
*
* @author Magento Core Team <[email protected]>
*/

namespace Magento\Catalog\Model\Product\Attribute\Frontend;

use Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend;
use Magento\Framework\UrlInterface;
use Magento\Store\Model\StoreManagerInterface;

/**
* Product image attribute frontend
*/
class Image extends AbstractFrontend
{
/**
* Store manager
*
* @var StoreManagerInterface
*/
protected $_storeManager;

/**
* Construct
*
* @param StoreManagerInterface $storeManager
*/
public function __construct(StoreManagerInterface $storeManager)
Expand Down
4 changes: 0 additions & 4 deletions app/code/Magento/Catalog/Model/Product/Attribute/Group.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/**
* @author Magento Core Team <[email protected]>
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand All @@ -11,14 +10,11 @@
class Group extends \Magento\Eav\Model\Entity\Attribute\Group
{
/**
* Attribute collection factory
*
* @var \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory
*/
protected $_attributeCollectionFactory;

/**
* Group constructor.
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/**
* @author Magento Core Team <[email protected]>
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
* See COPYING.txt for license details.
*/

/**
* Catalog product country attribute source
*
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Model\Product\Attribute\Source;

use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
use Magento\Framework\Data\OptionSourceInterface;

/**
* Catalog product country attribute source
*/
class Countryofmanufacture extends AbstractSource implements OptionSourceInterface
{
/**
Expand All @@ -22,15 +20,11 @@ class Countryofmanufacture extends AbstractSource implements OptionSourceInterfa
protected $_configCacheType;

/**
* Store manager
*
* @var \Magento\Store\Model\StoreManagerInterface
*/
protected $_storeManager;

/**
* Country factory
*
* @var \Magento\Directory\Model\CountryFactory
*/
protected $_countryFactory;
Expand All @@ -41,8 +35,6 @@ class Countryofmanufacture extends AbstractSource implements OptionSourceInterfa
private $serializer;

/**
* Construct
*
* @param \Magento\Directory\Model\CountryFactory $countryFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\Cache\Type\Config $configCacheType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/
namespace Magento\Catalog\Model\Product\Attribute\Source;

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

/**
* Catalog product landing page attribute source
*
* @author Magento Core Team <[email protected]>
*/
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 @@ -6,8 +6,6 @@

/**
* Configuration item option model
*
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Model\Product\Configuration\Item;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* Interface of product configurational item option
*
* @api
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Model\Product\Configuration\Item\Option;

Expand Down
23 changes: 13 additions & 10 deletions app/code/Magento/Catalog/Model/Product/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,26 @@
* @method int getLinkTypeId()
* @method \Magento\Catalog\Model\Product\Link setLinkTypeId(int $value)
*
* @author Magento Core Team <[email protected]>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
*/
class Link extends \Magento\Framework\Model\AbstractModel
{
const LINK_TYPE_RELATED = 1;

const LINK_TYPE_UPSELL = 4;

const LINK_TYPE_CROSSSELL = 5;
public const LINK_TYPE_RELATED = 1;
public const LINK_TYPE_UPSELL = 4;
public const LINK_TYPE_CROSSSELL = 5;

/**
* @var mixed
*/
protected $_attributes = null;

/**
* Product collection factory
*
* @var \Magento\Catalog\Model\ResourceModel\Product\Link\Product\CollectionFactory
*/
protected $_productCollectionFactory;

/**
* Link collection factory
*
* @var \Magento\Catalog\Model\ResourceModel\Product\Link\CollectionFactory
*/
protected $_linkCollectionFactory;
Expand Down Expand Up @@ -99,6 +92,8 @@ protected function _construct()
}

/**
* Set this link to use related links
*
* @return $this
*/
public function useRelatedLinks()
Expand All @@ -108,6 +103,8 @@ public function useRelatedLinks()
}

/**
* Set this link to use upsell links
*
* @return $this
*/
public function useUpSellLinks()
Expand All @@ -117,6 +114,8 @@ public function useUpSellLinks()
}

/**
* Set this link to use cross-sell links
*
* @return $this
*/
public function useCrossSellLinks()
Expand Down Expand Up @@ -159,6 +158,8 @@ public function getLinkCollection()
}

/**
* Return attributes
*
* @param int $type
* @return array
*/
Expand Down Expand Up @@ -187,6 +188,8 @@ public function saveProductRelations($product)
}

/**
* Return product link save handler
*
* @return Link\SaveHandler
*/
private function getProductLinkSaveHandler()
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Catalog/Model/Product/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
* @method int getProductId()
* @method \Magento\Catalog\Model\Product\Option setProductId(int $value)
*
* @author Magento Core Team <[email protected]>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
* @since 100.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* Catalog product option default type
*
* @api
* @author Magento Core Team <[email protected]>
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/Model/Product/Type/Virtual.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Virtual product type implementation
*
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Model\Product\Type;

Expand Down Expand Up @@ -39,6 +37,7 @@ public function hasWeight()
*
* @param \Magento\Catalog\Model\Product $product
* @return void
* @phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedFunction
*/
public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product)
{
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/Model/Product/Website.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*
* @method int getWebsiteId()
* @method \Magento\Catalog\Model\Product\Website setWebsiteId(int $value)
*
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Model\Product;

Expand Down Expand Up @@ -68,6 +66,7 @@ public function addProducts($websiteIds, $productIds)

/**
* Retrieve product websites
*
* Return array with key as product ID and value array of websites
*
* @param int|array $productIds
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Catalog/Model/ResourceModel/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Catalog category model
*
* @author Magento Core Team <[email protected]>
*/
declare(strict_types=1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

/**
* Catalog category EAV additional attribute resource collection
*
* @author Magento Core Team <[email protected]>
*/
class Collection extends \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection
{
/**
* Entity factory
*
* @var \Magento\Eav\Model\EntityFactory
*/
protected $_eavEntityFactory;
Expand All @@ -24,8 +20,8 @@ class Collection extends \Magento\Eav\Model\ResourceModel\Entity\Attribute\Colle
* @param \Psr\Log\LoggerInterface $logger
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
* @param \Magento\Eav\Model\Config $eavConfig
* @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
* @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
*/
Expand All @@ -45,6 +41,7 @@ public function __construct(

/**
* Main select object initialization.
*
* Joins catalog/eav_attribute table
*
* @return $this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,17 @@

/**
* Category image attribute frontend
*
* @author Magento Core Team <[email protected]>
*/
class Image extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend
{
const IMAGE_PATH_SEGMENT = 'catalog/category/';
public const IMAGE_PATH_SEGMENT = 'catalog/category/';

/**
* Store manager
*
* @var \Magento\Store\Model\StoreManagerInterface
*/
protected $_storeManager;

/**
* Construct
*
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
*/
public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* Catalog category landing page attribute source
*
* @author Magento Core Team <[email protected]>
*/
class Layout extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@

/**
* Catalog category landing page attribute source
*
* @author Magento Core Team <[email protected]>
*/
class Page extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
/**
* Block collection factory
*
* @var \Magento\Cms\Model\ResourceModel\Block\CollectionFactory
*/
protected $_blockCollectionFactory;

/**
* Construct
*
* @param \Magento\Cms\Model\ResourceModel\Block\CollectionFactory $blockCollectionFactory
*/
public function __construct(\Magento\Cms\Model\ResourceModel\Block\CollectionFactory $blockCollectionFactory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* Category resource collection
*
* @api
* @author Magento Core Team <[email protected]>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
*/
Expand Down
Loading