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

Small PHPDocs fixes [Catalog module] #20338

Merged
merged 4 commits into from Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function delete(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $p
/**
* Remove the product assignment from the category by category id and sku
*
* @param string $categoryId
* @param int $categoryId
Copy link
Author

Choose a reason for hiding this comment

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

see app/code/Magento/Catalog/Model/CategoryLinkManagement.php:88

* @param string $sku
* @return bool will returned True if products successfully deleted
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function getFormattedPrices();
/**
* Set dto with formatted prices
*
* @param string[] $formattedPriceInfo
* @param FormattedPriceInfoInterface $formattedPriceInfo
* @return void
* @since 101.1.0
*/
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Api/Data/ProductRenderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getAddToCartButton();
/**
* Set information needed for render "Add To Cart" button on front
*
* @param \Magento\Catalog\Api\Data\ProductRender\ButtonInterface $addToCartData
* @param ButtonInterface $cartAddToCartButton
* @return void
* @since 101.1.0
*/
Expand All @@ -47,7 +47,7 @@ public function getAddToCompareButton();
/**
* Set information needed for render "Add To Compare" button on front
*
* @param ButtonInterface $compareUrlData
* @param ButtonInterface $compareButton
* @return string
* @since 101.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public function render(AbstractElement $element)
*/
protected function _getHeaderHtml($element)
{
$id = $element->getHtmlId();
$default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');

$html = '<h4 class="icon-head head-edit-form">' . $element->getLegend() . '</h4>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(
/**
* Move category action
*
* @return \Magento\Framework\Controller\Result\Raw
* @return \Magento\Framework\Controller\Result\Json
*/
public function execute()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Controller/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Index extends \Magento\Framework\App\Action\Action
/**
* Index action
*
* @return $this
* @return \Magento\Framework\Controller\Result\Redirect
*/
public function execute()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Catalog/Helper/Product/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Configuration extends AbstractHelper implements ConfigurationInterface
* @param \Magento\Framework\Filter\FilterManager $filter
* @param \Magento\Framework\Stdlib\StringUtils $string
* @param Json $serializer
* @param Escaper $escaper
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Catalog/Helper/Product/ProductList.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ProductList

/**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Registry $coreRegistry
*/
public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Helper/Product/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function __construct(
*
* @param \Magento\Framework\View\Result\Page $resultPage
* @param \Magento\Catalog\Model\Product $product
* @return \Magento\Framework\View\Result\Page
* @return $this
*/
private function preparePageMetadata(ResultPage $resultPage, $product)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ protected function isRangingNeeded()
/**
* Returns a list of category ids which are assigned to product ids in the index
*
* @param array $productIds
* @return \Magento\Framework\Indexer\CacheContext
*/
private function getCategoryIdsFromIndex(array $productIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(
* @param int $storeId
* @param int $productId
* @param string $valueFieldSuffix
* @return \Magento\Catalog\Model\Indexer\Product\Flat
* @return $this
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.NPathComplexity)
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/Layer/Filter/Decimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Decimal extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Catalog\Model\Layer $layer
* @param \Magento\Catalog\Model\Layer\Filter\Item\DataBuilder $itemDataBuilder
* @param \Magento\Catalog\Model\ResourceModel\Layer\Filter\DecimalFactory $filterDecimalFactory
* @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
* @param \Magento\Catalog\Model\Layer\Filter\DataProvider\DecimalFactory $dataProviderFactory
* @param array $data
*/
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(

/**
* @param \Magento\Catalog\Api\ProductRepositoryInterface $subject
* @param callable $proceed
* @param \Closure $proceed
* @param \Magento\Catalog\Api\Data\ProductInterface $product
* @param bool $saveOptions
* @return \Magento\Catalog\Api\Data\ProductInterface
Expand All @@ -52,7 +52,7 @@ public function aroundSave(

/**
* @param \Magento\Catalog\Api\ProductRepositoryInterface $subject
* @param callable $proceed
* @param \Closure $proceed
* @param \Magento\Catalog\Api\Data\ProductInterface $product
* @return bool
* @throws \Exception
Expand All @@ -77,7 +77,7 @@ public function aroundDelete(

/**
* @param \Magento\Catalog\Api\ProductRepositoryInterface $subject
* @param callable $proceed
* @param \Closure $proceed
* @param string $productSku
* @return bool
* @throws \Exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public function validateUserValue($values)
public function prepareForCart()
{
if ($this->getIsValid() && $this->getUserValue() !== null) {
$option = $this->getOption();
$value = $this->getUserValue();

if (isset($value['date_internal']) && $value['date_internal'] != '') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ReadHandler implements ExtensionInterface

/**
* ReadHandler constructor.
* @param ProductWebsiteLink $resourceModel
* @param ProductWebsiteLink $productWebsiteLink
*/
public function __construct(
ProductWebsiteLink $productWebsiteLink
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/ProductRender.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function getExtensionAttributes()
* Set an extension attributes object.
*
* @param \Magento\Catalog\Api\Data\ProductRenderExtensionInterface $extensionAttributes
* @return $this
* @return void
*/
public function setExtensionAttributes(
\Magento\Catalog\Api\Data\ProductRenderExtensionInterface $extensionAttributes
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Model/ProductRender/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Image extends \Magento\Framework\Model\AbstractExtensibleModel implements
{
/**
* @param string $url
* @return @return void
* @return void
*/
public function setUrl($url)
{
Expand Down Expand Up @@ -149,7 +149,7 @@ public function getExtensionAttributes()
* Set an extension attributes object.
*
* @param \Magento\Catalog\Api\Data\ProductRender\ImageExtensionInterface $extensionAttributes
* @return $this
* @return void
*/
public function setExtensionAttributes(
\Magento\Catalog\Api\Data\ProductRender\ImageExtensionInterface $extensionAttributes
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Catalog/Model/ProductRenderList.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class ProductRenderList implements ProductRenderListInterface
* @param ProductRenderSearchResultsFactory $searchResultFactory
* @param ProductRenderFactory $productRenderDtoFactory
* @param Config $config
* @param Product\Visibility $productVisibility
* @param CollectionModifier $collectionModifier
* @param array $productAttributes
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function setPage($pageNum, $pageSize)
*
* @param int $limit
* @param int $offset
* @return \Magento\Eav\Model\Entity\Collection\AbstractCollection
* @return \Magento\Framework\DB\Select
*/
protected function _getAllIdsSelect($limit = null, $offset = null)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/ResourceModel/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ protected function _getTree()
* delete child categories
*
* @param \Magento\Framework\DataObject $object
* @return $this
* @return void
*/
protected function _beforeDelete(\Magento\Framework\DataObject $object)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ abstract class AbstractEav extends \Magento\Catalog\Model\ResourceModel\Product\
* @param \Magento\Eav\Model\Config $eavConfig
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param null $connectionName
* @param \Magento\Indexer\Model\Indexer\StateFactory|null $stateFactory
*/
public function __construct(
\Magento\Framework\Model\ResourceModel\Db\Context $context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class BaseFinalPrice
* @param \Magento\Framework\App\ResourceConnection $resource
* @param JoinAttributeProcessor $joinAttributeProcessor
* @param \Magento\Framework\Module\Manager $moduleManager
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\EntityManager\MetadataPool $metadataPool
* @param string $connectionName
*/
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TemporaryTableStrategy implements \Magento\Framework\Indexer\Table\Strateg

/**
* TemporaryTableStrategy constructor.
* @param \Magento\Framework\Indexer\Table\Strategy $strategy
* @param \Magento\Framework\Indexer\Table\StrategyInterface $strategy
* @param \Magento\Framework\App\ResourceConnection $resource
*/
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(
/**
* @param string $entityType
* @param object $entity
* @return object
* @return void
* @throws CouldNotDeleteException
* @throws NoSuchEntityException
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/Rss/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(
/**
* @param \Magento\Catalog\Model\Category $category
* @param int $storeId
* @return $this
* @return \Magento\Catalog\Model\ResourceModel\Product\Collection
*/
public function getProductCollection(\Magento\Catalog\Model\Category $category, $storeId)
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Model/Template/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(
* Set use absolute links flag
*
* @param bool $flag
* @return \Magento\Email\Model\Template\Filter
* @return $this
*/
public function setUseAbsoluteLinks($flag)
{
Expand All @@ -79,7 +79,7 @@ public function setUseAbsoluteLinks($flag)
* Doesn't set anything intentionally, since SID is not allowed in any kind of emails
*
* @param bool $flag
* @return \Magento\Email\Model\Template\Filter
* @return $this
*/
public function setUseSessionInUrl($flag)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(

/**
* @param \Magento\Catalog\Model\ResourceModel\Config $config
* @param callable $proceed
* @param \Closure $proceed
* @return array
*/
public function aroundGetAttributesUsedInListing(
Expand All @@ -74,7 +74,7 @@ public function aroundGetAttributesUsedInListing(

/**
* @param \Magento\Catalog\Model\ResourceModel\Config $config
* @param callable $proceed
* @param \Closure $proceed
* @return array
*/
public function aroundGetAttributesUsedForSortBy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ private function getAttributes()
* Loads attributes for specified groups at once
*
* @param AttributeGroupInterface[] $groups
* @return @return ProductAttributeInterface[]
* @return ProductAttributeInterface[]
*/
private function loadAttributesForGroups(array $groups)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class CompositeConfigProcessor implements WysiwygConfigDataProcessorInterface

/**
* CompositeConfigProcessor constructor.
* @param Logger $logger
* @param array $eavWysiwygDataProcessors
*/
public function __construct(Logger $logger, array $eavWysiwygDataProcessors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class DataProvider extends \Magento\Framework\View\Element\UiComponent\DataProvi

/**
* @param string $name
* @param string $primaryFieldName
* @param string $requestFieldName
* @param Reporting $reporting
* @param SearchCriteriaBuilder $searchCriteriaBuilder
* @param RequestInterface $request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ interface ProductRenderCollectorInterface
*
* @param ProductInterface $product
* @param ProductRenderInterface $productRender
* @param array $data
* @return void
* @since 101.1.0
*/
Expand Down