diff --git a/app/code/Magento/Authorization/Model/CompositeUserContext.php b/app/code/Magento/Authorization/Model/CompositeUserContext.php index 567422bb138f4..1f98631188307 100644 --- a/app/code/Magento/Authorization/Model/CompositeUserContext.php +++ b/app/code/Magento/Authorization/Model/CompositeUserContext.php @@ -9,7 +9,12 @@ use Magento\Framework\ObjectManager\Helper\Composite as CompositeHelper; /** - * Composite user context (implements composite pattern). + * User context. + * + * This class is not implementing standard composite pattern and will not invoke all of its children. + * Instead, it will try to find the first suitable child and return its result. + * + * @api */ class CompositeUserContext implements \Magento\Authorization\Model\UserContextInterface { diff --git a/app/code/Magento/Authorization/Model/ResourceModel/Permissions/Collection.php b/app/code/Magento/Authorization/Model/ResourceModel/Permissions/Collection.php index f04ae37d05efd..997687868da62 100644 --- a/app/code/Magento/Authorization/Model/ResourceModel/Permissions/Collection.php +++ b/app/code/Magento/Authorization/Model/ResourceModel/Permissions/Collection.php @@ -8,20 +8,9 @@ /** * Admin permissions collection * - * @author Magento Core Team + * @deprecated + * @see \Magento\Authorization\Model\ResourceModel\Rules\Collection */ -class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection +class Collection extends \Magento\Authorization\Model\ResourceModel\Rules\Collection { - /** - * Initialize resource - * - * @return void - */ - protected function _construct() - { - $this->_init( - \Magento\Authorization\Model\Rules::class, - \Magento\Authorization\Model\ResourceModel\Rules::class - ); - } } diff --git a/app/code/Magento/Authorization/Model/ResourceModel/Role/Collection.php b/app/code/Magento/Authorization/Model/ResourceModel/Role/Collection.php index 350511cc3b839..18f932d2732d0 100644 --- a/app/code/Magento/Authorization/Model/ResourceModel/Role/Collection.php +++ b/app/code/Magento/Authorization/Model/ResourceModel/Role/Collection.php @@ -9,6 +9,8 @@ /** * Admin role collection + * + * @api */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/Authorization/Model/ResourceModel/Rules/Collection.php b/app/code/Magento/Authorization/Model/ResourceModel/Rules/Collection.php index 841a3fa32207d..d90cdfd1df6d7 100644 --- a/app/code/Magento/Authorization/Model/ResourceModel/Rules/Collection.php +++ b/app/code/Magento/Authorization/Model/ResourceModel/Rules/Collection.php @@ -8,7 +8,7 @@ /** * Rules collection * - * @author Magento Core Team + * @api */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/Authorization/Model/Role.php b/app/code/Magento/Authorization/Model/Role.php index 41bf08e656a7f..c40514de1a35f 100644 --- a/app/code/Magento/Authorization/Model/Role.php +++ b/app/code/Magento/Authorization/Model/Role.php @@ -24,6 +24,7 @@ * @method \Magento\Authorization\Model\Role setUserType(string $value) * @method string getRoleName() * @method \Magento\Authorization\Model\Role setRoleName(string $value) + * @api */ class Role extends \Magento\Framework\Model\AbstractModel { diff --git a/app/code/Magento/Authorization/Model/Rules.php b/app/code/Magento/Authorization/Model/Rules.php index 065bf552572f7..77ca82e059ca8 100644 --- a/app/code/Magento/Authorization/Model/Rules.php +++ b/app/code/Magento/Authorization/Model/Rules.php @@ -21,6 +21,7 @@ * @method \Magento\Authorization\Model\Rules setAssertId(int $value) * @method string getPermission() * @method \Magento\Authorization\Model\Rules setPermission(string $value) + * @api */ class Rules extends \Magento\Framework\Model\AbstractModel { @@ -30,14 +31,14 @@ class Rules extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Authorization\Model\ResourceModel\Rules $resource - * @param \Magento\Authorization\Model\ResourceModel\Permissions\Collection $resourceCollection + * @param \Magento\Authorization\Model\ResourceModel\Rules\Collection $resourceCollection * @param array $data */ public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Authorization\Model\ResourceModel\Rules $resource, - \Magento\Authorization\Model\ResourceModel\Permissions\Collection $resourceCollection, + \Magento\Authorization\Model\ResourceModel\Rules\Collection $resourceCollection, array $data = [] ) { parent::__construct($context, $registry, $resource, $resourceCollection, $data); diff --git a/app/code/Magento/Authorization/Model/UserContextInterface.php b/app/code/Magento/Authorization/Model/UserContextInterface.php index 0049adb07a44d..2db9cec811651 100644 --- a/app/code/Magento/Authorization/Model/UserContextInterface.php +++ b/app/code/Magento/Authorization/Model/UserContextInterface.php @@ -8,6 +8,8 @@ /** * Interface for current user identification. + * + * @api */ interface UserContextInterface { diff --git a/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php b/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php index f08479b4f4c78..8d6fe96022313 100644 --- a/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php +++ b/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ +namespace Magento\Captcha\Block\Adminhtml\Captcha; + /** * Captcha block for adminhtml area - * - * @author Magento Core Team */ -namespace Magento\Captcha\Block\Adminhtml\Captcha; - class DefaultCaptcha extends \Magento\Captcha\Block\Captcha\DefaultCaptcha { /** diff --git a/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php b/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php index 0d4b56bf0ac89..c0a091ca2d0d9 100644 --- a/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php +++ b/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php @@ -7,8 +7,6 @@ /** * Captcha block - * - * @author Magento Core Team */ class DefaultCaptcha extends \Magento\Framework\View\Element\Template { diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php index 55dd2fccc5368..9372510911f7f 100644 --- a/app/code/Magento/Captcha/Helper/Data.php +++ b/app/code/Magento/Captcha/Helper/Data.php @@ -11,6 +11,8 @@ /** * Captcha image model + * + * @api */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Captcha/Model/DefaultModel.php b/app/code/Magento/Captcha/Model/DefaultModel.php index a45e682200112..37db991f60721 100644 --- a/app/code/Magento/Captcha/Model/DefaultModel.php +++ b/app/code/Magento/Captcha/Model/DefaultModel.php @@ -8,7 +8,7 @@ /** * Implementation of \Zend\Captcha\Image * - * @author Magento Core Team + * @api */ class DefaultModel extends \Zend\Captcha\Image implements \Magento\Captcha\Model\CaptchaInterface { diff --git a/app/code/Magento/Captcha/view/frontend/web/captcha.js b/app/code/Magento/Captcha/view/frontend/web/captcha.js index 612dd50b0ae10..0d4d4812f64c3 100644 --- a/app/code/Magento/Captcha/view/frontend/web/captcha.js +++ b/app/code/Magento/Captcha/view/frontend/web/captcha.js @@ -9,6 +9,9 @@ define([ ], function ($) { 'use strict'; + /** + * @api + */ $.widget('mage.captcha', { options: { refreshClass: 'refreshing', @@ -26,7 +29,7 @@ define([ }, /** - * Method triggeres an AJAX request to refresh the CAPTCHA image + * Method triggers an AJAX request to refresh the CAPTCHA image */ refresh: function () { var imageLoader = this.options.imageLoader; diff --git a/app/code/Magento/Catalog/Block/ShortcutButtons.php b/app/code/Magento/Catalog/Block/ShortcutButtons.php index 8a148896f893f..87524c64656f1 100644 --- a/app/code/Magento/Catalog/Block/ShortcutButtons.php +++ b/app/code/Magento/Catalog/Block/ShortcutButtons.php @@ -7,6 +7,13 @@ use Magento\Framework\View\Element\Template; +/** + * Shortcuts container + * + * Accepts shortcuts on shortcut_buttons_container event and render shortcuts using custom order + * + * @api + */ class ShortcutButtons extends Template { /**#@+ diff --git a/app/code/Magento/Catalog/Block/ShortcutInterface.php b/app/code/Magento/Catalog/Block/ShortcutInterface.php index 5d8650ceff9f2..96bed4053f7cc 100644 --- a/app/code/Magento/Catalog/Block/ShortcutInterface.php +++ b/app/code/Magento/Catalog/Block/ShortcutInterface.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Block; +/** + * Shortcut block interface + * + * @api + */ interface ShortcutInterface { /** diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php index 2ee4fc7be13de..8bc45dab06033 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -15,6 +15,9 @@ /** * Catalog data helper + * + * @api + * * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index bcfb4324de1b0..2bb69b3143c53 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -9,6 +9,8 @@ /** * Catalog image helper + * + * @api * @SuppressWarnings(PHPMD.TooManyFields) */ class Image extends AbstractHelper diff --git a/app/code/Magento/Catalog/Helper/Product/Compare.php b/app/code/Magento/Catalog/Helper/Product/Compare.php index 6aaed45196e3c..5894a4bffc4e5 100644 --- a/app/code/Magento/Catalog/Helper/Product/Compare.php +++ b/app/code/Magento/Catalog/Helper/Product/Compare.php @@ -11,6 +11,8 @@ /** * Catalog Product Compare Helper * + * @api + * * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Helper/Product/Composite.php b/app/code/Magento/Catalog/Helper/Product/Composite.php index 3edec0bd02023..cd58cd9c74143 100644 --- a/app/code/Magento/Catalog/Helper/Product/Composite.php +++ b/app/code/Magento/Catalog/Helper/Product/Composite.php @@ -17,6 +17,8 @@ /** * Adminhtml catalog product composite helper * + * @api + * * @author Magento Core Team * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Helper/Product/Configuration/ConfigurationInterface.php b/app/code/Magento/Catalog/Helper/Product/Configuration/ConfigurationInterface.php index e1ed8969bdc44..df20c3060f14f 100644 --- a/app/code/Magento/Catalog/Helper/Product/Configuration/ConfigurationInterface.php +++ b/app/code/Magento/Catalog/Helper/Product/Configuration/ConfigurationInterface.php @@ -8,6 +8,8 @@ /** * Interface for product configuration helpers + * + * @api */ interface ConfigurationInterface { diff --git a/app/code/Magento/Catalog/Helper/Product/ConfigurationPool.php b/app/code/Magento/Catalog/Helper/Product/ConfigurationPool.php index d147250b3f6ee..ba1288fb61137 100644 --- a/app/code/Magento/Catalog/Helper/Product/ConfigurationPool.php +++ b/app/code/Magento/Catalog/Helper/Product/ConfigurationPool.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Helper\Product; +/** + * @api + */ class ConfigurationPool { /** diff --git a/app/code/Magento/Catalog/Helper/Product/ProductList.php b/app/code/Magento/Catalog/Helper/Product/ProductList.php index b5cd25eb5a7e1..37e1c0a1380e8 100644 --- a/app/code/Magento/Catalog/Helper/Product/ProductList.php +++ b/app/code/Magento/Catalog/Helper/Product/ProductList.php @@ -10,6 +10,8 @@ /** * Class ProductList + * + * @api */ class ProductList { diff --git a/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php b/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php index 66690edfae3b3..dac70a03909a4 100644 --- a/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php +++ b/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php @@ -9,7 +9,9 @@ use Magento\Eav\Model\Entity\Attribute\Exception; /** - * Product url key attribute backend + * Layout update attribute backend + * + * @api * * @SuppressWarnings(PHPMD.LongVariable) */ diff --git a/app/code/Magento/Catalog/Model/Attribute/Backend/Startdate.php b/app/code/Magento/Catalog/Model/Attribute/Backend/Startdate.php index 3b4849021e914..f26851a317c72 100644 --- a/app/code/Magento/Catalog/Model/Attribute/Backend/Startdate.php +++ b/app/code/Magento/Catalog/Model/Attribute/Backend/Startdate.php @@ -9,6 +9,8 @@ * * Speical Start Date attribute backend * + * @api + * * @author Magento Core Team */ class Startdate extends \Magento\Eav\Model\Entity\Attribute\Backend\Datetime diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php index c3c121696b576..dd632ec31a471 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php @@ -7,6 +7,8 @@ /** * Catalog category image attribute backend model * + * @api + * * @author Magento Core Team */ namespace Magento\Catalog\Model\Category\Attribute\Backend; diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php index b1f9547afcd1c..e5328e924655f 100644 --- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php +++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php @@ -8,6 +8,8 @@ /** * Catalog Category Attribute Default and Available Sort By Backend Model * + * @api + * * @author Magento Core Team */ class Sortby extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend diff --git a/app/code/Magento/Catalog/Model/Category/DataProvider.php b/app/code/Magento/Catalog/Model/Category/DataProvider.php index 75366c9462b19..6ddc6cc4ec48a 100644 --- a/app/code/Magento/Catalog/Model/Category/DataProvider.php +++ b/app/code/Magento/Catalog/Model/Category/DataProvider.php @@ -28,6 +28,8 @@ /** * Class DataProvider * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider diff --git a/app/code/Magento/Catalog/Model/Design.php b/app/code/Magento/Catalog/Model/Design.php index f8a4841dec64d..cd35560e90dce 100644 --- a/app/code/Magento/Catalog/Model/Design.php +++ b/app/code/Magento/Catalog/Model/Design.php @@ -8,6 +8,8 @@ /** * Catalog Custom Category design Model * + * @api + * * @author Magento Core Team */ class Design extends \Magento\Framework\Model\AbstractModel diff --git a/app/code/Magento/Catalog/Model/Indexer/AbstractFlatState.php b/app/code/Magento/Catalog/Model/Indexer/AbstractFlatState.php index 73ea7247abb86..5e83da993e96d 100644 --- a/app/code/Magento/Catalog/Model/Indexer/AbstractFlatState.php +++ b/app/code/Magento/Catalog/Model/Indexer/AbstractFlatState.php @@ -7,6 +7,9 @@ use Magento\Store\Model\ScopeInterface; +/** + * @api + */ abstract class AbstractFlatState { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Flat.php b/app/code/Magento/Catalog/Model/Indexer/Category/Flat.php index 10f64fc2938be..a2fdc79d533cf 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat.php @@ -7,6 +7,11 @@ use Magento\Framework\Indexer\CacheContext; +/** + * Category flat indexer + * + * @api + */ class Flat implements \Magento\Framework\Indexer\ActionInterface, \Magento\Framework\Mview\ActionInterface { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/SkipStaticColumnsProvider.php b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/SkipStaticColumnsProvider.php index d46fd7dc2f9e2..a1e985c16ecff 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/SkipStaticColumnsProvider.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/SkipStaticColumnsProvider.php @@ -6,6 +6,11 @@ namespace Magento\Catalog\Model\Indexer\Category\Flat; +/** + * Static columns provider + * + * @api + */ class SkipStaticColumnsProvider { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/State.php b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/State.php index e0b17ce0e43c2..af4d3ea24c12e 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Flat/State.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Flat/State.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model\Indexer\Category\Flat; +/** + * @api + */ class State extends \Magento\Catalog\Model\Indexer\AbstractFlatState { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product.php index e369f8a4e24a5..9c849e99e526a 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product.php @@ -7,6 +7,11 @@ use Magento\Framework\Indexer\CacheContext; +/** + * Category product indexer + * + * @api + */ class Product implements \Magento\Framework\Indexer\ActionInterface, \Magento\Framework\Mview\ActionInterface { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php index 7fe1fa5cb08d9..5704bc4b2cbfd 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php @@ -15,6 +15,9 @@ /** * Class AbstractAction + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractAction diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Processor.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Processor.php index de85d262fc0f8..9bdb503c46bf0 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Processor.php +++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Processor.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Model\Indexer\Category\Product; +/** + * Category product link indexer + * + * @api + */ class Processor extends \Magento\Framework\Indexer\AbstractProcessor { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Category.php b/app/code/Magento/Catalog/Model/Indexer/Product/Category.php index 0bd8c8658937b..5e50e1e4c83dc 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Category.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Category.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model\Indexer\Product; +/** + * @api + */ class Category extends \Magento\Catalog\Model\Indexer\Category\Product { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Processor.php b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Processor.php index e48f1dde92a5b..49421c8041e7f 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Processor.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Processor.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Model\Indexer\Product\Category; +/** + * Product category link indexer + * + * @api + */ class Processor extends \Magento\Framework\Indexer\AbstractProcessor { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Processor.php b/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Processor.php index c9e45928314e9..a94d523fe3bac 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Processor.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Processor.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Model\Indexer\Product\Eav; +/** + * EAV attribute indexer in catalog + * + * @api + */ class Processor extends \Magento\Framework\Indexer\AbstractProcessor { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Processor.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Processor.php index d078447cd7799..9189cb4c16d46 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Processor.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Processor.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Model\Indexer\Product\Flat; +/** + * Catalog flat indexer + * + * @api + */ class Processor extends \Magento\Framework\Indexer\AbstractProcessor { /** diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Table/BuilderInterface.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Table/BuilderInterface.php index 35a1e59cc71e0..595c4412a018b 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Table/BuilderInterface.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Table/BuilderInterface.php @@ -7,6 +7,8 @@ /** * Interface BuilderInterface + * + * @api */ interface BuilderInterface { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/Processor.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/Processor.php index bb29eeb3ea0df..ae91320743ccd 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/Processor.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/Processor.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model\Indexer\Product\Price; +/** + * @api + */ class Processor extends \Magento\Framework\Indexer\AbstractProcessor { /** diff --git a/app/code/Magento/Catalog/Model/Layer.php b/app/code/Magento/Catalog/Model/Layer.php index c0fc29e6dd3e5..8cb9ea9cb8a5e 100644 --- a/app/code/Magento/Catalog/Model/Layer.php +++ b/app/code/Magento/Catalog/Model/Layer.php @@ -12,6 +12,8 @@ /** * Catalog view layer model * + * @api + * * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Model/Layer/AvailabilityFlagInterface.php b/app/code/Magento/Catalog/Model/Layer/AvailabilityFlagInterface.php index a56e83101374b..597932bf897a4 100644 --- a/app/code/Magento/Catalog/Model/Layer/AvailabilityFlagInterface.php +++ b/app/code/Magento/Catalog/Model/Layer/AvailabilityFlagInterface.php @@ -6,6 +6,9 @@ */ namespace Magento\Catalog\Model\Layer; +/** + * @api + */ interface AvailabilityFlagInterface { /** diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmInterface.php b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmInterface.php index d1a8e7b09fd6a..8ac3cfeebd269 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmInterface.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/AlgorithmInterface.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model\Layer\Filter\Dynamic; +/** + * @api + */ interface AlgorithmInterface { /** diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/FilterInterface.php b/app/code/Magento/Catalog/Model/Layer/Filter/FilterInterface.php index 7a450e5fb4d21..76e49da6a5e12 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/FilterInterface.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/FilterInterface.php @@ -7,6 +7,8 @@ /** * Layer filter interface + * + * @api */ interface FilterInterface { diff --git a/app/code/Magento/Catalog/Model/Locator/LocatorInterface.php b/app/code/Magento/Catalog/Model/Locator/LocatorInterface.php index a2b239102d9b4..fd49238e86a31 100644 --- a/app/code/Magento/Catalog/Model/Locator/LocatorInterface.php +++ b/app/code/Magento/Catalog/Model/Locator/LocatorInterface.php @@ -10,6 +10,8 @@ /** * Interface LocatorInterface + * + * @api */ interface LocatorInterface { diff --git a/app/code/Magento/Catalog/Model/Product/Action.php b/app/code/Magento/Catalog/Model/Product/Action.php index a6f77c3db6719..fb9ed89c9afc7 100644 --- a/app/code/Magento/Catalog/Model/Product/Action.php +++ b/app/code/Magento/Catalog/Model/Product/Action.php @@ -11,6 +11,8 @@ /** * Catalog Product Mass Action processing model * + * @api + * * @author Magento Core Team */ class Action extends \Magento\Framework\Model\AbstractModel diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterInterface.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterInterface.php index b831cdb326f1c..2d6e9d66ea6d7 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterInterface.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterInterface.php @@ -11,6 +11,8 @@ /** * Interface EntryConverterInterface. Create Media Gallery Entry and extract Entry data + * + * @api */ interface EntryConverterInterface { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterPool.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterPool.php index 4bb51b4ddf666..ee4f3af3f3a90 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterPool.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/EntryConverterPool.php @@ -8,6 +8,8 @@ /** * Class aggregate all Media Gallery Entry Converters + * + * @api */ class EntryConverterPool { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php index eb38fa4925afd..a3a448508e487 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php @@ -11,6 +11,8 @@ /** * Backend model for set of EAV attributes with 'frontend_input' equals 'price'. * + * @api + * * @author Magento Core Team */ class Price extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Status.php b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Status.php index 96cce5f4d1307..9f75caac275bb 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Status.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Status.php @@ -11,6 +11,8 @@ /** * Product status functionality model + * + * @api */ class Status extends AbstractSource implements SourceInterface, OptionSourceInterface { diff --git a/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php b/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php index bbfc901d0682e..e9619a4833403 100644 --- a/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php +++ b/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php @@ -4,11 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\Catalog\Model\Product; + /** * Product price interface for external catalogs + * + * @api */ -namespace Magento\Catalog\Model\Product; - interface CatalogPriceInterface { /** diff --git a/app/code/Magento/Catalog/Model/Product/Compare/Item.php b/app/code/Magento/Catalog/Model/Product/Compare/Item.php index d12c2d6ed8801..9d8fa10ba9603 100644 --- a/app/code/Magento/Catalog/Model/Product/Compare/Item.php +++ b/app/code/Magento/Catalog/Model/Product/Compare/Item.php @@ -10,6 +10,8 @@ /** * Catalog Compare Item Model * + * @api + * * @method \Magento\Catalog\Model\ResourceModel\Product\Compare\Item getResource() * @method \Magento\Catalog\Model\Product\Compare\Item setVisitorId(int $value) * @method \Magento\Catalog\Model\Product\Compare\Item setCustomerId(int $value) diff --git a/app/code/Magento/Catalog/Model/Product/Compare/ListCompare.php b/app/code/Magento/Catalog/Model/Product/Compare/ListCompare.php index 192a8f27db44c..b726d3af6b826 100644 --- a/app/code/Magento/Catalog/Model/Product/Compare/ListCompare.php +++ b/app/code/Magento/Catalog/Model/Product/Compare/ListCompare.php @@ -10,6 +10,8 @@ /** * Product Compare List Model * + * @api + * * @SuppressWarnings(PHPMD.LongVariable) */ class ListCompare extends \Magento\Framework\DataObject diff --git a/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemInterface.php b/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemInterface.php index 9d2bd45d3c27f..06937bf5cf23b 100644 --- a/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemInterface.php +++ b/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemInterface.php @@ -8,6 +8,8 @@ /** * Product configurational item interface + * + * @api */ interface ItemInterface { diff --git a/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.php b/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.php index 34c45ca09c274..42a92017693eb 100644 --- a/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.php +++ b/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.php @@ -8,6 +8,11 @@ use Magento\Catalog\Model\Product\CopyConstructorFactory; use Magento\Catalog\Model\Product\CopyConstructorInterface; +/** + * Performs duplication process by applying product type convertors + * + * @api + */ class Composite implements CopyConstructorInterface { /** diff --git a/app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php b/app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php index c70752b4287af..c0f03ff911557 100644 --- a/app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php +++ b/app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Model\Product; +/** + * Contains duplication logic for variety of product types + * + * @api + */ interface CopyConstructorInterface { /** diff --git a/app/code/Magento/Catalog/Model/Product/Exception.php b/app/code/Magento/Catalog/Model/Product/Exception.php index e0f37af360bd3..bcd9ddb057ab8 100644 --- a/app/code/Magento/Catalog/Model/Product/Exception.php +++ b/app/code/Magento/Catalog/Model/Product/Exception.php @@ -7,6 +7,9 @@ use Magento\Framework\Exception\LocalizedException; +/** + * @api + */ class Exception extends LocalizedException { } diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php index 4465fdc464edf..98c4a3d82bddc 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php @@ -12,6 +12,8 @@ /** * Create handler for catalog product gallery * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CreateHandler implements ExtensionInterface diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php b/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php index fe636f1fad3eb..92ce6e6555c4b 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/Processor.php @@ -11,6 +11,9 @@ /** * Catalog product Media Gallery attribute processor. + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Processor diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/ReadHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/ReadHandler.php index 07e9526e257d6..040dabb60dab8 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/ReadHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/ReadHandler.php @@ -10,6 +10,8 @@ /** * Read handler for catalog product gallery. + * + * @api */ class ReadHandler implements ExtensionInterface { diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php index 8e56b14f93c7a..4d6942871aaf3 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php @@ -9,6 +9,8 @@ /** * Update handler for catalog product gallery. + * + * @api */ class UpdateHandler extends \Magento\Catalog\Model\Product\Gallery\CreateHandler { diff --git a/app/code/Magento/Catalog/Model/Product/Link.php b/app/code/Magento/Catalog/Model/Product/Link.php index 486d038d4ade2..d59377191c3d5 100644 --- a/app/code/Magento/Catalog/Model/Product/Link.php +++ b/app/code/Magento/Catalog/Model/Product/Link.php @@ -11,6 +11,8 @@ /** * Catalog product link model * + * @api + * * @method \Magento\Catalog\Model\ResourceModel\Product\Link _getResource() * @method \Magento\Catalog\Model\ResourceModel\Product\Link getResource() * @method int getProductId() diff --git a/app/code/Magento/Catalog/Model/Product/Link/Converter.php b/app/code/Magento/Catalog/Model/Product/Link/Converter.php index ae661893922aa..0bdffabb79b29 100644 --- a/app/code/Magento/Catalog/Model/Product/Link/Converter.php +++ b/app/code/Magento/Catalog/Model/Product/Link/Converter.php @@ -7,6 +7,8 @@ /** * Class Converter + * + * @api */ class Converter { diff --git a/app/code/Magento/Catalog/Model/Product/Link/Resolver.php b/app/code/Magento/Catalog/Model/Product/Link/Resolver.php index d495e02d363dc..9b9e4ccc249d0 100644 --- a/app/code/Magento/Catalog/Model/Product/Link/Resolver.php +++ b/app/code/Magento/Catalog/Model/Product/Link/Resolver.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model\Product\Link; +/** + * @api + */ class Resolver { /** diff --git a/app/code/Magento/Catalog/Model/Product/Media/Config.php b/app/code/Magento/Catalog/Model/Product/Media/Config.php index 56dececc028e4..cab94e9aeeea8 100644 --- a/app/code/Magento/Catalog/Model/Product/Media/Config.php +++ b/app/code/Magento/Catalog/Model/Product/Media/Config.php @@ -14,6 +14,8 @@ /** * Catalog product media config * + * @api + * * @author Magento Core Team */ class Config implements ConfigInterface diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php index 555081530f4cd..60d37e516a364 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php @@ -14,6 +14,8 @@ /** * Catalog product option default type * + * @api + * * @author Magento Core Team * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php b/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php index 6419158b9438f..8e7720ad031d4 100644 --- a/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php +++ b/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php @@ -8,6 +8,8 @@ /** * Validation Result is used to aggregate errors that occurred during price update. + * + * @api */ class Result { diff --git a/app/code/Magento/Catalog/Model/Product/PriceModifierInterface.php b/app/code/Magento/Catalog/Model/Product/PriceModifierInterface.php index 18300a6c9f7f5..77af87653bf60 100644 --- a/app/code/Magento/Catalog/Model/Product/PriceModifierInterface.php +++ b/app/code/Magento/Catalog/Model/Product/PriceModifierInterface.php @@ -9,6 +9,9 @@ use Magento\Catalog\Model\Product; +/** + * @api + */ interface PriceModifierInterface { /** diff --git a/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php index 31405564dd811..37b3fc33e7b34 100644 --- a/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php @@ -7,6 +7,8 @@ /** * Class Toolbar + * + * @api */ class Toolbar { diff --git a/app/code/Magento/Catalog/Model/Product/ReservedAttributeList.php b/app/code/Magento/Catalog/Model/Product/ReservedAttributeList.php index cd356831c78ee..4ea64a1d815ca 100644 --- a/app/code/Magento/Catalog/Model/Product/ReservedAttributeList.php +++ b/app/code/Magento/Catalog/Model/Product/ReservedAttributeList.php @@ -8,6 +8,9 @@ namespace Magento\Catalog\Model\Product; +/** + * @api + */ class ReservedAttributeList { /** diff --git a/app/code/Magento/Catalog/Model/Product/Type.php b/app/code/Magento/Catalog/Model/Product/Type.php index 48c9462bfff1f..76ac6b18f2950 100644 --- a/app/code/Magento/Catalog/Model/Product/Type.php +++ b/app/code/Magento/Catalog/Model/Product/Type.php @@ -6,6 +6,8 @@ /** * Product type model + * + * @api */ namespace Magento\Catalog\Model\Product; diff --git a/app/code/Magento/Catalog/Model/Product/Url.php b/app/code/Magento/Catalog/Model/Product/Url.php index 18af6de938002..969d7fc7eeeaa 100644 --- a/app/code/Magento/Catalog/Model/Product/Url.php +++ b/app/code/Magento/Catalog/Model/Product/Url.php @@ -7,6 +7,8 @@ /** * Product Url model * + * @api + * * @author Magento Core Team */ namespace Magento\Catalog\Model\Product; diff --git a/app/code/Magento/Catalog/Model/Product/Visibility.php b/app/code/Magento/Catalog/Model/Product/Visibility.php index 70114001391d5..cd26f4653066d 100644 --- a/app/code/Magento/Catalog/Model/Product/Visibility.php +++ b/app/code/Magento/Catalog/Model/Product/Visibility.php @@ -7,6 +7,8 @@ /** * Catalog Product visibilite model and attribute source model * + * @api + * * @author Magento Core Team */ namespace Magento\Catalog\Model\Product; diff --git a/app/code/Magento/Catalog/Model/ProductOptionProcessorInterface.php b/app/code/Magento/Catalog/Model/ProductOptionProcessorInterface.php index f839928005236..f15135ed2a7ed 100644 --- a/app/code/Magento/Catalog/Model/ProductOptionProcessorInterface.php +++ b/app/code/Magento/Catalog/Model/ProductOptionProcessorInterface.php @@ -8,6 +8,11 @@ use Magento\Catalog\Api\Data\ProductOptionInterface; use Magento\Framework\DataObject; +/** + * Allows to dump and apply product configurations + * + * @api + */ interface ProductOptionProcessorInterface { /** diff --git a/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php b/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php index 6cd3533d44c73..10fe4aae0ce2a 100644 --- a/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php +++ b/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php @@ -5,6 +5,11 @@ */ namespace Magento\Catalog\Model\ProductTypes; +/** + * Provides product types configuration + * + * @api + */ interface ConfigInterface { /** diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index 03844041c9631..d7d4ab238020a 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -12,6 +12,9 @@ /** * Catalog entity abstract model + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index ae0a8036d2389..b5bfa5b738a67 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -10,6 +10,8 @@ /** * Category resource collection * + * @api + * * @author Magento Core Team */ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php index d329ca6f51572..685e22658b2be 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php @@ -9,6 +9,8 @@ * Catalog EAV collection resource abstract model * Implement using different stores for retrieve attribute values * + * @api + * * @author Magento Core Team * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Attribute.php b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Attribute.php index d1f25ccea202e..096d7d02ccb3d 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Attribute.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Attribute.php @@ -10,6 +10,8 @@ /** * Catalog Layer Attribute Filter Resource Model * + * @api + * * @author Magento Core Team */ class Attribute extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Decimal.php b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Decimal.php index b798e16fa165d..510edb97870a9 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Decimal.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Decimal.php @@ -10,6 +10,8 @@ /** * Catalog Layer Decimal attribute Filter Resource Model * + * @api + * * @author Magento Core Team */ class Decimal extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php index b269ee00fb9a1..4e66298da2b17 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php @@ -7,6 +7,8 @@ /** * Catalog Layer Price Filter resource model + * + * @api * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Price extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index b07e2521b3a92..d96374f2576c8 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -22,6 +22,9 @@ /** * Product collection + * + * @api + * * @SuppressWarnings(PHPMD.ExcessivePublicCount) * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php index 48f61652982d7..7c9b2acd19fd5 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php @@ -8,6 +8,8 @@ /** * Catalog Product Compare Items Resource Collection * + * @api + * * @author Magento Core Team * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index eeb3cf6933cfc..c63948d307ee0 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -9,6 +9,8 @@ /** * Catalog product media gallery resource model. + * + * @api */ class Gallery extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/AbstractIndexer.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/AbstractIndexer.php index 84589092387f4..523224ebd0be7 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/AbstractIndexer.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/AbstractIndexer.php @@ -10,6 +10,8 @@ /** * Catalog Product Indexer Abstract Resource Model * + * @api + * * @author Magento Core Team */ abstract class AbstractIndexer extends \Magento\Indexer\Model\ResourceModel\AbstractResource diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php index 069e3187488b2..a613690209432 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php @@ -11,6 +11,8 @@ * Default Product Type Price Indexer Resource model * For correctly work need define product type id * + * @api + * * @author Magento Core Team * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/PriceInterface.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/PriceInterface.php index c8e1b9aea538a..c79a2da6714a6 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/PriceInterface.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/PriceInterface.php @@ -8,6 +8,8 @@ /** * Catalog Product Type Price Indexer interface * + * @api + * * @author Magento Core Team */ interface PriceInterface diff --git a/app/code/Magento/Catalog/Model/Session.php b/app/code/Magento/Catalog/Model/Session.php index 5129535e157e5..a4c5a1ce2d51b 100644 --- a/app/code/Magento/Catalog/Model/Session.php +++ b/app/code/Magento/Catalog/Model/Session.php @@ -7,6 +7,8 @@ /** * Catalog session model + * + * @api */ class Session extends \Magento\Framework\Session\SessionManager { diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php index 19d0af2159514..bb7c2298d381d 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php @@ -19,6 +19,10 @@ use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; /** + * URL suffix backend model + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Suffix extends \Magento\Framework\App\Config\Value diff --git a/app/code/Magento/Catalog/Pricing/Price/CustomOptionPriceInterface.php b/app/code/Magento/Catalog/Pricing/Price/CustomOptionPriceInterface.php index b8fee2bf85008..b969b948a80a5 100644 --- a/app/code/Magento/Catalog/Pricing/Price/CustomOptionPriceInterface.php +++ b/app/code/Magento/Catalog/Pricing/Price/CustomOptionPriceInterface.php @@ -7,6 +7,8 @@ /** * Option price interface + * + * @api */ interface CustomOptionPriceInterface { diff --git a/app/code/Magento/Catalog/Pricing/Price/FinalPriceInterface.php b/app/code/Magento/Catalog/Pricing/Price/FinalPriceInterface.php index 95890f97b675a..4523e054df07c 100644 --- a/app/code/Magento/Catalog/Pricing/Price/FinalPriceInterface.php +++ b/app/code/Magento/Catalog/Pricing/Price/FinalPriceInterface.php @@ -8,6 +8,8 @@ /** * Special price interface + * + * @api */ interface FinalPriceInterface { diff --git a/app/code/Magento/Catalog/Pricing/Price/TierPriceInterface.php b/app/code/Magento/Catalog/Pricing/Price/TierPriceInterface.php index 783cc85b93925..96837e7072667 100644 --- a/app/code/Magento/Catalog/Pricing/Price/TierPriceInterface.php +++ b/app/code/Magento/Catalog/Pricing/Price/TierPriceInterface.php @@ -8,6 +8,8 @@ /** * Tier price interface + * + * @api */ interface TierPriceInterface { diff --git a/app/code/Magento/Catalog/Pricing/Render.php b/app/code/Magento/Catalog/Pricing/Render.php index 165006357a4e6..13fd5cc68456c 100644 --- a/app/code/Magento/Catalog/Pricing/Render.php +++ b/app/code/Magento/Catalog/Pricing/Render.php @@ -15,6 +15,8 @@ /** * Catalog Price Render * + * @api + * * @method string getPriceRender() * @method string getPriceTypeCode() */ diff --git a/app/code/Magento/Catalog/Ui/AllowedProductTypes.php b/app/code/Magento/Catalog/Ui/AllowedProductTypes.php index 1728eadf62efb..35942b37d6bdd 100644 --- a/app/code/Magento/Catalog/Ui/AllowedProductTypes.php +++ b/app/code/Magento/Catalog/Ui/AllowedProductTypes.php @@ -9,6 +9,8 @@ /** * Class AllowedProductTypes contains product types on which some product type can be displayed + * + * @api */ class AllowedProductTypes { diff --git a/app/code/Magento/Catalog/Ui/Component/Category/Form/Element/Wysiwyg.php b/app/code/Magento/Catalog/Ui/Component/Category/Form/Element/Wysiwyg.php index 86a43a4361c5f..b3e9a09e9997a 100644 --- a/app/code/Magento/Catalog/Ui/Component/Category/Form/Element/Wysiwyg.php +++ b/app/code/Magento/Catalog/Ui/Component/Category/Form/Element/Wysiwyg.php @@ -16,6 +16,8 @@ /** * Catalog Wysiwyg + * + * @api */ class Wysiwyg extends \Magento\Ui\Component\Form\Element\Wysiwyg { diff --git a/app/code/Magento/Catalog/Ui/Component/ColumnFactory.php b/app/code/Magento/Catalog/Ui/Component/ColumnFactory.php index 0d6cf8e0b6852..14b35a043c5dd 100644 --- a/app/code/Magento/Catalog/Ui/Component/ColumnFactory.php +++ b/app/code/Magento/Catalog/Ui/Component/ColumnFactory.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Ui\Component; +/** + * @api + */ class ColumnFactory { /** diff --git a/app/code/Magento/Catalog/Ui/Component/FilterFactory.php b/app/code/Magento/Catalog/Ui/Component/FilterFactory.php index 1ff350115ff2b..76e2914447ab8 100644 --- a/app/code/Magento/Catalog/Ui/Component/FilterFactory.php +++ b/app/code/Magento/Catalog/Ui/Component/FilterFactory.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Ui\Component; +/** + * @api + */ class FilterFactory { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/AbstractRepository.php b/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/AbstractRepository.php index 1111434fb7538..d07d45053ac0b 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/AbstractRepository.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/AbstractRepository.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Ui\Component\Listing\Attribute; +/** + * @api + */ abstract class AbstractRepository implements RepositoryInterface { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/Repository.php b/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/Repository.php index b3b9b63191a5c..1bef5902ae685 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/Repository.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Ui\Component\Listing\Attribute; +/** + * @api + */ class Repository extends AbstractRepository { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/RepositoryInterface.php b/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/RepositoryInterface.php index 77babdbe14dab..7294c8d2140a9 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/RepositoryInterface.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Attribute/RepositoryInterface.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Ui\Component\Listing\Attribute; +/** + * @api + */ interface RepositoryInterface { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns.php index 3c8707c79dcca..46e6becae9c45 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Ui\Component\Listing; +/** + * @api + */ class Columns extends \Magento\Ui\Component\Listing\Columns { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/AttributeSetText.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/AttributeSetText.php index 63795a59ffb06..0f5ace404ec71 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/AttributeSetText.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/AttributeSetText.php @@ -9,6 +9,9 @@ use Magento\Framework\View\Element\UiComponent\ContextInterface; use Magento\Eav\Api\AttributeSetRepositoryInterface; +/** + * @api + */ class AttributeSetText extends \Magento\Ui\Component\Listing\Columns\Column { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php index a066d1c873ed3..b7cc46818b311 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php @@ -8,6 +8,9 @@ use Magento\Framework\View\Element\UiComponentFactory; use Magento\Framework\View\Element\UiComponent\ContextInterface; +/** + * @api + */ class Price extends \Magento\Ui\Component\Listing\Columns\Column { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/ProductActions.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/ProductActions.php index 084722a903c83..92474f050fa55 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/ProductActions.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/ProductActions.php @@ -12,6 +12,8 @@ /** * Class ProductActions + * + * @api */ class ProductActions extends Column { diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/StatusText.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/StatusText.php index c630822c01e4c..22e5e144c585c 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/StatusText.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/StatusText.php @@ -10,6 +10,9 @@ use Magento\Catalog\Model\Product\Attribute\Source\Status; use Magento\Catalog\Api\Data\ProductInterface; +/** + * @api + */ class StatusText extends \Magento\Ui\Component\Listing\Columns\Column { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Thumbnail.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Thumbnail.php index f8844cf738b0e..c4ec0aedfa6b9 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Thumbnail.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Thumbnail.php @@ -8,6 +8,9 @@ use Magento\Framework\View\Element\UiComponentFactory; use Magento\Framework\View\Element\UiComponent\ContextInterface; +/** + * @api + */ class Thumbnail extends \Magento\Ui\Component\Listing\Columns\Column { const NAME = 'thumbnail'; diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php index 0d9490c51596c..d9173a567a300 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php @@ -9,6 +9,9 @@ use Magento\Framework\View\Element\UiComponent\ContextInterface; use Magento\Store\Model\StoreManagerInterface; +/** + * @api + */ class Websites extends \Magento\Ui\Component\Listing\Columns\Column { /** diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Filters.php b/app/code/Magento/Catalog/Ui/Component/Listing/Filters.php index 3ac15b01b95b9..e9e5ddc11e527 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Filters.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Filters.php @@ -10,6 +10,9 @@ use Magento\Framework\View\Element\UiComponent\ObserverInterface; use Magento\Framework\View\Element\UiComponentInterface; +/** + * @api + */ class Filters implements ObserverInterface { /** diff --git a/app/code/Magento/Catalog/Ui/DataProvider/CatalogEavValidationRules.php b/app/code/Magento/Catalog/Ui/DataProvider/CatalogEavValidationRules.php index 73da59c55a40d..69ea82f29b006 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/CatalogEavValidationRules.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/CatalogEavValidationRules.php @@ -9,6 +9,8 @@ /** * Class build validation rules for catalog EAV attributes + * + * @api */ class CatalogEavValidationRules { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/AddStoreFieldToCollection.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/AddStoreFieldToCollection.php index 1b39020578e88..35962ccbfb390 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/AddStoreFieldToCollection.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/AddStoreFieldToCollection.php @@ -9,6 +9,9 @@ use Magento\Store\Model\StoreManagerInterface; use Magento\Ui\DataProvider\AddFilterToCollectionInterface; +/** + * @api + */ class AddStoreFieldToCollection implements AddFilterToCollectionInterface { /** diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/AddWebsitesFieldToCollection.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/AddWebsitesFieldToCollection.php index 75e6c5a69f0f1..e1b5f59d0e322 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/AddWebsitesFieldToCollection.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/AddWebsitesFieldToCollection.php @@ -10,6 +10,8 @@ /** * Class AddWebsitesFieldToCollection + * + * @api */ class AddWebsitesFieldToCollection implements AddFieldToCollectionInterface { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php index 94528e928e8de..cab8a9f88f7a0 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractModifier.php @@ -11,6 +11,8 @@ /** * Class AbstractModifier * + * @api + * * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class AbstractModifier implements ModifierInterface diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php index 1a27558df17c0..cd2bccd7b7385 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php @@ -27,6 +27,8 @@ /** * Class AdvancedPricing + * + * @api * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AttributeSet.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AttributeSet.php index d9e8ae33990f1..4ded2cd714059 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AttributeSet.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AttributeSet.php @@ -14,6 +14,8 @@ /** * Add "Attribute Set" to first fieldset + * + * @api */ class AttributeSet extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Attributes.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Attributes.php index 6e94b789df7f0..f08d971d535e4 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Attributes.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Attributes.php @@ -14,6 +14,8 @@ /** * Class Attributes + * + * @api */ class Attributes extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php index 557e8c290a009..c14e516ed4484 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php @@ -17,6 +17,9 @@ /** * Data provider for categories field of product page + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Categories extends AbstractModifier diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php index 9ec1512e34b12..eacce2156f899 100755 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php @@ -26,6 +26,9 @@ /** * Data provider for "Customizable Options" panel + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CustomOptions extends AbstractModifier diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php index 8d065c06b7e34..d50cb1cddbf27 100755 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php @@ -35,6 +35,8 @@ /** * Class Eav * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) */ diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php index d2a40f915e5a9..8a911b8984317 100755 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php @@ -12,6 +12,8 @@ /** * Data provider for main panel of product page + * + * @api */ class General extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php index 66c1e2b8c37dd..8052c90e71c45 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Images.php @@ -9,6 +9,8 @@ /** * Class Images customizes Images panel + * + * @api */ class Images extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Related.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Related.php index 5cb0d1afa3806..fc22cf80eb8aa 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Related.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Related.php @@ -26,6 +26,9 @@ /** * Class Related + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Related extends AbstractModifier diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php index 86db128c4973a..2f2982d29165c 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php @@ -9,6 +9,8 @@ /** * Class ScheduleDesignUpdateMetaProvider customizes Schedule Design Update panel + * + * @api */ class ScheduleDesignUpdate extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/System.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/System.php index b8c00cd9ba525..441a31d18b3f9 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/System.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/System.php @@ -10,6 +10,8 @@ /** * Class SystemDataProvider + * + * @api */ class System extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php index 74fb69c53730c..bc8913d9eb936 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php @@ -16,6 +16,8 @@ /** * Tier prices modifier adds price type option to tier prices. + * + * @api */ class TierPrice extends AbstractModifier { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Websites.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Websites.php index ecc8622bcda2b..6fb0d5f581ac5 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Websites.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Websites.php @@ -15,6 +15,9 @@ /** * Class Websites customizes websites panel + * + * @api + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Websites extends AbstractModifier diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/NewCategoryDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/NewCategoryDataProvider.php index 4eed245ce3217..c8f93888922d3 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/NewCategoryDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/NewCategoryDataProvider.php @@ -11,6 +11,8 @@ /** * DataProvider for new category form + * + * @api */ class NewCategoryDataProvider extends AbstractDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php index 41e988f0f84a2..349ab3c23f7fe 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php @@ -12,6 +12,8 @@ /** * DataProvider for product edit form + * + * @api */ class ProductDataProvider extends AbstractDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCustomOptionsDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCustomOptionsDataProvider.php index 8c9a67edfbdc9..5fec105d50ab2 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCustomOptionsDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCustomOptionsDataProvider.php @@ -15,6 +15,8 @@ /** * DataProvider for grid on Import Custom Options modal panel + * + * @api */ class ProductCustomOptionsDataProvider extends ProductDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php index ee44c04b8f409..adba6b38c38ca 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php @@ -9,6 +9,8 @@ /** * Class ProductDataProvider + * + * @api */ class ProductDataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/AbstractDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/AbstractDataProvider.php index 0be6aee34996b..88e35b5821229 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/AbstractDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/AbstractDataProvider.php @@ -18,6 +18,8 @@ /** * Class AbstractDataProvider + * + * @api */ abstract class AbstractDataProvider extends ProductDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/CrossSellDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/CrossSellDataProvider.php index 5439e24ff1519..3780f773738f2 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/CrossSellDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/CrossSellDataProvider.php @@ -7,6 +7,8 @@ /** * Class CrossSellDataProvider + * + * @api */ class CrossSellDataProvider extends AbstractDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/RelatedDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/RelatedDataProvider.php index fbd99c3bf8a01..c15240be53566 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/RelatedDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/RelatedDataProvider.php @@ -7,6 +7,8 @@ /** * Class RelatedDataProvider + * + * @api */ class RelatedDataProvider extends AbstractDataProvider { diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/UpSellDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/UpSellDataProvider.php index 442542b21de8e..d28ae7bb19756 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/UpSellDataProvider.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Related/UpSellDataProvider.php @@ -7,6 +7,8 @@ /** * Class UpSellDataProvider + * + * @api */ class UpSellDataProvider extends AbstractDataProvider { diff --git a/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js index 7557b77fe653c..550af3d5edc0b 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ "Magento_Ui/js/lib/view/utils/async", "jquery/ui", diff --git a/app/code/Magento/Catalog/view/adminhtml/web/catalog/type-events.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/type-events.js index d836974d8574d..f0e7e5c6bb41c 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/catalog/type-events.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/catalog/type-events.js @@ -2,6 +2,10 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +/** + * @api + */ define([ 'jquery' ], function ($) { diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/bundle-proxy-button.js b/app/code/Magento/Catalog/view/adminhtml/web/js/bundle-proxy-button.js index f260c5066223f..dc47e8c03067d 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/bundle-proxy-button.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/bundle-proxy-button.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'Magento_Ui/js/form/components/button', 'uiRegistry', diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/components/url-key-handle-changes.js b/app/code/Magento/Catalog/view/adminhtml/web/js/components/url-key-handle-changes.js index 0d3b0b83760ea..f169fb2a93446 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/components/url-key-handle-changes.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/components/url-key-handle-changes.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'Magento_Ui/js/form/element/single-checkbox' ], function (Checkbox) { diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js b/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js index ddbe3dd2de23d..b2a12bea30150 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery', 'underscore', diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/product/weight-handler.js b/app/code/Magento/Catalog/view/adminhtml/web/js/product/weight-handler.js index 7628b376abe3f..475c9d2dc0601 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/product/weight-handler.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/product/weight-handler.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery' ], function ($) { diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/utils/percentage-price-calculator.js b/app/code/Magento/Catalog/view/adminhtml/web/js/utils/percentage-price-calculator.js index f764f6a27211c..813b0b0d5a449 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/utils/percentage-price-calculator.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/utils/percentage-price-calculator.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define(['Magento_Ui/js/lib/validation/utils'], function (utils) { 'use strict'; diff --git a/app/code/Magento/Catalog/view/base/web/js/price-box.js b/app/code/Magento/Catalog/view/base/web/js/price-box.js index cd72f5454b174..783d39cddbc76 100644 --- a/app/code/Magento/Catalog/view/base/web/js/price-box.js +++ b/app/code/Magento/Catalog/view/base/web/js/price-box.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery', 'Magento_Catalog/js/price-utils', diff --git a/app/code/Magento/Catalog/view/base/web/js/price-utils.js b/app/code/Magento/Catalog/view/base/web/js/price-utils.js index 62193990a0e44..7c4280e64930f 100644 --- a/app/code/Magento/Catalog/view/base/web/js/price-utils.js +++ b/app/code/Magento/Catalog/view/base/web/js/price-utils.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery', 'underscore' diff --git a/app/code/Magento/CatalogRule/Model/Flag.php b/app/code/Magento/CatalogRule/Model/Flag.php index 99cfc2134c505..df52fa0b69e9d 100644 --- a/app/code/Magento/CatalogRule/Model/Flag.php +++ b/app/code/Magento/CatalogRule/Model/Flag.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * Flag stores status about availability not applied catalog price rules - * - * @author Magento Core Team - */ namespace Magento\CatalogRule\Model; +/** + * Flag indicates that some rules have changed but changes have not been applied yet. + */ class Flag extends \Magento\Framework\Flag { /** diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php index 082df47564514..53c7544f70e79 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -16,6 +16,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class IndexBuilder { diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Scope/IndexTableNotExistException.php b/app/code/Magento/CatalogSearch/Model/Indexer/Scope/IndexTableNotExistException.php index 4fbdc6c03f626..62ddd76b422c4 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Scope/IndexTableNotExistException.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Scope/IndexTableNotExistException.php @@ -11,6 +11,8 @@ /** * Exception which represents situation where temporary index table should be used somewhere, * but it does not exist in a database + * + * @api */ class IndexTableNotExistException extends LocalizedException { diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php b/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php index c4f54e13b6f1a..728342ce29986 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php @@ -10,6 +10,8 @@ /** * Exception for situation where used state which is not defined in configuration + * + * @api */ class UnknownStateException extends LocalizedException { diff --git a/app/code/Magento/Checkout/Exception.php b/app/code/Magento/Checkout/Exception.php index bb86d53d194fa..4957e6be9b5da 100644 --- a/app/code/Magento/Checkout/Exception.php +++ b/app/code/Magento/Checkout/Exception.php @@ -5,6 +5,9 @@ */ namespace Magento\Checkout; +/** + * @api + */ class Exception extends \Magento\Framework\Exception\LocalizedException { } diff --git a/app/code/Magento/Cookie/Helper/Cookie.php b/app/code/Magento/Cookie/Helper/Cookie.php index 4d70b945ba22c..992f1f25ac536 100644 --- a/app/code/Magento/Cookie/Helper/Cookie.php +++ b/app/code/Magento/Cookie/Helper/Cookie.php @@ -7,6 +7,7 @@ /** * Cookie helper + * @api */ class Cookie extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Cookie/view/frontend/web/js/notices.js b/app/code/Magento/Cookie/view/frontend/web/js/notices.js index 8d76656d71a37..8ae7d64875822 100644 --- a/app/code/Magento/Cookie/view/frontend/web/js/notices.js +++ b/app/code/Magento/Cookie/view/frontend/web/js/notices.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery', 'jquery/ui', diff --git a/app/code/Magento/Cookie/view/frontend/web/js/require-cookie.js b/app/code/Magento/Cookie/view/frontend/web/js/require-cookie.js index 0f0f54b0fd529..8fd329ee0e0e8 100644 --- a/app/code/Magento/Cookie/view/frontend/web/js/require-cookie.js +++ b/app/code/Magento/Cookie/view/frontend/web/js/require-cookie.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery', 'jquery/ui' diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php b/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php index 6957d34658a61..6aa8810583e3a 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php @@ -8,7 +8,7 @@ use Magento\Framework\Exception\AlreadyExistsException; /** - * Class AttributeGroupAlreadyExistsException + * @api */ class AttributeGroupAlreadyExistsException extends AlreadyExistsException { diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php b/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php index d677f66940d85..559cce22bb2c7 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Exception.php @@ -8,7 +8,7 @@ /** * EAV entity attribute exception * - * @author Magento Core Team + * @api */ class Exception extends \Magento\Framework\Exception\LocalizedException { diff --git a/app/code/Magento/Integration/Model/AdminTokenService.php b/app/code/Magento/Integration/Model/AdminTokenService.php index 18efcaef3f93c..140c3ddc97791 100644 --- a/app/code/Magento/Integration/Model/AdminTokenService.php +++ b/app/code/Magento/Integration/Model/AdminTokenService.php @@ -17,13 +17,12 @@ /** * Class to handle token generation for Admins - * */ class AdminTokenService implements \Magento\Integration\Api\AdminTokenServiceInterface { /** * Token Model - *a + * * @var TokenModelFactory */ private $tokenModelFactory; diff --git a/app/code/Magento/Integration/Model/Integration.php b/app/code/Magento/Integration/Model/Integration.php index 700e53afbff71..a63da3195422c 100644 --- a/app/code/Magento/Integration/Model/Integration.php +++ b/app/code/Magento/Integration/Model/Integration.php @@ -26,6 +26,7 @@ * @method \string getUpdatedAt() * @method Integration setUpdatedAt(\string $createdAt) * @method \Magento\Integration\Model\ResourceModel\Integration getResource() + * @api */ class Integration extends \Magento\Framework\Model\AbstractModel { diff --git a/app/code/Magento/Integration/Model/Message/RecreatedIntegration.php b/app/code/Magento/Integration/Model/Message/RecreatedIntegration.php index 3ec6bfde7e75b..d3ef8dc5e262e 100644 --- a/app/code/Magento/Integration/Model/Message/RecreatedIntegration.php +++ b/app/code/Magento/Integration/Model/Message/RecreatedIntegration.php @@ -14,7 +14,6 @@ /** * Class RecreatedIntegration to display message when a config-based integration needs to be reactivated - * */ class RecreatedIntegration implements \Magento\Framework\Notification\MessageInterface { diff --git a/app/code/Magento/Integration/Model/Oauth/Token.php b/app/code/Magento/Integration/Model/Oauth/Token.php index 7d3ec73845b04..62c0cf36be64a 100644 --- a/app/code/Magento/Integration/Model/Oauth/Token.php +++ b/app/code/Magento/Integration/Model/Oauth/Token.php @@ -41,6 +41,7 @@ * @method int getAuthorized() * @method Token setAuthorized() setAuthorized(int $authorized) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class Token extends \Magento\Framework\Model\AbstractModel { diff --git a/app/code/Magento/Integration/view/adminhtml/web/js/integration.js b/app/code/Magento/Integration/view/adminhtml/web/js/integration.js index b40159b71f0e8..0bd7df8c0fa10 100644 --- a/app/code/Magento/Integration/view/adminhtml/web/js/integration.js +++ b/app/code/Magento/Integration/view/adminhtml/web/js/integration.js @@ -3,6 +3,11 @@ * See COPYING.txt for license details. */ +/** + * jQuery plugin is added. + * + * @api + */ define([ 'jquery', 'Magento_Ui/js/modal/alert', diff --git a/app/code/Magento/MediaStorage/Helper/File/Storage.php b/app/code/Magento/MediaStorage/Helper/File/Storage.php index 58fcdae694083..5406410cd9f3c 100644 --- a/app/code/Magento/MediaStorage/Helper/File/Storage.php +++ b/app/code/Magento/MediaStorage/Helper/File/Storage.php @@ -4,13 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\MediaStorage\Helper\File; + /** * File storage helper * - * @author Magento Core Team + * @api */ -namespace Magento\MediaStorage\Helper\File; - class Storage extends \Magento\Framework\App\Helper\AbstractHelper { /** diff --git a/app/code/Magento/MediaStorage/Helper/File/Storage/Database.php b/app/code/Magento/MediaStorage/Helper/File/Storage/Database.php index 8861da142b7d3..790329f30a70d 100644 --- a/app/code/Magento/MediaStorage/Helper/File/Storage/Database.php +++ b/app/code/Magento/MediaStorage/Helper/File/Storage/Database.php @@ -4,16 +4,16 @@ * See COPYING.txt for license details. */ -/** - * Database saving file helper - * - * @author Magento Core Team - */ namespace Magento\MediaStorage\Helper\File\Storage; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; +/** + * Database saving file helper + * + * @api + */ class Database extends \Magento\Framework\App\Helper\AbstractHelper { /** diff --git a/app/code/Magento/MediaStorage/Model/File/Storage.php b/app/code/Magento/MediaStorage/Model/File/Storage.php index 648fa11b32eeb..84633b3ed9ac8 100644 --- a/app/code/Magento/MediaStorage/Model/File/Storage.php +++ b/app/code/Magento/MediaStorage/Model/File/Storage.php @@ -14,7 +14,9 @@ /** * Class Storage + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class Storage extends AbstractModel { diff --git a/app/code/Magento/MediaStorage/Model/File/Storage/Database.php b/app/code/Magento/MediaStorage/Model/File/Storage/Database.php index 6dcf19b04ed36..17daa4d87339f 100644 --- a/app/code/Magento/MediaStorage/Model/File/Storage/Database.php +++ b/app/code/Magento/MediaStorage/Model/File/Storage/Database.php @@ -7,6 +7,8 @@ /** * Class Database + * + * @api */ class Database extends \Magento\MediaStorage\Model\File\Storage\Database\AbstractDatabase { diff --git a/app/code/Magento/MediaStorage/Model/File/Storage/File.php b/app/code/Magento/MediaStorage/Model/File/Storage/File.php index d1665a1caf201..11128d816544c 100644 --- a/app/code/Magento/MediaStorage/Model/File/Storage/File.php +++ b/app/code/Magento/MediaStorage/Model/File/Storage/File.php @@ -7,6 +7,8 @@ /** * Class File + * + * @api */ class File { diff --git a/app/code/Magento/MediaStorage/Model/File/Uploader.php b/app/code/Magento/MediaStorage/Model/File/Uploader.php index 5353f0ecb7eb6..a90ac8fb05df7 100644 --- a/app/code/Magento/MediaStorage/Model/File/Uploader.php +++ b/app/code/Magento/MediaStorage/Model/File/Uploader.php @@ -4,13 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\MediaStorage\Model\File; + /** * Core file uploader model * - * @author Magento Core Team + * @api */ -namespace Magento\MediaStorage\Model\File; - class Uploader extends \Magento\Framework\File\Uploader { /** diff --git a/app/code/Magento/Msrp/Pricing/Price/MsrpPriceInterface.php b/app/code/Magento/Msrp/Pricing/Price/MsrpPriceInterface.php index 0b8ccaf2610bd..95c822262df5c 100644 --- a/app/code/Magento/Msrp/Pricing/Price/MsrpPriceInterface.php +++ b/app/code/Magento/Msrp/Pricing/Price/MsrpPriceInterface.php @@ -10,6 +10,8 @@ /** * MSRP price interface + * + * @api */ interface MsrpPriceInterface { diff --git a/app/code/Magento/Msrp/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js b/app/code/Magento/Msrp/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js index 2b2770d0a9137..99d09c2e0da01 100644 --- a/app/code/Magento/Msrp/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js +++ b/app/code/Magento/Msrp/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js @@ -2,6 +2,11 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +/** + * @api + */ + define([ 'Magento_Tax/js/view/checkout/minicart/subtotal/totals', 'underscore' diff --git a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/ColumnNotFoundException.php b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/ColumnNotFoundException.php index 243a2a9658f0c..0cc2a7c24cfcc 100644 --- a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/ColumnNotFoundException.php +++ b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/ColumnNotFoundException.php @@ -8,6 +8,9 @@ use Magento\Framework\Exception\LocalizedException; +/** + * @api + */ class ColumnNotFoundException extends LocalizedException { diff --git a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/RowException.php b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/RowException.php index 4765b12dd79d0..bed2c9284dbc3 100644 --- a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/RowException.php +++ b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/CSV/RowException.php @@ -8,6 +8,9 @@ use Magento\Framework\Exception\LocalizedException; +/** + * @api + */ class RowException extends LocalizedException { } diff --git a/app/code/Magento/Paypal/Model/Api/ProcessableException.php b/app/code/Magento/Paypal/Model/Api/ProcessableException.php index 1695b5c2653c1..e455cf3128428 100644 --- a/app/code/Magento/Paypal/Model/Api/ProcessableException.php +++ b/app/code/Magento/Paypal/Model/Api/ProcessableException.php @@ -11,6 +11,9 @@ use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; +/** + * @api + */ class ProcessableException extends LocalizedException { /**#@+ diff --git a/app/code/Magento/Rule/Model/AbstractModel.php b/app/code/Magento/Rule/Model/AbstractModel.php index 717754c8a42ac..311f8b209a12a 100644 --- a/app/code/Magento/Rule/Model/AbstractModel.php +++ b/app/code/Magento/Rule/Model/AbstractModel.php @@ -10,7 +10,9 @@ /** * Abstract Rule entity data model + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ abstract class AbstractModel extends \Magento\Framework\Model\AbstractExtensibleModel { diff --git a/app/code/Magento/Rule/Model/Action/AbstractAction.php b/app/code/Magento/Rule/Model/Action/AbstractAction.php index 84bf10850dedf..e8111c0dc9cd1 100644 --- a/app/code/Magento/Rule/Model/Action/AbstractAction.php +++ b/app/code/Magento/Rule/Model/Action/AbstractAction.php @@ -9,7 +9,9 @@ use Magento\Framework\Data\Form\Element\AbstractElement; /** - * Quote rule action abstract + * Abstract rule action + * + * @api */ abstract class AbstractAction extends \Magento\Framework\DataObject implements ActionInterface { diff --git a/app/code/Magento/Rule/Model/Action/ActionInterface.php b/app/code/Magento/Rule/Model/Action/ActionInterface.php index 7e6886c0f2f85..ce2d74e020168 100644 --- a/app/code/Magento/Rule/Model/Action/ActionInterface.php +++ b/app/code/Magento/Rule/Model/Action/ActionInterface.php @@ -5,6 +5,9 @@ */ namespace Magento\Rule\Model\Action; +/** + * @api + */ interface ActionInterface { } diff --git a/app/code/Magento/Rule/Model/Action/Collection.php b/app/code/Magento/Rule/Model/Action/Collection.php index b404e2b1b1d1e..2f9963deffd12 100644 --- a/app/code/Magento/Rule/Model/Action/Collection.php +++ b/app/code/Magento/Rule/Model/Action/Collection.php @@ -5,6 +5,9 @@ */ namespace Magento\Rule\Model\Action; +/** + * @api + */ class Collection extends AbstractAction { /** diff --git a/app/code/Magento/Rule/Model/ActionFactory.php b/app/code/Magento/Rule/Model/ActionFactory.php index 994b0e3e191bd..4d20dd08365c3 100644 --- a/app/code/Magento/Rule/Model/ActionFactory.php +++ b/app/code/Magento/Rule/Model/ActionFactory.php @@ -3,8 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Rule\Model; +/** + * @api + */ class ActionFactory { /** diff --git a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php index 660dac2341929..75888b0deec81 100644 --- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php +++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php @@ -4,21 +4,20 @@ * See COPYING.txt for license details. */ -/** - * Abstract Rule condition data model - * - * @method string getOperator() - * @method string getFormName() - * @method setFormName() - */ namespace Magento\Rule\Model\Condition; use Magento\Framework\Data\Form; use Magento\Framework\Data\Form\Element\AbstractElement; /** + * Abstract Rule condition data model + * + * @method string getOperator() + * @method string getFormName() + * @method setFormName() * @SuppressWarnings(PHPMD.ExcessivePublicCount) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @api */ abstract class AbstractCondition extends \Magento\Framework\DataObject implements ConditionInterface { diff --git a/app/code/Magento/Rule/Model/Condition/Combine.php b/app/code/Magento/Rule/Model/Condition/Combine.php index 7534c63c78845..c8b1e744a62e4 100644 --- a/app/code/Magento/Rule/Model/Condition/Combine.php +++ b/app/code/Magento/Rule/Model/Condition/Combine.php @@ -5,6 +5,9 @@ */ namespace Magento\Rule\Model\Condition; +/** + * @api + */ class Combine extends AbstractCondition { /** diff --git a/app/code/Magento/Rule/Model/Condition/ConditionInterface.php b/app/code/Magento/Rule/Model/Condition/ConditionInterface.php index 2f95429020987..b7e03424a4860 100644 --- a/app/code/Magento/Rule/Model/Condition/ConditionInterface.php +++ b/app/code/Magento/Rule/Model/Condition/ConditionInterface.php @@ -5,6 +5,9 @@ */ namespace Magento\Rule\Model\Condition; +/** + * @api + */ interface ConditionInterface { /** diff --git a/app/code/Magento/Rule/Model/Condition/Context.php b/app/code/Magento/Rule/Model/Condition/Context.php index 353de3cc129e6..584d274e32547 100644 --- a/app/code/Magento/Rule/Model/Condition/Context.php +++ b/app/code/Magento/Rule/Model/Condition/Context.php @@ -4,12 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\Rule\Model\Condition; + /** - * Abstract block context object. Will be used as rule condition constructor modification point after release. + * Abstract block context object. Is used as rule condition constructor modification point. + * * Important: Should not be modified by extension developers. */ -namespace Magento\Rule\Model\Condition; - class Context implements \Magento\Framework\ObjectManager\ContextInterface { /** diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index 081258bcd5092..299b352e0bce5 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -4,16 +4,14 @@ * See COPYING.txt for license details. */ -/** - * Abstract Rule product condition data model - * - * @author Magento Core Team - */ namespace Magento\Rule\Model\Condition\Product; /** + * Abstract Rule product condition data model + * * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCondition { diff --git a/app/code/Magento/Rule/Model/Condition/Sql/Builder.php b/app/code/Magento/Rule/Model/Condition/Sql/Builder.php index 01b3ee6529624..c3ffda059c951 100644 --- a/app/code/Magento/Rule/Model/Condition/Sql/Builder.php +++ b/app/code/Magento/Rule/Model/Condition/Sql/Builder.php @@ -12,8 +12,6 @@ /** * Class SQL Builder - * - * @package Magento\Rule\Model\Condition\Sql */ class Builder { diff --git a/app/code/Magento/Rule/Model/Condition/Sql/Expression.php b/app/code/Magento/Rule/Model/Condition/Sql/Expression.php index 6826f6f84f591..0896a65652681 100644 --- a/app/code/Magento/Rule/Model/Condition/Sql/Expression.php +++ b/app/code/Magento/Rule/Model/Condition/Sql/Expression.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ +namespace Magento\Rule\Model\Condition\Sql; + /** * Abstract Rule sql condition - * - * @author Magento Core Team */ -namespace Magento\Rule\Model\Condition\Sql; - class Expression extends \Zend_Db_Expr { /** diff --git a/app/code/Magento/Rule/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Rule/Model/ResourceModel/AbstractResource.php index e698c9a2b73bd..d5953f6613f8b 100644 --- a/app/code/Magento/Rule/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Rule/Model/ResourceModel/AbstractResource.php @@ -4,13 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\Rule\Model\ResourceModel; + /** * Abstract Rule entity resource model * - * @author Magento Core Team + * @api */ -namespace Magento\Rule\Model\ResourceModel; - abstract class AbstractResource extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { /** diff --git a/app/code/Magento/Rule/Model/ResourceModel/Rule/Collection/AbstractCollection.php b/app/code/Magento/Rule/Model/ResourceModel/Rule/Collection/AbstractCollection.php index bc5971fd65367..dc4049b597ef8 100644 --- a/app/code/Magento/Rule/Model/ResourceModel/Rule/Collection/AbstractCollection.php +++ b/app/code/Magento/Rule/Model/ResourceModel/Rule/Collection/AbstractCollection.php @@ -4,13 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\Rule\Model\ResourceModel\Rule\Collection; + /** * Abstract Rule entity resource collection model * - * @author Magento Core Team + * @api */ -namespace Magento\Rule\Model\ResourceModel\Rule\Collection; - abstract class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { /** diff --git a/app/code/Magento/Rule/view/adminhtml/web/rules.js b/app/code/Magento/Rule/view/adminhtml/web/rules.js index d9fe11ec2d7f7..1423c05fefcaf 100644 --- a/app/code/Magento/Rule/view/adminhtml/web/rules.js +++ b/app/code/Magento/Rule/view/adminhtml/web/rules.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ "jquery", 'Magento_Ui/js/modal/alert', diff --git a/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php b/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php index 6d5ecc22bbfa5..a1435fd14db8c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php @@ -11,6 +11,7 @@ /** * Abstract items renderer * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class AbstractItems extends \Magento\Backend\Block\Template { diff --git a/app/code/Magento/Sales/Exception/CouldNotInvoiceException.php b/app/code/Magento/Sales/Exception/CouldNotInvoiceException.php index dff7089f08491..fc40a70a2396e 100644 --- a/app/code/Magento/Sales/Exception/CouldNotInvoiceException.php +++ b/app/code/Magento/Sales/Exception/CouldNotInvoiceException.php @@ -10,6 +10,8 @@ /** * Class CouldNotInvoiceException + * + * @api */ class CouldNotInvoiceException extends LocalizedException implements CouldNotInvoiceExceptionInterface { diff --git a/app/code/Magento/Sales/Exception/CouldNotRefundException.php b/app/code/Magento/Sales/Exception/CouldNotRefundException.php index 4b27ee52a85bd..c021fbab9505f 100644 --- a/app/code/Magento/Sales/Exception/CouldNotRefundException.php +++ b/app/code/Magento/Sales/Exception/CouldNotRefundException.php @@ -9,7 +9,7 @@ use Magento\Sales\Api\Exception\CouldNotRefundExceptionInterface; /** - * Class CouldNotRefundException + * @api */ class CouldNotRefundException extends LocalizedException implements CouldNotRefundExceptionInterface { diff --git a/app/code/Magento/Sales/Exception/CouldNotShipException.php b/app/code/Magento/Sales/Exception/CouldNotShipException.php index 8fd7963c20aa9..e9831a3f65e83 100644 --- a/app/code/Magento/Sales/Exception/CouldNotShipException.php +++ b/app/code/Magento/Sales/Exception/CouldNotShipException.php @@ -9,7 +9,7 @@ use Magento\Sales\Api\Exception\CouldNotShipExceptionInterface; /** - * Class CouldNotShipException + * @api */ class CouldNotShipException extends LocalizedException implements CouldNotShipExceptionInterface { diff --git a/app/code/Magento/Sales/Exception/DocumentValidationException.php b/app/code/Magento/Sales/Exception/DocumentValidationException.php index 628f97d7e8630..f9ea154c649fe 100644 --- a/app/code/Magento/Sales/Exception/DocumentValidationException.php +++ b/app/code/Magento/Sales/Exception/DocumentValidationException.php @@ -9,7 +9,7 @@ use Magento\Sales\Api\Exception\DocumentValidationExceptionInterface; /** - * Class DocumentValidationException + * @api */ class DocumentValidationException extends LocalizedException implements DocumentValidationExceptionInterface { diff --git a/app/code/Magento/Sales/Model/Config/Ordered.php b/app/code/Magento/Sales/Model/Config/Ordered.php index c6c29e3d6b826..acfa84408c39a 100644 --- a/app/code/Magento/Sales/Model/Config/Ordered.php +++ b/app/code/Magento/Sales/Model/Config/Ordered.php @@ -10,6 +10,7 @@ /** * Configuration class for ordered items + * @api * * @author Magento Core Team */ diff --git a/app/code/Magento/Sales/Model/Config/Source/Order/Status.php b/app/code/Magento/Sales/Model/Config/Source/Order/Status.php index 1db80266020eb..2b42f6d406035 100644 --- a/app/code/Magento/Sales/Model/Config/Source/Order/Status.php +++ b/app/code/Magento/Sales/Model/Config/Source/Order/Status.php @@ -9,6 +9,10 @@ */ namespace Magento\Sales\Model\Config\Source\Order; +/** + * Class Status + * @api + */ class Status implements \Magento\Framework\Option\ArrayInterface { const UNDEFINED_OPTION_LABEL = '-- Please Select --'; diff --git a/app/code/Magento/Sales/Model/ConfigInterface.php b/app/code/Magento/Sales/Model/ConfigInterface.php index 821374eef95fa..f7faaa92b452d 100644 --- a/app/code/Magento/Sales/Model/ConfigInterface.php +++ b/app/code/Magento/Sales/Model/ConfigInterface.php @@ -5,6 +5,10 @@ */ namespace Magento\Sales\Model; +/** + * Interface ConfigInterface + * @api + */ interface ConfigInterface { /** diff --git a/app/code/Magento/Sales/Model/EntityInterface.php b/app/code/Magento/Sales/Model/EntityInterface.php index 5df3610070d87..39bb270c9ca61 100644 --- a/app/code/Magento/Sales/Model/EntityInterface.php +++ b/app/code/Magento/Sales/Model/EntityInterface.php @@ -8,6 +8,7 @@ /** * Interface EntityInterface + * @api */ interface EntityInterface { diff --git a/app/code/Magento/Sales/Model/Increment.php b/app/code/Magento/Sales/Model/Increment.php index fb00f639c767a..c435e69c8ca9d 100644 --- a/app/code/Magento/Sales/Model/Increment.php +++ b/app/code/Magento/Sales/Model/Increment.php @@ -9,6 +9,7 @@ /** * Class Increment + * @deprecated */ class Increment { diff --git a/app/code/Magento/Sales/Model/Order/Address/Renderer.php b/app/code/Magento/Sales/Model/Order/Address/Renderer.php index fcf17afbe7e5e..f798865306812 100644 --- a/app/code/Magento/Sales/Model/Order/Address/Renderer.php +++ b/app/code/Magento/Sales/Model/Order/Address/Renderer.php @@ -12,6 +12,7 @@ /** * Class Renderer used for formatting an order address + * @api */ class Renderer { diff --git a/app/code/Magento/Sales/Model/Order/Config.php b/app/code/Magento/Sales/Model/Order/Config.php index 68e80c250fe99..18327920d897d 100644 --- a/app/code/Magento/Sales/Model/Order/Config.php +++ b/app/code/Magento/Sales/Model/Order/Config.php @@ -7,6 +7,7 @@ /** * Order configuration model + * @api */ class Config { diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php index 4d02d7ad69544..5f213f70cbbea 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php @@ -7,6 +7,7 @@ /** * Base class for credit memo total + * @api * * @author Magento Core Team */ diff --git a/app/code/Magento/Sales/Model/Order/Email/Container/Container.php b/app/code/Magento/Sales/Model/Order/Email/Container/Container.php index a289ffaa5da26..6dc810b0ecbfd 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Container/Container.php +++ b/app/code/Magento/Sales/Model/Order/Email/Container/Container.php @@ -9,6 +9,11 @@ use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; +/** + * Class Container + * + * @api + */ abstract class Container implements IdentityInterface { /** diff --git a/app/code/Magento/Sales/Model/Order/Email/NotifySender.php b/app/code/Magento/Sales/Model/Order/Email/NotifySender.php index de53485bbf8e1..f92b87e75fa3e 100644 --- a/app/code/Magento/Sales/Model/Order/Email/NotifySender.php +++ b/app/code/Magento/Sales/Model/Order/Email/NotifySender.php @@ -10,6 +10,10 @@ use Magento\Sales\Model\Order; +/** + * Class NotifySender + * @api + */ abstract class NotifySender extends Sender { /** diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender.php b/app/code/Magento/Sales/Model/Order/Email/Sender.php index 0a1b39efb90f7..6205d75d584c2 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender.php @@ -10,6 +10,11 @@ use Magento\Sales\Model\Order\Email\Container\Template; use Magento\Sales\Model\Order\Address\Renderer; +/** + * Class Sender + * @api + * + */ abstract class Sender { /** diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php index 6224a3907bcef..a25890b5bf1ca 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php @@ -7,7 +7,7 @@ /** * Base class for invoice total - * + * @api * @author Magento Core Team */ abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTotal diff --git a/app/code/Magento/Sales/Model/Order/Payment/Operations/AbstractOperation.php b/app/code/Magento/Sales/Model/Order/Payment/Operations/AbstractOperation.php index 2442a7179b3fa..54b29b595dce7 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Operations/AbstractOperation.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Operations/AbstractOperation.php @@ -13,6 +13,9 @@ use Magento\Sales\Model\Order\Payment\Transaction\BuilderInterface; use Magento\Sales\Model\Order\Payment\Transaction\ManagerInterface; +/** + * Class AbstractOperation + */ abstract class AbstractOperation { /** diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Config.php b/app/code/Magento/Sales/Model/Order/Pdf/Config.php index 6744233e13e86..fb52ed60653e0 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Config.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Config.php @@ -7,6 +7,9 @@ */ namespace Magento\Sales\Model\Order\Pdf; +/** + * Class Config + */ class Config { /** diff --git a/app/code/Magento/Sales/Model/Order/Pdf/ItemsFactory.php b/app/code/Magento/Sales/Model/Order/Pdf/ItemsFactory.php index 43238904f6ebb..81abce2854b1f 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/ItemsFactory.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/ItemsFactory.php @@ -7,6 +7,8 @@ /** * Factory class for \Magento\Sales\Model\Order\Pdf\Items\AbstractItems + * + * @internal */ class ItemsFactory { diff --git a/app/code/Magento/Sales/Model/Order/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Order/Total/AbstractTotal.php index eb7bf7abf2ca6..1113f739fee2b 100644 --- a/app/code/Magento/Sales/Model/Order/Total/AbstractTotal.php +++ b/app/code/Magento/Sales/Model/Order/Total/AbstractTotal.php @@ -7,7 +7,8 @@ /** * Base class for configure totals order - * + * @api + * * @author Magento Core Team */ abstract class AbstractTotal extends \Magento\Framework\DataObject diff --git a/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php b/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php index e79e94bdee3f2..6c766a67020a4 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php +++ b/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php @@ -10,6 +10,7 @@ /** * Class AbstractGrid + * @api */ abstract class AbstractGrid extends AbstractDb implements GridInterface { diff --git a/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php b/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php index 8a8ee5e9c799f..fdfabfb27927f 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php +++ b/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php @@ -14,6 +14,7 @@ /** * Abstract sales entity provides to its children knowledge about eventPrefix and eventObject * + * @api * @SuppressWarnings(PHPMD.NumberOfChildren) */ abstract class EntityAbstract extends AbstractDb diff --git a/app/code/Magento/Sales/Model/ResourceModel/GridInterface.php b/app/code/Magento/Sales/Model/ResourceModel/GridInterface.php index 7946302561aa1..fc492b4ba3707 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/GridInterface.php +++ b/app/code/Magento/Sales/Model/ResourceModel/GridInterface.php @@ -7,6 +7,7 @@ namespace Magento\Sales\Model\ResourceModel; /** + * @api * Interface GridInterface */ interface GridInterface diff --git a/app/code/Magento/Sales/Model/ResourceModel/GridPool.php b/app/code/Magento/Sales/Model/ResourceModel/GridPool.php index b7a015372ea2f..aacf096708697 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/GridPool.php +++ b/app/code/Magento/Sales/Model/ResourceModel/GridPool.php @@ -8,6 +8,7 @@ /** * Class GridPool + * @api */ class GridPool { diff --git a/app/code/Magento/Sales/Model/Status/ListFactory.php b/app/code/Magento/Sales/Model/Status/ListFactory.php index 7039e2a22570d..81352e2590f7a 100644 --- a/app/code/Magento/Sales/Model/Status/ListFactory.php +++ b/app/code/Magento/Sales/Model/Status/ListFactory.php @@ -5,6 +5,10 @@ */ namespace Magento\Sales\Model\Status; +/** + * Class ListFactory + * @internal + */ class ListFactory { /** diff --git a/app/code/Magento/SalesRule/Helper/Coupon.php b/app/code/Magento/SalesRule/Helper/Coupon.php index bfc3c3c5838c8..c5c64b0384cf4 100644 --- a/app/code/Magento/SalesRule/Helper/Coupon.php +++ b/app/code/Magento/SalesRule/Helper/Coupon.php @@ -11,7 +11,7 @@ /** * Helper for coupon codes creating and managing * - * @author Magento Core Team + * @api */ class Coupon extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/SalesRule/Model/Coupon/CodegeneratorInterface.php b/app/code/Magento/SalesRule/Model/Coupon/CodegeneratorInterface.php index fb706b87a2b75..6453a02cfcc1c 100644 --- a/app/code/Magento/SalesRule/Model/Coupon/CodegeneratorInterface.php +++ b/app/code/Magento/SalesRule/Model/Coupon/CodegeneratorInterface.php @@ -5,6 +5,9 @@ */ namespace Magento\SalesRule\Model\Coupon; +/** + * @api + */ interface CodegeneratorInterface { /** diff --git a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/DiscountInterface.php b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/DiscountInterface.php index 89ddb221a01df..05d78c6495e2b 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/DiscountInterface.php +++ b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/DiscountInterface.php @@ -5,6 +5,9 @@ */ namespace Magento\SalesRule\Model\Rule\Action\Discount; +/** + * @api + */ interface DiscountInterface { /** diff --git a/app/code/Magento/SalesRule/Model/Spi/CouponResourceInterface.php b/app/code/Magento/SalesRule/Model/Spi/CouponResourceInterface.php index 395b164846b2d..90ab16a950ed9 100644 --- a/app/code/Magento/SalesRule/Model/Spi/CouponResourceInterface.php +++ b/app/code/Magento/SalesRule/Model/Spi/CouponResourceInterface.php @@ -7,6 +7,8 @@ /** * Interface ResourceInterface + * + * @api */ interface CouponResourceInterface { diff --git a/app/code/Magento/SalesSequence/Model/Builder.php b/app/code/Magento/SalesSequence/Model/Builder.php index 50cb933cac049..8e6f0438ec88c 100644 --- a/app/code/Magento/SalesSequence/Model/Builder.php +++ b/app/code/Magento/SalesSequence/Model/Builder.php @@ -13,6 +13,8 @@ /** * Class Builder + * + * @api * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Builder diff --git a/app/code/Magento/SalesSequence/Model/Config.php b/app/code/Magento/SalesSequence/Model/Config.php index 2049c78163e89..e11e3aa034152 100644 --- a/app/code/Magento/SalesSequence/Model/Config.php +++ b/app/code/Magento/SalesSequence/Model/Config.php @@ -7,6 +7,8 @@ /** * Class Config - configuration container for sequence + * + * @api */ class Config { diff --git a/app/code/Magento/SalesSequence/Model/Manager.php b/app/code/Magento/SalesSequence/Model/Manager.php index 674a821a69e44..5c36757a88663 100644 --- a/app/code/Magento/SalesSequence/Model/Manager.php +++ b/app/code/Magento/SalesSequence/Model/Manager.php @@ -9,6 +9,7 @@ /** * Class Manager + * @api */ class Manager { diff --git a/app/code/Magento/SalesSequence/Model/Meta.php b/app/code/Magento/SalesSequence/Model/Meta.php index f1fed6ef4990f..ef635e4935a47 100644 --- a/app/code/Magento/SalesSequence/Model/Meta.php +++ b/app/code/Magento/SalesSequence/Model/Meta.php @@ -9,6 +9,8 @@ /** * Class Meta + * + * @api */ class Meta extends AbstractModel { diff --git a/app/code/Magento/SalesSequence/Model/Profile.php b/app/code/Magento/SalesSequence/Model/Profile.php index aa25631665d2f..11f741bca069c 100644 --- a/app/code/Magento/SalesSequence/Model/Profile.php +++ b/app/code/Magento/SalesSequence/Model/Profile.php @@ -9,6 +9,8 @@ /** * Class Profile + * + * @api */ class Profile extends AbstractModel { diff --git a/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php b/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php index bcd6e2f759a4d..a3c11a04371c2 100644 --- a/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php +++ b/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php @@ -14,6 +14,8 @@ /** * Class Meta represents metadata for sequence as sequence table and store id + * + * @api */ class Meta extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php b/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php index 681bd031a5b00..3092e535e08fd 100644 --- a/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php +++ b/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php @@ -11,6 +11,8 @@ /** * Class Profile represents profile data for sequence as prefix, suffix, start value etc. + * + * @api */ class Profile extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/SalesSequence/Model/Sequence.php b/app/code/Magento/SalesSequence/Model/Sequence.php index 91843300f2b9f..3e8fb4cd1ffb0 100644 --- a/app/code/Magento/SalesSequence/Model/Sequence.php +++ b/app/code/Magento/SalesSequence/Model/Sequence.php @@ -10,6 +10,8 @@ /** * Class Sequence represents sequence in logic + * + * @api */ class Sequence implements SequenceInterface { diff --git a/app/code/Magento/Search/Model/Synonym/MergeConflictException.php b/app/code/Magento/Search/Model/Synonym/MergeConflictException.php index 4a58e6b3b6f50..2c0ab409b47c5 100644 --- a/app/code/Magento/Search/Model/Synonym/MergeConflictException.php +++ b/app/code/Magento/Search/Model/Synonym/MergeConflictException.php @@ -10,6 +10,8 @@ /** * Exception class for merge conflict during inserting and updating synonym groups + * + * @api */ class MergeConflictException extends LocalizedException { diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index 2ee3939c3a5c1..0fcda559e0536 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -13,6 +13,8 @@ /** * Class AbstractCarrier + * + * @api */ abstract class AbstractCarrier extends \Magento\Framework\DataObject implements AbstractCarrierInterface { diff --git a/app/code/Magento/Shipping/Model/Config.php b/app/code/Magento/Shipping/Model/Config.php index 29115c63a5685..5f477387b1542 100644 --- a/app/code/Magento/Shipping/Model/Config.php +++ b/app/code/Magento/Shipping/Model/Config.php @@ -8,6 +8,10 @@ namespace Magento\Shipping\Model; +/** + * Class Config + * @api + */ class Config extends \Magento\Framework\DataObject { /** diff --git a/app/code/Magento/Shipping/Model/Rate/Result.php b/app/code/Magento/Shipping/Model/Rate/Result.php index 41647aa991cbb..4ffe64ce85e2f 100644 --- a/app/code/Magento/Shipping/Model/Rate/Result.php +++ b/app/code/Magento/Shipping/Model/Rate/Result.php @@ -5,6 +5,12 @@ */ namespace Magento\Shipping\Model\Rate; +/** + * Class Result + * Container for Rates + * + * @api + */ class Result { /** diff --git a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/magento-swagger.js b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/magento-swagger.js index c69ef848c37cc..085e313068fba 100644 --- a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/magento-swagger.js +++ b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/magento-swagger.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ $(function () { var url = $('#input_baseUrl').val(); diff --git a/app/code/Magento/Tax/Helper/Data.php b/app/code/Magento/Tax/Helper/Data.php index f21aa25362915..5c06831333745 100644 --- a/app/code/Magento/Tax/Helper/Data.php +++ b/app/code/Magento/Tax/Helper/Data.php @@ -24,6 +24,7 @@ * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @codingStandardsIgnoreFile + * @api */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/grand-total.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/grand-total.js index 160e59493bf47..713d81c708784 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/grand-total.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/grand-total.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Tax/js/view/checkout/summary/grand-total' ], function (Component) { diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js index 5baeabcf6e0e1..9f051ba23f68c 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Tax/js/view/checkout/summary/shipping', 'Magento_Checkout/js/model/quote' diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js index 455821e4f10d8..b0e9927c1d8b9 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Tax/js/view/checkout/summary/tax', 'Magento_Checkout/js/model/totals' diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js index 073ea86f1ac99..483ff84c7d31d 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'ko', 'uiComponent', diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/shipping_method/price.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/shipping_method/price.js index 153c5f33c70d8..cee1f7792b883 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/shipping_method/price.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/shipping_method/price.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'uiComponent', 'Magento_Checkout/js/model/quote', diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/grand-total.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/grand-total.js index 0ebb9f65fad4b..72f152915ce14 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/grand-total.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/grand-total.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Checkout/js/view/summary/abstract-total', 'Magento_Checkout/js/model/quote', diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/item/details/subtotal.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/item/details/subtotal.js index a9742e44c886e..9fb38263814dc 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/item/details/subtotal.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/item/details/subtotal.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Checkout/js/view/summary/item/details/subtotal' ], function (subtotal) { diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js index 9cfa6c7b82cdc..6b5104193c77d 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'jquery', 'Magento_Checkout/js/view/summary/shipping', diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/subtotal.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/subtotal.js index afa43f630022b..b74afa69d1b01 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/subtotal.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/subtotal.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Checkout/js/view/summary/abstract-total', 'Magento_Checkout/js/model/quote' diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/tax.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/tax.js index 8fb9677a280fe..c86c3b4d1ab06 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/tax.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/tax.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'ko', 'Magento_Checkout/js/view/summary/abstract-total', diff --git a/app/code/Magento/User/Helper/Data.php b/app/code/Magento/User/Helper/Data.php index cc552171b964e..c17e8b6d7beef 100644 --- a/app/code/Magento/User/Helper/Data.php +++ b/app/code/Magento/User/Helper/Data.php @@ -8,7 +8,7 @@ /** * User data helper * - * @author Magento Core Team + * @api */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/User/Model/ResourceModel/User.php b/app/code/Magento/User/Model/ResourceModel/User.php index 79aa8ef727c55..c5ace3f6941d1 100644 --- a/app/code/Magento/User/Model/ResourceModel/User.php +++ b/app/code/Magento/User/Model/ResourceModel/User.php @@ -13,7 +13,9 @@ /** * ACL user resource + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class User extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/User/Model/ResourceModel/User/Collection.php b/app/code/Magento/User/Model/ResourceModel/User/Collection.php index 8671c1d30461f..9444f6d7492a9 100644 --- a/app/code/Magento/User/Model/ResourceModel/User/Collection.php +++ b/app/code/Magento/User/Model/ResourceModel/User/Collection.php @@ -8,7 +8,7 @@ /** * Admin user collection * - * @author Magento Core Team + * @api */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php index f7b80cb641d06..560e097605a12 100644 --- a/app/code/Magento/User/Model/User.php +++ b/app/code/Magento/User/Model/User.php @@ -31,6 +31,7 @@ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @api */ class User extends AbstractModel implements StorageInterface, UserInterface { diff --git a/app/code/Magento/User/Model/UserValidationRules.php b/app/code/Magento/User/Model/UserValidationRules.php index 7dfd2a17d1ae8..bfd796065d37b 100644 --- a/app/code/Magento/User/Model/UserValidationRules.php +++ b/app/code/Magento/User/Model/UserValidationRules.php @@ -12,6 +12,8 @@ /** * Class for adding validation rules to an Admin user + * + * @api */ class UserValidationRules { diff --git a/app/code/Magento/User/view/adminhtml/web/js/roles-tree.js b/app/code/Magento/User/view/adminhtml/web/js/roles-tree.js index cc211d886402d..838d73bb9467f 100644 --- a/app/code/Magento/User/view/adminhtml/web/js/roles-tree.js +++ b/app/code/Magento/User/view/adminhtml/web/js/roles-tree.js @@ -3,6 +3,9 @@ * See COPYING.txt for license details. */ +/** + * @api + */ define([ 'jquery', 'jquery/ui', diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php index c480f86b758a0..78b3ad8b9c472 100644 --- a/app/code/Magento/Webapi/Controller/Rest.php +++ b/app/code/Magento/Webapi/Controller/Rest.php @@ -26,8 +26,6 @@ /** * Front controller for WebAPI REST area. * - * TODO: Consider warnings suppression removal - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) */ diff --git a/app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php b/app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php index 4b4f31e68ff0d..e566313af51ac 100644 --- a/app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php +++ b/app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php @@ -75,22 +75,13 @@ public function __construct( } /** - * Retrieve a list of services visible to current user. + * Retrieve a list of all services. * * @return string[] */ public function getListOfServices() { - $listOfAllowedServices = []; - foreach ($this->serviceMetadata->getServicesConfig() as $serviceName => $service) { - foreach ($service[ServiceMetadata::KEY_SERVICE_METHODS] as $method) { - if ($this->authorization->isAllowed($method[ServiceMetadata::KEY_ACL_RESOURCES])) { - $listOfAllowedServices[] = $serviceName; - break; - } - } - } - return $listOfAllowedServices; + return array_keys($this->serviceMetadata->getServicesConfig()); } /** diff --git a/app/code/Magento/Webapi/Model/Config.php b/app/code/Magento/Webapi/Model/Config.php index fb6648f50df8c..7e5e015ec07e4 100644 --- a/app/code/Magento/Webapi/Model/Config.php +++ b/app/code/Magento/Webapi/Model/Config.php @@ -12,9 +12,9 @@ use Magento\Framework\Serialize\SerializerInterface; /** - * Web API Config Model. + * This class gives access to consolidated web API configuration from /etc/webapi.xml files. * - * This is a parent class for storing information about service configuration. + * @api */ class Config { diff --git a/app/code/Magento/Webapi/Model/Plugin/Manager.php b/app/code/Magento/Webapi/Model/Plugin/Manager.php index 93608c6ec642e..91808f8c658d3 100644 --- a/app/code/Magento/Webapi/Model/Plugin/Manager.php +++ b/app/code/Magento/Webapi/Model/Plugin/Manager.php @@ -10,7 +10,7 @@ use Magento\Integration\Model\IntegrationConfig; /** - * Plugin for ConfigBasedIntegrationManager model to manage resource permissions of + * Plugin for @see \Magento\Integration\Model\ConfigBasedIntegrationManager model to manage resource permissions of * integration installed from config file */ class Manager diff --git a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php index 3b17ab43a32b4..ee7d65e484792 100644 --- a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php +++ b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php @@ -15,6 +15,7 @@ use Magento\Webapi\Model\Config\Converter; use Magento\Webapi\Model\Rest\Swagger; use Magento\Webapi\Model\Rest\SwaggerFactory; +use Magento\Webapi\Model\ServiceMetadata; /** * REST Swagger schema generator. @@ -897,4 +898,23 @@ private function generateMethodExceptionErrorResponses($exceptionClass, $respons return $responses; } + + /** + * Retrieve a list of services visible to current user. + * + * @return string[] + */ + public function getListOfServices() + { + $listOfAllowedServices = []; + foreach ($this->serviceMetadata->getServicesConfig() as $serviceName => $service) { + foreach ($service[ServiceMetadata::KEY_SERVICE_METHODS] as $method) { + if ($this->authorization->isAllowed($method[ServiceMetadata::KEY_ACL_RESOURCES])) { + $listOfAllowedServices[] = $serviceName; + break; + } + } + } + return $listOfAllowedServices; + } } diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index 67e1ffa6161ae..2e3ea36f8f4b3 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -12,8 +12,10 @@ /** * WEEE data helper + * * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class Data extends \Magento\Framework\App\Helper\AbstractHelper { diff --git a/app/code/Magento/Weee/Model/ResourceModel/Tax.php b/app/code/Magento/Weee/Model/ResourceModel/Tax.php index 53a53a5ede1eb..54052eae01a48 100644 --- a/app/code/Magento/Weee/Model/ResourceModel/Tax.php +++ b/app/code/Magento/Weee/Model/ResourceModel/Tax.php @@ -10,6 +10,8 @@ /** * Wee tax resource model + * + * @api */ class Tax extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { diff --git a/app/code/Magento/Weee/Model/Sales/Pdf/Weee.php b/app/code/Magento/Weee/Model/Sales/Pdf/Weee.php index 687fd6bc32946..fa71e81281763 100644 --- a/app/code/Magento/Weee/Model/Sales/Pdf/Weee.php +++ b/app/code/Magento/Weee/Model/Sales/Pdf/Weee.php @@ -5,6 +5,9 @@ */ namespace Magento\Weee\Model\Sales\Pdf; +/** + * Sales order total for PDF, taking into account WEEE tax + */ class Weee extends \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal { /** @@ -32,6 +35,7 @@ public function __construct( /** * Check if weee total amount should be included + * * array( * $index => array( * 'amount' => $amount, diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php index 3d69232b0c06e..6f970f683d926 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -13,6 +13,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class Tax extends \Magento\Framework\Model\AbstractModel { diff --git a/app/code/Magento/Weee/README.md b/app/code/Magento/Weee/README.md index 0218dcd85ed9c..61f9b8d6d8970 100644 --- a/app/code/Magento/Weee/README.md +++ b/app/code/Magento/Weee/README.md @@ -21,5 +21,6 @@ Magento installation with existing products with FPT: * Remove all FPT attributes from attribute sets * Delete all FPT attributes * Remove module directory from the code base -* New Magento installation: -* Can be removed without additional actions \ No newline at end of file + +New Magento installation: +* Can be removed without additional actions diff --git a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_excl_tax.js b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_excl_tax.js index 02ff7d0407b6f..4ab7b1b6acbf1 100644 --- a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_excl_tax.js +++ b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_excl_tax.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Weee/js/view/checkout/summary/item/price/weee' ], function (weee) { diff --git a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_incl_tax.js b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_incl_tax.js index e63e628d93b2c..718bb4a8ad8fa 100644 --- a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_incl_tax.js +++ b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/row_incl_tax.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Weee/js/view/checkout/summary/item/price/weee' ], function (weee) { diff --git a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/weee.js b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/weee.js index d5115791409d7..220e327b77ddc 100644 --- a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/weee.js +++ b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/item/price/weee.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Checkout/js/view/summary/abstract-total', 'Magento_Checkout/js/model/quote' diff --git a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/weee.js b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/weee.js index 70dc346506fc3..a5623c372c602 100644 --- a/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/weee.js +++ b/app/code/Magento/Weee/view/frontend/web/js/view/checkout/summary/weee.js @@ -3,6 +3,10 @@ * See COPYING.txt for license details. */ +/** + * @api + */ + define([ 'Magento_Checkout/js/view/summary/abstract-total', 'Magento_Checkout/js/model/quote', diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Controller/SoapTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Controller/SoapTest.php new file mode 100644 index 0000000000000..31c496ef27532 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Webapi/Controller/SoapTest.php @@ -0,0 +1,39 @@ +objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->soapController = $this->objectManager->get(\Magento\Webapi\Controller\Soap::class); + } + + /* + * Get the public wsdl with anonymous credentials + */ + public function testDispatchWsdlRequest() + { + $request = $this->objectManager->get(\Magento\Framework\Webapi\Request::class); + $request->setParam(\Magento\Webapi\Model\Soap\Server::REQUEST_PARAM_LIST_WSDL, true); + $response = $this->soapController->dispatch($request); + $decoded_wsdl = json_decode($response->getContent(), true); + $this->assertArrayHasKey("customerAccountManagementV1", $decoded_wsdl); + $this->assertArrayHasKey("integrationAdminTokenServiceV1", $decoded_wsdl); + } +} diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 6e2cdf1ab5309..a5f52b02d1439 100755 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -37,7 +37,11 @@ ['Mage_Admin_Model_Resource_Rules_Collection', 'Magento\Authorization\Model\ResourceModel\Rules\Collection'], [ 'Mage_Admin_Model_Resource_Permissions_Collection', + 'Magento\Authorization\Model\ResourceModel\Rules\Collection' + ], + [ 'Magento\Authorization\Model\ResourceModel\Permissions\Collection', + 'Magento\Authorization\Model\ResourceModel\Rules\Collection' ], ['Mage_Adminhtml_Block_Abstract', 'Magento\Backend\Block\AbstractBlock'], ['Mage_Adminhtml_Block_Backup_Grid'], diff --git a/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php b/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php index 34f46d88166ee..1ef0129515c86 100644 --- a/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php +++ b/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php @@ -6,6 +6,9 @@ namespace Magento\Framework\Acl\Data; +/** + * Interface for caching ACL data + */ interface CacheInterface extends \Magento\Framework\Cache\FrontendInterface { } diff --git a/lib/internal/Magento/Framework/Backup/BackupException.php b/lib/internal/Magento/Framework/Backup/BackupException.php index d356811995eb3..7694c084c10a7 100644 --- a/lib/internal/Magento/Framework/Backup/BackupException.php +++ b/lib/internal/Magento/Framework/Backup/BackupException.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * \Exception - * - * @author Magento Core Team - */ namespace Magento\Framework\Backup; +/** + * @api + */ class BackupException extends \Magento\Framework\Exception\LocalizedException { } diff --git a/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php b/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php index 6c2cf12f582ad..45d1cc21b06da 100644 --- a/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php +++ b/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * \Exception - * - * @author Magento Core Team - */ namespace Magento\Framework\Backup\Exception; +/** + * @api + */ class CantLoadSnapshot extends \Magento\Framework\Backup\BackupException { } diff --git a/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php b/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php index 1b7c6859738f8..9b722da10a1bd 100644 --- a/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php +++ b/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * \Exception - * - * @author Magento Core Team - */ namespace Magento\Framework\Backup\Exception; +/** + * @api + */ class FtpConnectionFailed extends \Magento\Framework\Backup\BackupException { } diff --git a/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php b/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php index 18ef6fba7dab5..53af4bfd3061b 100644 --- a/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php +++ b/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * \Exception - * - * @author Magento Core Team - */ namespace Magento\Framework\Backup\Exception; +/** + * @api + */ class FtpValidationFailed extends \Magento\Framework\Backup\BackupException { } diff --git a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php index 42e008a9da52b..b373134d2e9a6 100644 --- a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php +++ b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * \Exception - * - * @author Magento Core Team - */ namespace Magento\Framework\Backup\Exception; +/** + * @api + */ class NotEnoughFreeSpace extends \Magento\Framework\Backup\BackupException { } diff --git a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php index 761f2783932eb..ba7e80a503f4f 100644 --- a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php +++ b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -/** - * \Exception - * - * @author Magento Core Team - */ namespace Magento\Framework\Backup\Exception; +/** + * @api + */ class NotEnoughPermissions extends \Magento\Framework\Backup\BackupException { } diff --git a/lib/internal/Magento/Framework/Communication/ConfigInterface.php b/lib/internal/Magento/Framework/Communication/ConfigInterface.php index bd3e073068226..0c6a90f5c0b17 100644 --- a/lib/internal/Magento/Framework/Communication/ConfigInterface.php +++ b/lib/internal/Magento/Framework/Communication/ConfigInterface.php @@ -9,6 +9,8 @@ /** * Class for accessing to communication configuration. + * + * @api */ interface ConfigInterface { diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php index 9c4dde0710c02..6e611e722e41b 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * Magento configuration XML DOM utility */ @@ -120,7 +118,7 @@ public function __construct( /** * Retrieve array of xml errors * - * @param $errorFormat + * @param string $errorFormat * @return string[] */ private static function getXmlErrors($errorFormat) @@ -171,15 +169,10 @@ protected function _mergeNode(\DOMElement $node, $parentPath) /* Update matched node attributes and value */ if ($matchedNode) { //different node type - if ($this->typeAttributeName && $node->hasAttribute( - $this->typeAttributeName - ) && $matchedNode->hasAttribute( - $this->typeAttributeName - ) && $node->getAttribute( - $this->typeAttributeName - ) !== $matchedNode->getAttribute( - $this->typeAttributeName - ) + if ($this->typeAttributeName && + $node->hasAttribute($this->typeAttributeName) && + $matchedNode->hasAttribute($this->typeAttributeName) && + $node->getAttribute($this->typeAttributeName) !== $matchedNode->getAttribute($this->typeAttributeName) ) { $parentMatchedNode = $this->_getMatchedNode($parentPath); $newNode = $this->dom->importNode($node, true); @@ -247,7 +240,7 @@ protected function _mergeAttributes($baseNode, $mergeNode) */ protected function _getNodePathByParent(\DOMElement $node, $parentPath) { - $prefix = is_null($this->rootNamespace) ? '' : self::ROOT_NAMESPACE_PREFIX . ':'; + $prefix = $this->rootNamespace === null ? '' : self::ROOT_NAMESPACE_PREFIX . ':'; $path = $parentPath . '/' . $prefix . $node->tagName; $idAttribute = $this->nodeMergingConfig->getIdAttribute($path); if (is_array($idAttribute)) { @@ -441,7 +434,7 @@ public function setSchemaFile($schemaFile) */ private function _getAttributeName($attribute) { - if (!is_null($attribute->prefix) && !empty($attribute->prefix)) { + if ($attribute->prefix !== null && !empty($attribute->prefix)) { $attributeName = $attribute->prefix . ':' . $attribute->name; } else { $attributeName = $attribute->name; diff --git a/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php b/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php index c70ae47cf4dcc..b4e558c0298b1 100644 --- a/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php +++ b/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php @@ -11,6 +11,9 @@ use Magento\Framework\Exception\LocalizedException; +/** + * @api + */ class ValidationSchemaException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php index 7a2e44462c590..7dccef0cc2aa3 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Composer/PackageTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Config\Test\Unit\Composer; use \Magento\Framework\Config\Composer\Package; diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php index 648dd723d8a9f..1d7e685ac771a 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/DataTest.php @@ -4,13 +4,11 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Config\Test\Unit; class DataTest extends \PHPUnit_Framework_TestCase { - /** + /** * @var \Magento\Framework\Config\ReaderInterface|\PHPUnit_Framework_MockObject_MockObject */ private $readerMock; diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectFactoryTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectFactoryTest.php index 761101eb5ed25..1ff54ee383f8f 100644 --- a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectFactoryTest.php +++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectFactoryTest.php @@ -6,8 +6,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Controller\Test\Unit\Result; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; diff --git a/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/ImportTest.php b/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/ImportTest.php index 4c662e2b0e6c0..e274a3221e179 100644 --- a/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/ImportTest.php +++ b/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/ImportTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Css\Test\Unit\PreProcessor\Instruction; use Magento\Framework\Css\PreProcessor\FileGenerator\RelatedGenerator; @@ -40,13 +38,26 @@ protected function setUp() { $this->notationResolver = $this->getMock( - \Magento\Framework\View\Asset\NotationResolver\Module::class, [], [], '', false + \Magento\Framework\View\Asset\NotationResolver\Module::class, + [], + [], + '', + false ); $contextMock = $this->getMockForAbstractClass( - \Magento\Framework\View\Asset\ContextInterface::class, [], '', false + \Magento\Framework\View\Asset\ContextInterface::class, + [], + '', + false ); $contextMock->expects($this->any())->method('getPath')->willReturn(''); - $this->asset = $this->getMock(\Magento\Framework\View\Asset\File::class, [], [], '', false); + $this->asset = $this->getMock( + \Magento\Framework\View\Asset\File::class, + [], + [], + '', + false + ); $this->asset->expects($this->any())->method('getContentType')->will($this->returnValue('css')); $this->asset->expects($this->any())->method('getContext')->willReturn($contextMock); @@ -67,7 +78,12 @@ protected function setUp() */ public function testProcess($originalContent, $foundPath, $resolvedPath, $expectedContent) { - $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, $originalContent, 'less', 'path'); + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( + $this->asset, + $originalContent, + 'less', + 'path' + ); $invoke = $this->once(); if (preg_match('/^(http:|https:|\/+)/', $foundPath)) { $invoke = $this->never(); @@ -160,7 +176,12 @@ public function testProcessNoImport() $originalContent = 'color: #000000;'; $expectedContent = 'color: #000000;'; - $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, $originalContent, 'css', 'path'); + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( + $this->asset, + $originalContent, + 'css', + 'path' + ); $this->notationResolver->expects($this->never()) ->method('convertModuleNotationToPath'); $this->object->process($chain); @@ -186,7 +207,12 @@ public function testGetRelatedFiles() 'path' ); $this->object->process($chain); - $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, 'color: #000000;', 'css', 'path'); + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( + $this->asset, + 'color: #000000;', + 'css', + 'path' + ); $this->object->process($chain); $expected = [['Magento_Module::something.css', $this->asset]]; diff --git a/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/MagentoImportTest.php b/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/MagentoImportTest.php index 1851dc74eb927..8495baa3f1005 100644 --- a/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/MagentoImportTest.php +++ b/lib/internal/Magento/Framework/Css/Test/Unit/PreProcessor/Instruction/MagentoImportTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Css\Test\Unit\PreProcessor\Instruction; use Magento\Framework\Css\PreProcessor\Instruction\MagentoImport; @@ -181,7 +179,10 @@ public function testProcessNoImport() public function testProcessException() { $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( - $this->asset, '//@magento_import "some/file.css";', 'css', 'path' + $this->asset, + '//@magento_import "some/file.css";', + 'css', + 'path' ); $exception = new \LogicException('Error happened'); $this->assetRepo->expects($this->once()) diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php index 594c97b910e1b..50d553f5e06ab 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Data\Form\Element; use Magento\Framework\Escaper; @@ -123,7 +121,15 @@ public function getElementHtml() ' '; + $html .= ''; } $html .= ''; diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Time.php b/lib/internal/Magento/Framework/Data/Form/Element/Time.php index c813200030267..68f32823d7a23 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Time.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Time.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * Form time element * @@ -54,52 +52,46 @@ public function getElementHtml() { $this->addClass('select admin__control-select'); - $value_hrs = 0; - $value_min = 0; - $value_sec = 0; + $valueHrs = 0; + $valueMin = 0; + $valueSec = 0; if ($value = $this->getValue()) { $values = explode(',', $value); if (is_array($values) && count($values) == 3) { - $value_hrs = $values[0]; - $value_min = $values[1]; - $value_sec = $values[2]; + $valueHrs = $values[0]; + $valueMin = $values[1]; + $valueSec = $values[2]; } } $html = '_getUiId() . '/>'; - $html .= 'serialize($this->getHtmlAttributes()) + . $this->_getUiId('hour') . '>' . "\n"; for ($i = 0; $i < 24; $i++) { $hour = str_pad($i, 2, '0', STR_PAD_LEFT); - $html .= ''; } $html .= '' . "\n"; - $html .= ': serialize($this->getHtmlAttributes()) + . $this->_getUiId('minute') . '>' . "\n"; for ($i = 0; $i < 60; $i++) { $hour = str_pad($i, 2, '0', STR_PAD_LEFT); - $html .= ''; } $html .= '' . "\n"; - $html .= ': serialize($this->getHtmlAttributes()) + . $this->_getUiId('second') . '>' . "\n"; for ($i = 0; $i < 60; $i++) { $hour = str_pad($i, 2, '0', STR_PAD_LEFT); - $html .= ''; } $html .= '' . "\n"; diff --git a/lib/internal/Magento/Framework/Data/FormFactory.php b/lib/internal/Magento/Framework/Data/FormFactory.php index 6707340f0c936..ce8d39aa1f23a 100644 --- a/lib/internal/Magento/Framework/Data/FormFactory.php +++ b/lib/internal/Magento/Framework/Data/FormFactory.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Data; /** @@ -54,7 +52,10 @@ public function create(array $data = []) $form = $this->_objectManager->create($this->_instanceName, $data); if (!$form instanceof \Magento\Framework\Data\Form) { throw new \Magento\Framework\Exception\LocalizedException( - new \Magento\Framework\Phrase('%1 doesn\'t extend \Magento\Framework\Data\Form', [$this->_instanceName]) + new \Magento\Framework\Phrase( + '%1 doesn\'t extend \Magento\Framework\Data\Form', + [$this->_instanceName] + ) ); } return $form; diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php index f3c9cd6795a11..af7745e40ff82 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Data\Test\Unit\Collection; /** @@ -44,10 +42,18 @@ protected function setUp() { $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); $this->fetchStrategyMock = $this->getMock( - \Magento\Framework\Data\Collection\Db\FetchStrategy\Query::class, ['fetchAll'], [], '', false + \Magento\Framework\Data\Collection\Db\FetchStrategy\Query::class, + ['fetchAll'], + [], + '', + false ); $this->entityFactoryMock = $this->getMock( - \Magento\Framework\Data\Collection\EntityFactory::class, ['create'], [], '', false + \Magento\Framework\Data\Collection\EntityFactory::class, + ['create'], + [], + '', + false ); $this->loggerMock = $this->getMock(\Psr\Log\LoggerInterface::class); $this->collection = new \Magento\Framework\Data\Test\Unit\Collection\DbCollection( @@ -375,7 +381,11 @@ public function testFetchItem() $adapterMock = $this->getMock( \Magento\Framework\DB\Adapter\Pdo\Mysql::class, - ['select', 'query'], [], '', false); + ['select', 'query'], + [], + '', + false + ); $selectMock = $this->getMock( \Magento\Framework\DB\Select::class, [], @@ -430,9 +440,9 @@ public function testGetSize() $adapterMock->expects($this->exactly(2)) ->method('quoteInto') ->will($this->returnValueMap([ - ['testField1=?', 'testValue1', null, null, 'testField1=testValue1'], - ['testField4=?', 'testValue4', null, null, 'testField4=testValue4'], - ])); + ['testField1=?', 'testValue1', null, null, 'testField1=testValue1'], + ['testField4=?', 'testValue4', null, null, 'testField4=testValue4'], + ])); $selectMock->expects($this->once()) ->method('orWhere') ->with('testField1=testValue1'); @@ -558,7 +568,11 @@ public function testToOptionHash() $data = [10 => 'test']; $adapterMock = $this->getMock( \Magento\Framework\DB\Adapter\Pdo\Mysql::class, - ['select', 'query'], [], '', false); + ['select', 'query'], + [], + '', + false + ); $selectMock = $this->getMock( \Magento\Framework\DB\Select::class, [], diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php index c4621953b78a4..51847b967e797 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * Tests for \Magento\Framework\Data\Form\Element\AbstractElement */ @@ -36,19 +34,29 @@ class AbstractElementTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_factoryMock = $this->getMock( - \Magento\Framework\Data\Form\Element\Factory::class, [], [], '', false + \Magento\Framework\Data\Form\Element\Factory::class, + [], + [], + '', + false ); $this->_collectionFactoryMock = $this->getMock( - \Magento\Framework\Data\Form\Element\CollectionFactory::class, [], [], '', false + \Magento\Framework\Data\Form\Element\CollectionFactory::class, + [], + [], + '', + false ); $this->_escaperMock = $this->getMock(\Magento\Framework\Escaper::class, [], [], '', false); $this->_model = $this->getMockForAbstractClass( - \Magento\Framework\Data\Form\Element\AbstractElement::class, [ - $this->_factoryMock, - $this->_collectionFactoryMock, - $this->_escaperMock - ]); + \Magento\Framework\Data\Form\Element\AbstractElement::class, + [ + $this->_factoryMock, + $this->_collectionFactoryMock, + $this->_escaperMock + ] + ); } /** @@ -58,7 +66,13 @@ public function testAddElement() { $elementId = 11; $elementMock = $this->getMockForAbstractClass( - \Magento\Framework\Data\Form\Element\AbstractElement::class, [], '', false, true, true, ['getId'] + \Magento\Framework\Data\Form\Element\AbstractElement::class, + [], + '', + false, + true, + true, + ['getId'] ); $elementMock->expects($this->once()) ->method('getId') @@ -98,7 +112,11 @@ public function testGetHtmlId() $htmlId = 'some_id'; $formMock = $this->getMock( - \Magento\Framework\Data\Form\AbstractForm::class, ['getHtmlIdPrefix', 'getHtmlIdSuffix'], [], '', false + \Magento\Framework\Data\Form\AbstractForm::class, + ['getHtmlIdPrefix', 'getHtmlIdSuffix'], + [], + '', + false ); $formMock->expects($this->any()) ->method('getHtmlIdPrefix') @@ -168,14 +186,22 @@ public function testRemoveField() $elementId = 'element_id'; $formMock = $this->getMock( - \Magento\Framework\Data\Form\AbstractForm::class, ['removeField'], [], '', false + \Magento\Framework\Data\Form\AbstractForm::class, + ['removeField'], + [], + '', + false ); $formMock->expects($this->once()) ->method('removeField') ->with($elementId); $collectionMock = $this->getMock( - \Magento\Framework\Data\Form\Element\Collection::class, ['remove'], [], '', false + \Magento\Framework\Data\Form\Element\Collection::class, + ['remove'], + [], + '', + false ); $collectionMock->expects($this->once()) ->method('remove') @@ -250,7 +276,8 @@ public function testGetEscapedValueWithoutFilter() { $this->_model->setValue('my \'quoted\' string'); $this->assertEquals( - '<a href="#hash_tag">my \'quoted\' string</a>', $this->_model->getEscapedValue() + '<a href="#hash_tag">my \'quoted\' string</a>', + $this->_model->getEscapedValue() ); } @@ -329,8 +356,10 @@ public function testGetHtmlWithoutRenderer() $this->_model->setForm( $this->getMock(\Magento\Framework\Data\Form\AbstractForm::class, [], [], '', false) ); - $expectedHtml = '
' . "\n" - . '
' . "\n"; + $expectedHtml = '
' + . "\n" + . '
' + . "\n"; $this->assertEquals($expectedHtml, $this->_model->getHtml()); $this->assertEquals(' required-entry _required', $this->_model->getClass()); @@ -407,7 +436,11 @@ public function testGetHtmlContainerIdWithFieldContainerIdPrefix() $id = 'id'; $prefix = 'prefix_'; $formMock = $this->getMock( - \Magento\Framework\Data\Form\AbstractForm::class, ['getFieldContainerIdPrefix'], [], '', false + \Magento\Framework\Data\Form\AbstractForm::class, + ['getFieldContainerIdPrefix'], + [], + '', + false ); $formMock->expects($this->once()) ->method('getFieldContainerIdPrefix') @@ -531,7 +564,7 @@ public function testGetDefaultHtmlDataProvider() [ [], '
' . "\n" - . '
' . "\n", + . '' . "\n", ], [ ['default_html' => 'some default html'], @@ -545,10 +578,10 @@ public function testGetDefaultHtmlDataProvider() 'value' => 'some-value', ], '
' . "\n" - . '' . "\n" - . '' - . '
' . "\n" + . '' . "\n" + . '' + . '' . "\n" ], [ [ @@ -559,8 +592,8 @@ public function testGetDefaultHtmlDataProvider() 'no_span' => true, ], '' . "\n" - . '' + . 'some label' . "\n" + . '' ], ]; } @@ -587,7 +620,7 @@ public function getLabelHtmlDataProvider() 'html_id' => 'some-html-id', ], '' . "\n" + . 'some-label' . "\n" ], [ [ @@ -596,7 +629,7 @@ public function getLabelHtmlDataProvider() 'html_id' => 'some-html-id', ], '' . "\n" + . 'some-label' . "\n" ], ]; } @@ -627,7 +660,7 @@ public function getElementHtmlDataProvider() 'before_element_html' => 'some-html', ], '' - . '' + . '' ], [ [ @@ -646,7 +679,7 @@ public function getElementHtmlDataProvider() 'after_element_html' => 'some-html', ], '' - . '' + . '' ] ]; } diff --git a/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php b/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php index 4d1b2fd0e339a..14e711429827c 100644 --- a/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php +++ b/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php @@ -8,6 +8,9 @@ use Magento\Framework\Phrase; +/** + * @api + */ abstract class AbstractAggregateException extends LocalizedException { /** diff --git a/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php b/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php index 0511be22ce43b..1917385148031 100644 --- a/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php +++ b/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php @@ -8,7 +8,7 @@ use Magento\Framework\Phrase; /** - * Class AlreadyExistsException + * @api */ class AlreadyExistsException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/AuthenticationException.php b/lib/internal/Magento/Framework/Exception/AuthenticationException.php index 089d3cc5c9db5..fc097dc5562bd 100644 --- a/lib/internal/Magento/Framework/Exception/AuthenticationException.php +++ b/lib/internal/Magento/Framework/Exception/AuthenticationException.php @@ -7,6 +7,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class AuthenticationException extends LocalizedException { /** diff --git a/lib/internal/Magento/Framework/Exception/AuthorizationException.php b/lib/internal/Magento/Framework/Exception/AuthorizationException.php index 9c3a7b6f7f3cd..79bf95b22bccf 100644 --- a/lib/internal/Magento/Framework/Exception/AuthorizationException.php +++ b/lib/internal/Magento/Framework/Exception/AuthorizationException.php @@ -7,6 +7,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class AuthorizationException extends LocalizedException { /** diff --git a/lib/internal/Magento/Framework/Exception/ConfigurationMismatchException.php b/lib/internal/Magento/Framework/Exception/ConfigurationMismatchException.php index dd5e2e4475c3f..0c31c0b420f61 100644 --- a/lib/internal/Magento/Framework/Exception/ConfigurationMismatchException.php +++ b/lib/internal/Magento/Framework/Exception/ConfigurationMismatchException.php @@ -7,7 +7,7 @@ namespace Magento\Framework\Exception; /** - * Class ConfigurationException + * @api */ class ConfigurationMismatchException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php b/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php index cc334f391c6c4..af8e4c3c0ec57 100644 --- a/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php +++ b/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class CouldNotDeleteException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php b/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php index 155e2afccfd78..ea265864afd24 100644 --- a/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php +++ b/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php @@ -6,6 +6,9 @@ namespace Magento\Framework\Exception; +/** + * @api + */ class CouldNotSaveException extends AbstractAggregateException { } diff --git a/lib/internal/Magento/Framework/Exception/CronException.php b/lib/internal/Magento/Framework/Exception/CronException.php index d34c864731ad9..22d23526a6558 100644 --- a/lib/internal/Magento/Framework/Exception/CronException.php +++ b/lib/internal/Magento/Framework/Exception/CronException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class CronException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php b/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php index d75932699c044..330f34fb565ce 100644 --- a/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php +++ b/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php @@ -6,7 +6,7 @@ namespace Magento\Framework\Exception; /** - * Class EmailNotConfirmedException + * @api */ class EmailNotConfirmedException extends AuthenticationException { diff --git a/lib/internal/Magento/Framework/Exception/FileSystemException.php b/lib/internal/Magento/Framework/Exception/FileSystemException.php index eeae5728e5465..6c85314b6f2a6 100644 --- a/lib/internal/Magento/Framework/Exception/FileSystemException.php +++ b/lib/internal/Magento/Framework/Exception/FileSystemException.php @@ -7,6 +7,8 @@ /** * Magento filesystem exception + * + * @api */ class FileSystemException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/InputException.php b/lib/internal/Magento/Framework/Exception/InputException.php index bb62ea80d0149..2dc3033be1da5 100644 --- a/lib/internal/Magento/Framework/Exception/InputException.php +++ b/lib/internal/Magento/Framework/Exception/InputException.php @@ -9,6 +9,8 @@ /** * Exception to be thrown when there is an issue with the Input to a function call. + * + * @api */ class InputException extends AbstractAggregateException { diff --git a/lib/internal/Magento/Framework/Exception/IntegrationException.php b/lib/internal/Magento/Framework/Exception/IntegrationException.php index b44349f2df51e..9adf9c740f0e2 100644 --- a/lib/internal/Magento/Framework/Exception/IntegrationException.php +++ b/lib/internal/Magento/Framework/Exception/IntegrationException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class IntegrationException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php b/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php index bb246972ab73b..ba5b7d94f5328 100644 --- a/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php +++ b/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php @@ -6,7 +6,7 @@ namespace Magento\Framework\Exception; /** - * Class InvalidEmailOrPasswordException + * @api */ class InvalidEmailOrPasswordException extends AuthenticationException { diff --git a/lib/internal/Magento/Framework/Exception/MailException.php b/lib/internal/Magento/Framework/Exception/MailException.php index 50197482992d8..1475ba04257c9 100644 --- a/lib/internal/Magento/Framework/Exception/MailException.php +++ b/lib/internal/Magento/Framework/Exception/MailException.php @@ -7,6 +7,8 @@ /** * Magento mail exception + * + * @api */ class MailException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php b/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php index 6fd875537c7ff..6e160c6ec6da2 100644 --- a/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php +++ b/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php @@ -9,6 +9,9 @@ use Magento\Framework\Phrase; +/** + * @api + */ class NoSuchEntityException extends LocalizedException { /** diff --git a/lib/internal/Magento/Framework/Exception/NotFoundException.php b/lib/internal/Magento/Framework/Exception/NotFoundException.php index 82dc660916349..40e02e70fa37c 100644 --- a/lib/internal/Magento/Framework/Exception/NotFoundException.php +++ b/lib/internal/Magento/Framework/Exception/NotFoundException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class NotFoundException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/Exception/PaymentException.php b/lib/internal/Magento/Framework/Exception/PaymentException.php index b0be0cb08b043..83b189d020ee3 100644 --- a/lib/internal/Magento/Framework/Exception/PaymentException.php +++ b/lib/internal/Magento/Framework/Exception/PaymentException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class PaymentException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php b/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php index 96910124c1301..2a5564181d43f 100644 --- a/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php +++ b/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception\Plugin; +/** + * @api + */ class AuthenticationException extends \Magento\Framework\Exception\AuthenticationException { } diff --git a/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php b/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php index 4846a1a3d5442..a9af31b003333 100644 --- a/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php +++ b/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class RemoteServiceUnavailableException extends AuthenticationException { } diff --git a/lib/internal/Magento/Framework/Exception/SecurityViolationException.php b/lib/internal/Magento/Framework/Exception/SecurityViolationException.php index 8a7b73093a560..246548149c749 100644 --- a/lib/internal/Magento/Framework/Exception/SecurityViolationException.php +++ b/lib/internal/Magento/Framework/Exception/SecurityViolationException.php @@ -7,6 +7,8 @@ /** * Exception for Security violation cases + * + * @api */ class SecurityViolationException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/SerializationException.php b/lib/internal/Magento/Framework/Exception/SerializationException.php index ed1e00d9095a4..5346425a9b545 100644 --- a/lib/internal/Magento/Framework/Exception/SerializationException.php +++ b/lib/internal/Magento/Framework/Exception/SerializationException.php @@ -9,6 +9,8 @@ /** * Serialization Exception + * + * @api */ class SerializationException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/SessionException.php b/lib/internal/Magento/Framework/Exception/SessionException.php index 4f4fd19b7d5d7..b3af3ea5b5bb0 100644 --- a/lib/internal/Magento/Framework/Exception/SessionException.php +++ b/lib/internal/Magento/Framework/Exception/SessionException.php @@ -7,6 +7,8 @@ /** * Session exception + * + * @api */ class SessionException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/State/ExpiredException.php b/lib/internal/Magento/Framework/Exception/State/ExpiredException.php index fc4d82ace23b8..29748b52c8351 100644 --- a/lib/internal/Magento/Framework/Exception/State/ExpiredException.php +++ b/lib/internal/Magento/Framework/Exception/State/ExpiredException.php @@ -9,6 +9,9 @@ use Magento\Framework\Exception\StateException; +/** + * @api + */ class ExpiredException extends StateException { } diff --git a/lib/internal/Magento/Framework/Exception/State/InitException.php b/lib/internal/Magento/Framework/Exception/State/InitException.php index 05c0ac2d4e091..8a2ec8b742979 100644 --- a/lib/internal/Magento/Framework/Exception/State/InitException.php +++ b/lib/internal/Magento/Framework/Exception/State/InitException.php @@ -9,6 +9,8 @@ /** * An exception that indicates application initialization error + * + * @api */ class InitException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php b/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php index 07a2230ccad55..752ebcf4804b1 100644 --- a/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php +++ b/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php @@ -9,6 +9,9 @@ use Magento\Framework\Exception\StateException; +/** + * @api + */ class InputMismatchException extends StateException { } diff --git a/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php b/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php index 1ae498748cde3..2667d1745767e 100644 --- a/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php +++ b/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php @@ -9,6 +9,9 @@ use Magento\Framework\Exception\StateException; +/** + * @api + */ class InvalidTransitionException extends StateException { } diff --git a/lib/internal/Magento/Framework/Exception/State/UserLockedException.php b/lib/internal/Magento/Framework/Exception/State/UserLockedException.php index ef1987aa38ebd..fa39556f6eecc 100644 --- a/lib/internal/Magento/Framework/Exception/State/UserLockedException.php +++ b/lib/internal/Magento/Framework/Exception/State/UserLockedException.php @@ -7,6 +7,9 @@ use Magento\Framework\Exception\AuthenticationException; +/** + * @api + */ class UserLockedException extends AuthenticationException { } diff --git a/lib/internal/Magento/Framework/Exception/StateException.php b/lib/internal/Magento/Framework/Exception/StateException.php index 3d797e7a1d0e6..580ef6fabe2fa 100644 --- a/lib/internal/Magento/Framework/Exception/StateException.php +++ b/lib/internal/Magento/Framework/Exception/StateException.php @@ -7,6 +7,8 @@ /** * State Exception + * + * @api */ class StateException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php b/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php index 0ac6a350af6a7..d8ce8dee035db 100644 --- a/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php +++ b/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php @@ -11,6 +11,8 @@ /** * CouldNotSaveException caused by recoverable error + * + * @api */ class CouldNotSaveException extends LocalizedCouldNotSaveException implements TemporaryStateExceptionInterface { diff --git a/lib/internal/Magento/Framework/Exception/ValidatorException.php b/lib/internal/Magento/Framework/Exception/ValidatorException.php index 8575271ea6134..1066fe268df44 100644 --- a/lib/internal/Magento/Framework/Exception/ValidatorException.php +++ b/lib/internal/Magento/Framework/Exception/ValidatorException.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\Exception; +/** + * @api + */ class ValidatorException extends LocalizedException { } diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php index f4b7f1fa50109..f95ad96cec822 100644 --- a/lib/internal/Magento/Framework/File/Uploader.php +++ b/lib/internal/Magento/Framework/File/Uploader.php @@ -13,7 +13,7 @@ * ATTENTION! This class must be used like abstract class and must added * validation by protected file extension list to extended class * - * @author Magento Core Team + * @api */ class Uploader { diff --git a/lib/internal/Magento/Framework/Mview/View/ChangelogTableNotExistsException.php b/lib/internal/Magento/Framework/Mview/View/ChangelogTableNotExistsException.php index 8b5dc94c16d57..96e4d6efd52b9 100644 --- a/lib/internal/Magento/Framework/Mview/View/ChangelogTableNotExistsException.php +++ b/lib/internal/Magento/Framework/Mview/View/ChangelogTableNotExistsException.php @@ -9,8 +9,7 @@ use Magento\Framework\Exception\LocalizedException; /** - * Class ChangelogTableNotExistsException - * @package Magento\Framework\Mview\View + * @api */ class ChangelogTableNotExistsException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Oauth/Exception.php b/lib/internal/Magento/Framework/Oauth/Exception.php index 729582894e7ef..6e6753654fdd2 100644 --- a/lib/internal/Magento/Framework/Oauth/Exception.php +++ b/lib/internal/Magento/Framework/Oauth/Exception.php @@ -8,7 +8,9 @@ use Magento\Framework\Exception\AuthenticationException; /** - * OAuth \Exception + * OAuth Exception + * + * @api */ class Exception extends AuthenticationException { diff --git a/lib/internal/Magento/Framework/Oauth/OauthInputException.php b/lib/internal/Magento/Framework/Oauth/OauthInputException.php index 301154dcb986f..1c526dd220f25 100644 --- a/lib/internal/Magento/Framework/Oauth/OauthInputException.php +++ b/lib/internal/Magento/Framework/Oauth/OauthInputException.php @@ -9,7 +9,7 @@ use Magento\Framework\Exception\InputException; /** - * OAuth \OAuthInputException + * @api */ class OauthInputException extends InputException { diff --git a/lib/internal/Magento/Framework/Phrase/Test/Unit/Renderer/CompositeTest.php b/lib/internal/Magento/Framework/Phrase/Test/Unit/Renderer/CompositeTest.php index 06d11e0023d6b..d23c1170c7c8f 100644 --- a/lib/internal/Magento/Framework/Phrase/Test/Unit/Renderer/CompositeTest.php +++ b/lib/internal/Magento/Framework/Phrase/Test/Unit/Renderer/CompositeTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Phrase\Test\Unit\Renderer; use \Magento\Framework\Phrase\Renderer\Composite; @@ -53,27 +51,27 @@ public function testRender() $this->rendererOne->expects( $this->once() )->method( - 'render' - )->with( - [$text], - $arguments - )->will( - $this->returnValue($resultAfterFirst) - ); + 'render' + )->with( + [$text], + $arguments + )->will( + $this->returnValue($resultAfterFirst) + ); $this->rendererTwo->expects( $this->once() )->method( - 'render' - )->with( - [ - $text, - $resultAfterFirst, - ], - $arguments - )->will( - $this->returnValue($resultAfterSecond) - ); + 'render' + )->with( + [ + $text, + $resultAfterFirst, + ], + $arguments + )->will( + $this->returnValue($resultAfterSecond) + ); $this->assertEquals($resultAfterSecond, $this->object->render([$text], $arguments)); } diff --git a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php index b6dbb191771e2..b193f72897e34 100644 --- a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php +++ b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Pricing\Render; use Magento\Framework\Pricing\Amount\AmountInterface; @@ -79,7 +77,9 @@ public function createPriceRender( $renderBlock = $this->getLayout()->createBlock($renderClassName, '', $arguments); if (!$renderBlock instanceof PriceBoxRenderInterface) { throw new \InvalidArgumentException( - 'Block "' . $renderClassName . '" must implement \Magento\Framework\Pricing\Render\PriceBoxRenderInterface' + 'Block "' . + $renderClassName . + '" must implement \Magento\Framework\Pricing\Render\PriceBoxRenderInterface' ); } $renderBlock->setTemplate($this->getRenderBlockTemplate($type, $priceCode)); @@ -142,7 +142,9 @@ public function createAmountRender( $amountBlock = $this->getLayout()->createBlock($renderClassName, '', $arguments); if (!$amountBlock instanceof AmountRenderInterface) { throw new \InvalidArgumentException( - 'Block "' . $renderClassName . '" must implement \Magento\Framework\Pricing\Render\AmountRenderInterface' + 'Block "' . + $renderClassName . + '" must implement \Magento\Framework\Pricing\Render\AmountRenderInterface' ); } $amountBlock->setTemplate($this->getAmountRenderBlockTemplate($type, $priceCode)); @@ -156,15 +158,15 @@ public function createAmountRender( */ public function getAdjustmentRenders(SaleableInterface $saleableItem = null, PriceInterface $price = null) { - $itemType = is_null($saleableItem) ? 'default' : $saleableItem->getTypeId(); - $priceType = is_null($price) ? 'default' : $price->getPriceCode(); + $itemType = $saleableItem === null ? 'default' : $saleableItem->getTypeId(); + $priceType = $price === null ? 'default' : $price->getPriceCode(); $fallbackPattern = [ "{$itemType}/adjustments/{$priceType}", "{$itemType}/adjustments/default", "default/adjustments/{$priceType}", "default/adjustments/default", - ]; + ]; $renders = $this->findDataByPattern($fallbackPattern); if ($renders) { foreach ($renders as $code => $configuration) { diff --git a/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php b/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php index 7ab2cb0dce6e9..ef0a3d233e387 100644 --- a/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php +++ b/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php @@ -15,6 +15,8 @@ /** * Data object processor for array serialization using class reflection + * + * @api */ class DataObjectProcessor { diff --git a/lib/internal/Magento/Framework/ShellInterface.php b/lib/internal/Magento/Framework/ShellInterface.php index e821ce013db95..96607b8a072af 100644 --- a/lib/internal/Magento/Framework/ShellInterface.php +++ b/lib/internal/Magento/Framework/ShellInterface.php @@ -7,6 +7,8 @@ /** * Shell command line wrapper encapsulates command execution and arguments escaping + * + * @api */ interface ShellInterface { diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php index 16136a2dfb8dd..1fd96eabf3507 100644 --- a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php +++ b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Stdlib\DateTime; /** diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/CookieScopeTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/CookieScopeTest.php index 9da6c024ed77f..4e21970c23fcb 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/CookieScopeTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/CookieScopeTest.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\Framework\Stdlib\Test\Unit\Cookie; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; @@ -117,7 +115,8 @@ public function testGetSensitiveCookieMetadataDefaults() SensitiveCookieMetadata::KEY_HTTP_ONLY => true, SensitiveCookieMetadata::KEY_SECURE => true, ], - $cookieScope->getSensitiveCookieMetadata()->__toArray()); + $cookieScope->getSensitiveCookieMetadata()->__toArray() + ); } /** diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php index db67947749339..dea128c18c972 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php @@ -4,19 +4,18 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - // @codingStandardsIgnoreStart namespace { $mockTranslateSetCookie = false; } -namespace Magento\Framework\Stdlib\Test\Unit\Cookie { - // @codingStandardsIgnoreEnd +namespace Magento\Framework\Stdlib\Test\Unit\Cookie +{ use Magento\Framework\Stdlib\Cookie\PhpCookieManager; use Magento\Framework\Exception\InputException; use Magento\Framework\Stdlib\Cookie\FailureToSendException; use Magento\Framework\Stdlib\Cookie\CookieSizeLimitReachedException; + // @codingStandardsIgnoreEnd /** * Test PhpCookieManager @@ -49,7 +48,7 @@ class PhpCookieManagerTest extends \PHPUnit_Framework_TestCase /** * Mapping from constant names to functions that handle the assertions. */ - static $functionTestAssertionMapping = [ + protected static $functionTestAssertionMapping = [ self::DELETE_COOKIE_NAME => 'self::assertDeleteCookie', self::DELETE_COOKIE_NAME_NO_METADATA => 'self::assertDeleteCookieWithNoMetadata', self::SENSITIVE_COOKIE_NAME_NO_METADATA_HTTPS => 'self::assertSensitiveCookieWithNoMetaDataHttps', @@ -75,6 +74,7 @@ class PhpCookieManagerTest extends \PHPUnit_Framework_TestCase * @var \Magento\Framework\Stdlib\Cookie\PhpCookieManager */ protected $cookieManager; + /** * @var \PHPUnit_Framework_MockObject_MockObject|CookieScopeInterface */ @@ -233,7 +233,7 @@ public function testSetSensitiveCookieNoMetadata($cookieName, $secure) [ 'request' => $this->requestMock ] - ); + ); $this->scopeMock->expects($this->once()) ->method('getSensitiveCookieMetadata') ->with() diff --git a/lib/internal/Magento/Framework/Validator/Exception.php b/lib/internal/Magento/Framework/Validator/Exception.php index b84c5c336cd5d..0e245b2a4a7e9 100644 --- a/lib/internal/Magento/Framework/Validator/Exception.php +++ b/lib/internal/Magento/Framework/Validator/Exception.php @@ -13,7 +13,9 @@ use Magento\Framework\Message\Error; /** - * Exception to be thrown when an validation data is failed + * Exception to be thrown when data validation fails + * + * @api */ class Exception extends InputException { diff --git a/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php b/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php index 2300b5d6a0191..86daba29e5be8 100644 --- a/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php +++ b/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php @@ -8,7 +8,7 @@ use Magento\Framework\Exception\LocalizedException; /** - * Class ContentProcessorException + * @api */ class ContentProcessorException extends LocalizedException { diff --git a/lib/internal/Magento/Framework/Webapi/Authorization.php b/lib/internal/Magento/Framework/Webapi/Authorization.php index 52cce19ce1f6c..8cad2996fd874 100644 --- a/lib/internal/Magento/Framework/Webapi/Authorization.php +++ b/lib/internal/Magento/Framework/Webapi/Authorization.php @@ -7,6 +7,8 @@ /** * Web API authorization model. + * + * @api */ class Authorization { diff --git a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php b/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php index 184b48374bc0c..4b69e822ea169 100644 --- a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php +++ b/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php @@ -21,6 +21,7 @@ * Helper for errors processing. * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class ErrorProcessor { diff --git a/lib/internal/Magento/Framework/Webapi/Exception.php b/lib/internal/Magento/Framework/Webapi/Exception.php index 46f163f595558..01a9848c63282 100644 --- a/lib/internal/Magento/Framework/Webapi/Exception.php +++ b/lib/internal/Magento/Framework/Webapi/Exception.php @@ -11,6 +11,12 @@ use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; +/** + * Web API exception should not be used directly by any modules except for Magento_Webapi. + * + * During web API requests, all exceptions are converted to this exception, + * which is then used for proper error response generation. + */ class Exception extends LocalizedException { /**#@+ diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php b/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php index 59b380c37493a..21741a2c16c1d 100644 --- a/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php +++ b/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php @@ -25,6 +25,8 @@ * ParamOverriderCustomerId would return the current authenticated user's customer id. If you * create new ParamOverriderInterface implementations, you can register new implementations by * adding to the parameter list for ParamsOverrider's dependency injection configuration. + * + * @api */ interface ParamOverriderInterface { diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php b/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php index 1deda6ae4edf0..9d905ce599779 100644 --- a/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php +++ b/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php @@ -7,6 +7,11 @@ */ namespace Magento\Framework\Webapi\Rest\Response; +/** + * Renderer interface allows REST response data rendering in a specific format (e.g. Json or Xml) + * + * @api + */ interface RendererInterface { /** diff --git a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php index d0ed69bfdadd6..bd930a3d3829e 100644 --- a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php +++ b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php @@ -23,6 +23,7 @@ * Deserialize arguments from API requests. * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @api */ class ServiceInputProcessor implements ServicePayloadConverterInterface { diff --git a/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php b/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php index 61705c7561fcf..d8e1a3de3670a 100644 --- a/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php +++ b/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php @@ -12,7 +12,9 @@ use Magento\Framework\Webapi\ServicePayloadConverterInterface; /** - * Data object converter for REST + * Data object converter + * + * @api */ class ServiceOutputProcessor implements ServicePayloadConverterInterface { diff --git a/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php b/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php index aa782a18859c3..30f93efdb9ef9 100644 --- a/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php +++ b/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php @@ -9,6 +9,8 @@ /** * Interface for data conversion based on data type. + * + * @api */ interface ServicePayloadConverterInterface { diff --git a/setup/performance-toolkit/profiles/ce/extra_large.xml b/setup/performance-toolkit/profiles/ce/extra_large.xml index ebc8725646e19..0f8f88a5a7d8c 100644 --- a/setup/performance-toolkit/profiles/ce/extra_large.xml +++ b/setup/performance-toolkit/profiles/ce/extra_large.xml @@ -14,8 +14,15 @@ 600000 - 1 - 24 + + + 3 + image + + + 8 + + Configurable Product %s 16000 diff --git a/setup/performance-toolkit/profiles/ce/large.xml b/setup/performance-toolkit/profiles/ce/large.xml index 0f8d23d1de80c..2843c2855c9f0 100644 --- a/setup/performance-toolkit/profiles/ce/large.xml +++ b/setup/performance-toolkit/profiles/ce/large.xml @@ -14,8 +14,15 @@ 300000 - 1 - 24 + + + 3 + image + + + 8 + + Configurable Product %s 8000 diff --git a/setup/performance-toolkit/profiles/ce/medium.xml b/setup/performance-toolkit/profiles/ce/medium.xml index 0176a288ea1b5..45d22a23b59b2 100644 --- a/setup/performance-toolkit/profiles/ce/medium.xml +++ b/setup/performance-toolkit/profiles/ce/medium.xml @@ -14,8 +14,15 @@ 24000 - 1 - 24 + + + 3 + image + + + 8 + + Configurable Product %s 640 diff --git a/setup/performance-toolkit/profiles/ce/medium_msite.xml b/setup/performance-toolkit/profiles/ce/medium_msite.xml index ac7d6fa55a9c2..5c763e3970124 100644 --- a/setup/performance-toolkit/profiles/ce/medium_msite.xml +++ b/setup/performance-toolkit/profiles/ce/medium_msite.xml @@ -14,8 +14,15 @@ 4000 - 1 - 24 + + + 3 + image + + + 8 + + Configurable Product %s 800 diff --git a/setup/performance-toolkit/profiles/ce/small.xml b/setup/performance-toolkit/profiles/ce/small.xml index 995698d2005ec..34a072580c4e9 100644 --- a/setup/performance-toolkit/profiles/ce/small.xml +++ b/setup/performance-toolkit/profiles/ce/small.xml @@ -14,8 +14,15 @@ 800 - 1 - 24 + + + 3 + image + + + 8 + + Configurable Product %s 16 diff --git a/setup/src/Magento/Setup/Exception.php b/setup/src/Magento/Setup/Exception.php index 323ce24bfdc0e..56f23cb39a92e 100644 --- a/setup/src/Magento/Setup/Exception.php +++ b/setup/src/Magento/Setup/Exception.php @@ -6,6 +6,11 @@ namespace Magento\Setup; +/** + * Exception thrown if an error occurs on setup process. + * + * @api + */ class Exception extends \Exception { } diff --git a/setup/src/Magento/Setup/Fixtures/AttributeSet/Pattern.php b/setup/src/Magento/Setup/Fixtures/AttributeSet/Pattern.php index 03128a8d0b844..c67cf990c3e7f 100644 --- a/setup/src/Magento/Setup/Fixtures/AttributeSet/Pattern.php +++ b/setup/src/Magento/Setup/Fixtures/AttributeSet/Pattern.php @@ -46,7 +46,7 @@ public function generateAttributeSet( for ($index = 1; $index <= $attributesPerSet; $index++) { $attributeData = $this->generateAttribute( $index, - $optionsPerAttribute + is_array($optionsPerAttribute) ? $optionsPerAttribute[$index-1] : $optionsPerAttribute ); if (is_callable($attributePattern)) { $attributeData = $attributePattern($index, $attributeData); diff --git a/setup/src/Magento/Setup/Fixtures/ConfigurableProductsFixture.php b/setup/src/Magento/Setup/Fixtures/ConfigurableProductsFixture.php index 15d9d11295327..99c6ee825960c 100644 --- a/setup/src/Magento/Setup/Fixtures/ConfigurableProductsFixture.php +++ b/setup/src/Magento/Setup/Fixtures/ConfigurableProductsFixture.php @@ -47,6 +47,25 @@ * * * + * 2.3 Generate products based on dynamically created attribute set with specified configuration per each attribute + * + * + * + * + * + * {Amount of options per attribute} + * color|image Type of Swatch attribute + * + * + * + * {Amount of options per attribute} + * + * + * {Configurable sku pattern with %s} + * {Amount of configurable products} + * + * + * * Products will be uniformly distributed per categories and websites * If node "assign_entities_to_all_websites" from profile is set to "1" then products will be assigned to all websites * @@ -392,31 +411,16 @@ public function introduceParamLabels() */ public function printInfo(OutputInterface $output) { - $config = $this->fixtureModel->getValue('configurable_products', []); - if (!$config) { + if (!$this->fixtureModel->getValue('configurable_products', [])) { return; } - $generalAmount = is_numeric($config) ? $config : array_sum(array_column($config, 'products')); - $output->writeln(sprintf(' |- Configurable products: %s', $generalAmount)); - $configurableProductConfig = $this->prepareConfigurableConfig( $this->getDefaultAttributeSetsWithAttributes() ); + $generalAmount = array_sum(array_column($configurableProductConfig, 'products')); - foreach ($configurableProductConfig as $config) { - $attributeSetName = isset($config['attributeSet']) - ? $config['attributeSet'] - : 'Dynamic Attribute Set ' . $config['attributes'] . '-' . $config['options']; - - $output->writeln( - sprintf( - ' |--- %s products for attribute set "%s"', - $config['products'], - $attributeSetName - ) - ); - } + $output->writeln(sprintf(' |- Configurable products: %s', $generalAmount)); } /** @@ -477,6 +481,7 @@ function (&$item, $key) { * * @return array * @throws ValidatorException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function getConfigurableProductConfig() { @@ -500,14 +505,19 @@ private function getConfigurableProductConfig() $skuPull = []; foreach ($configurableProductConfig as $i => &$config) { $attributeSet = $config['attributeSet']; - $attributes = (int)$config['attributes']; + $attributes = $config['attributes']; $options = (int)$config['options']; if ($attributeSet && isset($defaultAttributeSets[$attributeSet])) { // process default attribute sets $attributeSet = $defaultAttributeSets[$attributeSet]; $attributes = count($attributeSet['attributes']); $options = count($attributeSet['attributes'][0]['values']); + } elseif (is_array($attributes)) { + $attributeSet = $this->getCustomAttributeSet($attributes); + $options = array_column($attributes, 'options'); + $attributes = count($attributes); } elseif ($attributes && $options) { + $attributes = (int)$attributes; // process dynamic attribute sets $attributeSet = $this->getAttributeSet($attributes, $options, $config['swatches']); } @@ -522,7 +532,7 @@ private function getConfigurableProductConfig() $config['attributeSet'] = $this->convertAttributesToDBFormat($attributeSet); $config['attributes'] = $attributes; $config['options'] = $options; - $config['variationCount'] = pow($options, $attributes); + $config['variationCount'] = is_array($options) ? array_product($options) : pow($options, $attributes); $skuPull[] = $config['sku']; } @@ -556,6 +566,16 @@ private function prepareConfigurableConfig($defaultAttributeSets) } else { $configurableConfigs = $configurableConfigs['config']; } + + foreach ($configurableConfigs as &$config) { + if (isset($config['attributes']) && is_array($config['attributes'])) { + if (!isset($config['attributes']['attribute'][0])) { + $config['attributes'] = [$config['attributes']['attribute']]; + } else { + $config['attributes'] = $config['attributes']['attribute']; + } + } + } } else { throw new ValidatorException(__('Configurable product config is invalid')); } @@ -613,11 +633,10 @@ private function getConfigurableSkuPattern($config, $attributeSetName) private function getAttributeSet($attributes, $options, $swatches) { $attributeCode = 'configurable_attribute' . $attributes . '_' . $options . '_'; - $setName = 'Dynamic Attribute Set ' . $attributes . '-' . $options; return $this->attributeSetsFixture->createAttributeSet( $this->attributePattern->generateAttributeSet( - $setName, + $this->getAttributeSetName($attributes, $options), $attributes, $options, function ($index, $attribute) use ($attributeCode, $options, $swatches) { @@ -635,6 +654,68 @@ function ($index, $attribute) use ($attributeCode, $options, $swatches) { ); } + /** + * Provide attribute set based on attributes configuration + * + * @param array $attributes + * @return array + */ + private function getCustomAttributeSet(array $attributes) + { + $attributeSetName = $this->getAttributeSetName( + count($attributes), + implode(',', array_column($attributes, 'options')) + ); + + $pattern = $this->attributePattern->generateAttributeSet( + $attributeSetName, + count($attributes), + array_column($attributes, 'options'), + function ($index, $attribute) use ($attributeSetName, $attributes) { + $swatch = []; + $timeStamp = time(); + $data = [ + 'attribute_code' => sprintf('custom_attribute_%s_%s', $index, $timeStamp), + 'frontend_label' => 'Dynamic Attribute ' . sprintf('custom_attribute_%s_%s', $index, $timeStamp), + ]; + + if (isset($attributes[$index-1]['swatches'])) { + $data['is_visible_in_advanced_search'] = 1; + $data['is_searchable'] = 1; + $data['is_filterable'] = 1; + $data['is_filterable_in_search'] = 1; + $data['used_in_product_listing'] = 1; + + $swatch = $this->swatchesGenerator->generateSwatchData( + (int) $attributes[$index-1]['options'], + $attributeSetName . $index, + $attributes[$index-1]['swatches'] + ); + } + + return array_replace_recursive( + $attribute, + $data, + $swatch + ); + } + ); + + return $this->attributeSetsFixture->createAttributeSet($pattern); + } + + /** + * Provide attribute set name based on amount of attributes and options per attribute set + * + * @param int $attributesCount + * @param int $optionsCount + * @return string + */ + private function getAttributeSetName($attributesCount, $optionsCount) + { + return sprintf('Dynamic Attribute Set %s-%s', $attributesCount, $optionsCount); + } + /** * @return array */ @@ -689,13 +770,13 @@ private function getConfigurableProductsVariationsValue() */ private function getAdditionalAttributesClosure(array $attributes, $variationCount) { - return function ($attributeSetId, $index, $entityNumber) use ($attributes, $variationCount) { - $variationIndex = $this->getConfigurableVariationIndex($entityNumber, $variationCount) - 1; - $attributeValues = []; - $optionsPerAttribute = count($attributes[0]['values']); - $variationIndex = $variationIndex % $variationCount; + $optionsPerAttribute = array_map(function ($attr) { + return count($attr['values']); + }, $attributes); + $variationsMatrix = $this->generateVariationsMatrix(count($attributes), $optionsPerAttribute); - $variationsMatrix = $this->generateVariationsMatrix(count($attributes), $optionsPerAttribute); + return function ($attributeSetId, $index, $entityNumber) use ($attributes, $variationCount, $variationsMatrix) { + $variationIndex = $this->getConfigurableVariationIndex($entityNumber, $variationCount) - 1; if (isset($variationsMatrix[$variationIndex])) { $tempProductData = []; foreach ($variationsMatrix[$variationIndex] as $attributeIndex => $optionIndex) { @@ -706,7 +787,7 @@ private function getAdditionalAttributesClosure(array $attributes, $variationCou return $tempProductData; } - return $attributeValues; + return []; }; } @@ -719,8 +800,8 @@ private function getAdditionalAttributesClosure(array $attributes, $variationCou private function generateVariationsMatrix($attributesPerSet, $optionsPerAttribute) { $variationsMatrix = null; - for ($i = 1; $i <= $attributesPerSet; $i++) { - $variationsMatrix[] = range(0, $optionsPerAttribute - 1); + for ($i = 0; $i < $attributesPerSet; $i++) { + $variationsMatrix[] = range(0, $optionsPerAttribute[$i] - 1); } return $this->generateVariations($variationsMatrix); } diff --git a/setup/src/Magento/Setup/Model/FixtureGenerator/EntityGenerator.php b/setup/src/Magento/Setup/Model/FixtureGenerator/EntityGenerator.php index 9fcf11ff65e5f..c52cee9f5c184 100644 --- a/setup/src/Magento/Setup/Model/FixtureGenerator/EntityGenerator.php +++ b/setup/src/Magento/Setup/Model/FixtureGenerator/EntityGenerator.php @@ -6,6 +6,7 @@ namespace Magento\Setup\Model\FixtureGenerator; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\ValidatorException; /** @@ -138,14 +139,25 @@ public function __construct( * @param TemplateEntityGeneratorInterface $entityGenerator * @param int $entitiesAmount * @param callable $fixture + * @throws LocalizedException * @return void */ public function generate(TemplateEntityGeneratorInterface $entityGenerator, $entitiesAmount, callable $fixture) { - $this->sqlCollector->enable(); - $entity = $entityGenerator->generateEntity(); - $this->sqlCollector->disable(); - $entity->delete(); + $this->getConnection()->beginTransaction(); + try { + $this->sqlCollector->enable(); + $entity = $entityGenerator->generateEntity(); + $this->sqlCollector->disable(); + $entity->delete(); + $this->getConnection()->commit(); + } catch (\Exception $e) { + $this->getConnection()->rollBack(); + throw new LocalizedException( + __('Cannot generate entities - error occurred during template creation: %1', $e->getMessage()), + $e + ); + } $map = []; $processed = 0; @@ -239,11 +251,22 @@ private function bindWithCustomHandler($table, $entityId, $entityNumber, $fixtur * * @param array $map * @return void + * @throws LocalizedException */ private function saveEntities(array &$map) { - foreach ($map as $table => $data) { - $this->getConnection()->insertMultiple($table, $data); + $this->getConnection()->beginTransaction(); + try { + foreach ($map as $table => $data) { + $this->getConnection()->insertMultiple($table, $data); + } + $this->getConnection()->commit(); + } catch (\Exception $e) { + $this->getConnection()->rollBack(); + throw new LocalizedException( + __('Cannot save entity. Error occurred: %1', $e->getMessage()), + $e + ); } $map = []; diff --git a/setup/src/Magento/Setup/Model/ModuleContext.php b/setup/src/Magento/Setup/Model/ModuleContext.php index 60202f3e296a7..e17c3216e5ff8 100644 --- a/setup/src/Magento/Setup/Model/ModuleContext.php +++ b/setup/src/Magento/Setup/Model/ModuleContext.php @@ -9,6 +9,8 @@ /** * Context of a module being installed/updated: version, user data, etc. + * + * @api */ class ModuleContext implements ModuleContextInterface { diff --git a/setup/src/Magento/Setup/Module/DataSetup.php b/setup/src/Magento/Setup/Module/DataSetup.php index 7c595ce4d91eb..e64a85037659a 100644 --- a/setup/src/Magento/Setup/Module/DataSetup.php +++ b/setup/src/Magento/Setup/Module/DataSetup.php @@ -11,6 +11,9 @@ use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Setup\Module\Setup\SetupCache; +/** + * @api + */ class DataSetup extends \Magento\Framework\Module\Setup implements ModuleDataSetupInterface { /** diff --git a/setup/src/Magento/Setup/Module/DataSetupFactory.php b/setup/src/Magento/Setup/Module/DataSetupFactory.php index 3c3c84135e612..b19defbf1bc8e 100644 --- a/setup/src/Magento/Setup/Module/DataSetupFactory.php +++ b/setup/src/Magento/Setup/Module/DataSetupFactory.php @@ -9,6 +9,7 @@ /** * Factory class to create DataSetup + * @api */ class DataSetupFactory { diff --git a/setup/src/Magento/Setup/Module/Setup.php b/setup/src/Magento/Setup/Module/Setup.php index 7c1e806521f1d..5c5d9a65ec901 100644 --- a/setup/src/Magento/Setup/Module/Setup.php +++ b/setup/src/Magento/Setup/Module/Setup.php @@ -8,6 +8,9 @@ use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\App\ResourceConnection; +/** + * @api + */ class Setup extends \Magento\Framework\Module\Setup implements SchemaSetupInterface { /** diff --git a/setup/src/Magento/Setup/Module/SetupFactory.php b/setup/src/Magento/Setup/Module/SetupFactory.php index 18d210b804bf8..6f1063a6e7495 100644 --- a/setup/src/Magento/Setup/Module/SetupFactory.php +++ b/setup/src/Magento/Setup/Module/SetupFactory.php @@ -10,6 +10,8 @@ /** * Factory class to create Setup + * + * @api */ class SetupFactory {