From 213e11d576d72a3d6bd2efd1a2f309f91d200d5d Mon Sep 17 00:00:00 2001 From: Diederick Bruin Date: Fri, 25 May 2018 16:07:53 +0200 Subject: [PATCH 01/20] Move breadcrumb json configuration to viewmodel --- .../Catalog/ViewModel/Product/Breadcrumbs.php | 27 ++++++++++++++++++- .../templates/product/breadcrumbs.phtml | 9 +------ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php index 2f2048b2a3013..213f2fc34f621 100644 --- a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php +++ b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php @@ -8,6 +8,7 @@ use Magento\Catalog\Helper\Data; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\DataObject; +use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\View\Element\Block\ArgumentInterface; /** @@ -27,18 +28,26 @@ class Breadcrumbs extends DataObject implements ArgumentInterface */ private $scopeConfig; + /** + * @var Json + */ + private $json; + /** * @param Data $catalogData * @param ScopeConfigInterface $scopeConfig + * @param Json $json */ public function __construct( Data $catalogData, - ScopeConfigInterface $scopeConfig + ScopeConfigInterface $scopeConfig, + Json $json ) { parent::__construct(); $this->catalogData = $catalogData; $this->scopeConfig = $scopeConfig; + $this->json = $json; } /** @@ -78,4 +87,20 @@ public function getProductName() ? $this->catalogData->getProduct()->getName() : ''; } + + /** + * Returns breadcrumb json. + * + * @return string + */ + public function getJsonConfiguration() + { + return $this->json->serialize([ + 'breadcrumbs' => [ + 'categoryUrlSuffix' => $this->getCategoryUrlSuffix(), + 'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(), + 'product' => $this->getProductName() + ] + ]); + } } diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml index 063f8857329e5..d66aa5e5edb28 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml @@ -7,11 +7,4 @@ /** @var \Magento\Catalog\ViewModel\Product\Breadcrumbs $viewModel */ $viewModel = $block->getData('viewModel'); ?> - + From 0a38b845508577e38d79280288a4fc716f2d1108 Mon Sep 17 00:00:00 2001 From: Riccardo Tempesta Date: Sat, 26 May 2018 12:27:53 +0200 Subject: [PATCH 02/20] FIX for issue #15501 - M2.2.4 missing meta title tag and doesn't show product name if meta title is empty --- app/code/Magento/Catalog/Helper/Product/View.php | 7 +++---- lib/internal/Magento/Framework/View/Page/Config.php | 8 ++++++++ .../Magento/Framework/View/Page/Config/Renderer.php | 4 +++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Catalog/Helper/Product/View.php b/app/code/Magento/Catalog/Helper/Product/View.php index 4ccea0436f2d8..90027ffb65a58 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -113,10 +113,9 @@ private function preparePageMetadata(ResultPage $resultPage, $product) { $pageConfig = $resultPage->getConfig(); - $title = $product->getMetaTitle(); - if ($title) { - $pageConfig->getTitle()->set($title); - } + $metaTitle = $product->getMetaTitle(); + $pageConfig->setMetaTitle($metaTitle); + $pageConfig->getTitle()->set($metaTitle ?: $product->getName()); $keyword = $product->getMetaKeyword(); $currentCategory = $this->_coreRegistry->registry('current_category'); diff --git a/lib/internal/Magento/Framework/View/Page/Config.php b/lib/internal/Magento/Framework/View/Page/Config.php index e3ea9a58661f2..6c9586e137640 100644 --- a/lib/internal/Magento/Framework/View/Page/Config.php +++ b/lib/internal/Magento/Framework/View/Page/Config.php @@ -339,6 +339,14 @@ public function getDescription() return $this->metadata['description']; } + /** + * @param string $title + */ + public function setMetaTitle($title) + { + $this->setMetadata('title', $title); + } + /** * @param string $keywords * @return void diff --git a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php index 9563cbfbcc532..8a14286f8ef59 100644 --- a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php +++ b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php @@ -136,7 +136,9 @@ public function renderMetadata() protected function processMetadataContent($name, $content) { $method = 'get' . $this->string->upperCaseWords($name, '_', ''); - if (method_exists($this->pageConfig, $method)) { + + // We skip title, because PageConfig::getTitle() refers to the tag and not to meta title. + if (!in_array($name, ['title']) && method_exists($this->pageConfig, $method)) { $content = $this->pageConfig->$method(); } return $content; From 603de52d736e5a7e3e6473661823749ac3159961 Mon Sep 17 00:00:00 2001 From: Vishal Gelani <vishalgelani99@gmail.com> Date: Mon, 28 May 2018 12:18:09 +0530 Subject: [PATCH 03/20] Added escape text. --- .../Catalog/view/frontend/templates/product/breadcrumbs.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml index d66aa5e5edb28..c54ce5340851c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml @@ -7,4 +7,4 @@ /** @var \Magento\Catalog\ViewModel\Product\Breadcrumbs $viewModel */ $viewModel = $block->getData('viewModel'); ?> -<div class="breadcrumbs" data-mage-init='<?= $viewModel->getJsonConfiguration() ?>'></div> +<div class="breadcrumbs" data-mage-init='<?= /* @escapeNotVerified */ $viewModel->getJsonConfiguration() ?>'></div> From 8981225996e92af97671c67727be35af42591e94 Mon Sep 17 00:00:00 2001 From: Danny Verkade <danny@cream.nl> Date: Thu, 31 May 2018 16:12:13 +0200 Subject: [PATCH 04/20] This PR is a fix for issue #15627 where the default sorting behaviour of Magento was changed in Magento 2.2.4. --- app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index dfbaf3a62420a..e9c383901b5ff 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -196,7 +196,7 @@ public function setCollection($collection) $this->_collection->addAttributeToSort( $this->getCurrentOrder(), $this->getCurrentDirection() - )->addAttributeToSort('entity_id', $this->getCurrentDirection()); + ); } else { $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection()); } From 8aea8ca5c5250c15e3b2379c66ac492f44737c69 Mon Sep 17 00:00:00 2001 From: Mark Shust <mark@shust.com> Date: Thu, 31 May 2018 17:20:24 -0400 Subject: [PATCH 05/20] Create ability to set is_visible_on_front to order status history comment --- app/code/Magento/Sales/Model/Order.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index 85443ee7f4f11..4693e0dd74df4 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -1009,7 +1009,7 @@ public function addStatusToHistory($status, $comment = '', $isCustomerNotified = * @param bool|string $status * @return OrderStatusHistoryInterface */ - public function addStatusHistoryComment($comment, $status = false) + public function addStatusHistoryComment($comment, $status = false, $isVisibleOnFront = false) { if (false === $status) { $status = $this->getStatus(); @@ -1024,6 +1024,8 @@ public function addStatusHistoryComment($comment, $status = false) $comment )->setEntityName( $this->entityType + )->setIsVisibleOnFront( + $isVisibleOnFront ); $this->addStatusHistory($history); return $history; From e95f3f7a1d790d661a024e12ad6bf34d33bb9485 Mon Sep 17 00:00:00 2001 From: Timon de Groot <tdegroot96@gmail.com> Date: Sat, 2 Jun 2018 14:20:43 +0200 Subject: [PATCH 06/20] Make new Json dependency backwards compatible --- app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php index 213f2fc34f621..2b5665d20f304 100644 --- a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php +++ b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php @@ -7,6 +7,7 @@ use Magento\Catalog\Helper\Data; use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\View\Element\Block\ArgumentInterface; @@ -41,13 +42,13 @@ class Breadcrumbs extends DataObject implements ArgumentInterface public function __construct( Data $catalogData, ScopeConfigInterface $scopeConfig, - Json $json + Json $json = null ) { parent::__construct(); $this->catalogData = $catalogData; $this->scopeConfig = $scopeConfig; - $this->json = $json; + $this->json = $json ?: ObjectManager::getInstance()->get(Json::class); } /** From 432cf007f79937437620f18ace00010b1a61a4ef Mon Sep 17 00:00:00 2001 From: Riccardo Tempesta <riccardo.tempesta@magespecialist.it> Date: Mon, 4 Jun 2018 19:06:11 +0200 Subject: [PATCH 07/20] Refactor to avoid method_exists call --- .../Magento/Framework/View/Page/Config.php | 52 +++++++++++++++++++ .../Framework/View/Page/Config/Renderer.php | 14 ++--- 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Page/Config.php b/lib/internal/Magento/Framework/View/Page/Config.php index 6c9586e137640..3cc9edbb6f5e1 100644 --- a/lib/internal/Magento/Framework/View/Page/Config.php +++ b/lib/internal/Magento/Framework/View/Page/Config.php @@ -7,6 +7,7 @@ namespace Magento\Framework\View\Page; use Magento\Framework\App; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\View; /** @@ -34,6 +35,14 @@ class Config const ELEMENT_TYPE_HEAD = 'head'; /**#@-*/ + const META_DESCRIPTION = 'description'; + const META_CONTENT_TYPE = 'content_type'; + const META_MEDIA_TYPE = 'media_type'; + const META_CHARSET = 'charset'; + const META_TITLE = 'title'; + const META_KEYWORDS = 'keywords'; + const META_ROBOTS = 'robots'; + /** * Constant body attribute class */ @@ -339,6 +348,34 @@ public function getDescription() return $this->metadata['description']; } + /** + * Get rendered metadata + * @param string $fieldName + * @return string + * @throws LocalizedException + */ + public function getRenderedMetaTagValue(string $fieldName) + { + switch ($fieldName) { + case self::META_DESCRIPTION: + return $this->getDescription(); + case self::META_CONTENT_TYPE: + return $this->getContentType(); + case self::META_MEDIA_TYPE: + return $this->getMediaType(); + case self::META_CHARSET: + return $this->getCharset(); + case self::META_KEYWORDS: + return $this->getKeywords(); + case self::META_ROBOTS: + return $this->getRobots(); + case self::META_TITLE: + return $this->getMetaTitle(); + default: + throw new LocalizedException(__('No rendered meta function for %1', $fieldName)); + } + } + /** * @param string $title */ @@ -347,6 +384,21 @@ public function setMetaTitle($title) $this->setMetadata('title', $title); } + /** + * Retrieve meta title + * + * @return string + */ + public function getMetaTitle() + { + $this->build(); + if (empty($this->metadata['title'])) { + return ''; + } + + return $this->metadata['title']; + } + /** * @param string $keywords * @return void diff --git a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php index 8a14286f8ef59..f251580441b2f 100644 --- a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php +++ b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php @@ -3,8 +3,10 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Framework\View\Page\Config; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\View\Asset\GroupedCollection; use Magento\Framework\View\Page\Config; @@ -131,17 +133,15 @@ public function renderMetadata() /** * @param string $name * @param string $content - * @return mixed + * @return string */ protected function processMetadataContent($name, $content) { - $method = 'get' . $this->string->upperCaseWords($name, '_', ''); - - // We skip title, because PageConfig::getTitle() refers to the tag <title> and not to meta title. - if (!in_array($name, ['title']) && method_exists($this->pageConfig, $method)) { - $content = $this->pageConfig->$method(); + try { + return $this->pageConfig->getRenderedMetaTagValue((string) $name); + } catch (LocalizedException $e) { + return (string) $content; } - return $content; } /** From 1413d65946c2e3e076a0605d2e5c739e0b339d83 Mon Sep 17 00:00:00 2001 From: Riccardo Tempesta <riccardo.tempesta@magespecialist.it> Date: Tue, 5 Jun 2018 18:38:13 +0200 Subject: [PATCH 08/20] FIX failing tests and PageConfig refactor --- .../Magento/Framework/View/Page/Config.php | 88 +++++++------------ .../Framework/View/Page/Config/Renderer.php | 42 ++++++--- .../Test/Unit/Page/Config/RendererTest.php | 9 +- 3 files changed, 66 insertions(+), 73 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Page/Config.php b/lib/internal/Magento/Framework/View/Page/Config.php index 3cc9edbb6f5e1..6f7a1c1c5fbb2 100644 --- a/lib/internal/Magento/Framework/View/Page/Config.php +++ b/lib/internal/Magento/Framework/View/Page/Config.php @@ -7,7 +7,7 @@ namespace Magento\Framework\View\Page; use Magento\Framework\App; -use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\App\Area; use Magento\Framework\View; /** @@ -42,6 +42,7 @@ class Config const META_TITLE = 'title'; const META_KEYWORDS = 'keywords'; const META_ROBOTS = 'robots'; + const META_X_UI_COMPATIBLE = 'x_ua_compatible'; /** * Constant body attribute class @@ -253,7 +254,7 @@ public function getMetadata() */ public function setContentType($contentType) { - $this->setMetadata('content_type', $contentType); + $this->setMetadata(self::META_CONTENT_TYPE, $contentType); } /** @@ -264,10 +265,10 @@ public function setContentType($contentType) public function getContentType() { $this->build(); - if (strtolower($this->metadata['content_type']) === 'auto') { - $this->metadata['content_type'] = $this->getMediaType() . '; charset=' . $this->getCharset(); + if (strtolower($this->metadata[self::META_CONTENT_TYPE]) === 'auto') { + $this->metadata[self::META_CONTENT_TYPE] = $this->getMediaType() . '; charset=' . $this->getCharset(); } - return $this->metadata['content_type']; + return $this->metadata[self::META_CONTENT_TYPE]; } /** @@ -276,7 +277,7 @@ public function getContentType() */ public function setMediaType($mediaType) { - $this->setMetadata('media_type', $mediaType); + $this->setMetadata(self::META_MEDIA_TYPE, $mediaType); } /** @@ -287,13 +288,13 @@ public function setMediaType($mediaType) public function getMediaType() { $this->build(); - if (empty($this->metadata['media_type'])) { - $this->metadata['media_type'] = $this->scopeConfig->getValue( + if (empty($this->metadata[self::META_MEDIA_TYPE])) { + $this->metadata[self::META_MEDIA_TYPE] = $this->scopeConfig->getValue( 'design/head/default_media_type', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - return $this->metadata['media_type']; + return $this->metadata[self::META_MEDIA_TYPE]; } /** @@ -302,7 +303,7 @@ public function getMediaType() */ public function setCharset($charset) { - $this->setMetadata('charset', $charset); + $this->setMetadata(self::META_CHARSET, $charset); } /** @@ -313,13 +314,13 @@ public function setCharset($charset) public function getCharset() { $this->build(); - if (empty($this->metadata['charset'])) { - $this->metadata['charset'] = $this->scopeConfig->getValue( + if (empty($this->metadata[self::META_CHARSET])) { + $this->metadata[self::META_CHARSET] = $this->scopeConfig->getValue( 'design/head/default_charset', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - return $this->metadata['charset']; + return $this->metadata[self::META_CHARSET]; } /** @@ -328,7 +329,7 @@ public function getCharset() */ public function setDescription($description) { - $this->setMetadata('description', $description); + $this->setMetadata(self::META_DESCRIPTION, $description); } /** @@ -339,41 +340,13 @@ public function setDescription($description) public function getDescription() { $this->build(); - if (empty($this->metadata['description'])) { - $this->metadata['description'] = $this->scopeConfig->getValue( + if (empty($this->metadata[self::META_DESCRIPTION])) { + $this->metadata[self::META_DESCRIPTION] = $this->scopeConfig->getValue( 'design/head/default_description', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - return $this->metadata['description']; - } - - /** - * Get rendered metadata - * @param string $fieldName - * @return string - * @throws LocalizedException - */ - public function getRenderedMetaTagValue(string $fieldName) - { - switch ($fieldName) { - case self::META_DESCRIPTION: - return $this->getDescription(); - case self::META_CONTENT_TYPE: - return $this->getContentType(); - case self::META_MEDIA_TYPE: - return $this->getMediaType(); - case self::META_CHARSET: - return $this->getCharset(); - case self::META_KEYWORDS: - return $this->getKeywords(); - case self::META_ROBOTS: - return $this->getRobots(); - case self::META_TITLE: - return $this->getMetaTitle(); - default: - throw new LocalizedException(__('No rendered meta function for %1', $fieldName)); - } + return $this->metadata[self::META_DESCRIPTION]; } /** @@ -381,7 +354,7 @@ public function getRenderedMetaTagValue(string $fieldName) */ public function setMetaTitle($title) { - $this->setMetadata('title', $title); + $this->setMetadata(self::META_TITLE, $title); } /** @@ -392,11 +365,11 @@ public function setMetaTitle($title) public function getMetaTitle() { $this->build(); - if (empty($this->metadata['title'])) { + if (empty($this->metadata[self::META_TITLE])) { return ''; } - return $this->metadata['title']; + return $this->metadata[self::META_TITLE]; } /** @@ -405,7 +378,7 @@ public function getMetaTitle() */ public function setKeywords($keywords) { - $this->setMetadata('keywords', $keywords); + $this->setMetadata(self::META_KEYWORDS, $keywords); } /** @@ -416,13 +389,13 @@ public function setKeywords($keywords) public function getKeywords() { $this->build(); - if (empty($this->metadata['keywords'])) { - $this->metadata['keywords'] = $this->scopeConfig->getValue( + if (empty($this->metadata[self::META_KEYWORDS])) { + $this->metadata[self::META_KEYWORDS] = $this->scopeConfig->getValue( 'design/head/default_keywords', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - return $this->metadata['keywords']; + return $this->metadata[self::META_KEYWORDS]; } /** @@ -431,27 +404,28 @@ public function getKeywords() */ public function setRobots($robots) { - $this->setMetadata('robots', $robots); + $this->setMetadata(self::META_ROBOTS, $robots); } /** * Retrieve URL to robots file * * @return string + * @throws \Magento\Framework\Exception\LocalizedException */ public function getRobots() { - if ($this->getAreaResolver()->getAreaCode() !== 'frontend') { + if ($this->getAreaResolver()->getAreaCode() !== Area::AREA_FRONTEND) { return 'NOINDEX,NOFOLLOW'; } $this->build(); - if (empty($this->metadata['robots'])) { - $this->metadata['robots'] = $this->scopeConfig->getValue( + if (empty($this->metadata[self::META_ROBOTS])) { + $this->metadata[self::META_ROBOTS] = $this->scopeConfig->getValue( 'design/search_engine_robots/default_robots', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - return $this->metadata['robots']; + return $this->metadata[self::META_ROBOTS]; } /** diff --git a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php index f251580441b2f..183f8d34ee41f 100644 --- a/lib/internal/Magento/Framework/View/Page/Config/Renderer.php +++ b/lib/internal/Magento/Framework/View/Page/Config/Renderer.php @@ -23,7 +23,7 @@ class Renderer implements RendererInterface protected $assetTypeOrder = ['css', 'ico', 'js']; /** - * @var \Magento\Framework\View\Page\Config + * @var Config */ protected $pageConfig; @@ -53,7 +53,7 @@ class Renderer implements RendererInterface protected $urlBuilder; /** - * @param \Magento\Framework\View\Page\Config $pageConfig + * @param Config $pageConfig * @param \Magento\Framework\View\Asset\MergeService $assetMergeService * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\Escaper $escaper @@ -137,10 +137,30 @@ public function renderMetadata() */ protected function processMetadataContent($name, $content) { - try { - return $this->pageConfig->getRenderedMetaTagValue((string) $name); - } catch (LocalizedException $e) { - return (string) $content; + switch ($name) { + case Config::META_DESCRIPTION: + return $this->pageConfig->getDescription(); + + case Config::META_CONTENT_TYPE: + return $this->pageConfig->getContentType(); + + case Config::META_MEDIA_TYPE: + return $this->pageConfig->getMediaType(); + + case Config::META_CHARSET: + return $this->pageConfig->getCharset(); + + case Config::META_KEYWORDS: + return $this->pageConfig->getKeywords(); + + case Config::META_ROBOTS: + return $this->pageConfig->getRobots(); + + case Config::META_TITLE: + return $this->pageConfig->getMetaTitle(); + + default: + return $content; } } @@ -155,19 +175,19 @@ protected function getMetadataTemplate($name) } switch ($name) { - case 'charset': + case Config::META_CHARSET: $metadataTemplate = '<meta charset="%content"/>' . "\n"; break; - case 'content_type': + case Config::META_CONTENT_TYPE: $metadataTemplate = '<meta http-equiv="Content-Type" content="%content"/>' . "\n"; break; - case 'x_ua_compatible': + case Config::META_X_UI_COMPATIBLE: $metadataTemplate = '<meta http-equiv="X-UA-Compatible" content="%content"/>' . "\n"; break; - case 'media_type': + case Config::META_MEDIA_TYPE: $metadataTemplate = false; break; @@ -354,7 +374,7 @@ protected function renderAssetHtml(\Magento\Framework\View\Asset\PropertyGroup $ ); $result .= sprintf($template, $asset->getUrl()); } - } catch (\Magento\Framework\Exception\LocalizedException $e) { + } catch (LocalizedException $e) { $this->logger->critical($e); $result .= sprintf($template, $this->urlBuilder->getUrl('', ['_direct' => 'core/index/notFound'])); } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php index 1f110a9ec19b5..adb7c4f4ddd86 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php @@ -157,15 +157,14 @@ public function testRenderMetadata() . '<meta http-equiv="X-UA-Compatible" content="x_ua_compatible_value"/>' . "\n" . '<meta property="og:video:secure_url" content="secure_url"/>' . "\n"; - $this->stringMock->expects($this->at(0)) - ->method('upperCaseWords') - ->with('charset', '_', '') - ->willReturn('Charset'); - $this->pageConfigMock->expects($this->once()) ->method('getCharset') ->willReturn($metadataValueCharset); + $this->pageConfigMock->expects($this->once()) + ->method('getContentType') + ->willReturn('content_type_value'); + $this->pageConfigMock ->expects($this->once()) ->method('getMetadata') From a09ee80a89dc97d59f5799038ebd4ff6d9b100fc Mon Sep 17 00:00:00 2001 From: "Leandro F. L" <lfluvisotto@gmail.com> Date: Thu, 14 Jun 2018 20:37:30 +0200 Subject: [PATCH 09/20] Fix case mismatch call (class/method) --- .../Unit/Model/Export/AdvancedPricingTest.php | 2 +- .../System/Config/AdditionalCommentTest.php | 4 ++-- .../System/Config/CollectionTimeLabelTest.php | 2 +- .../Config/SubscriptionStatusLabelTest.php | 2 +- .../Adminhtml/System/Config/VerticalTest.php | 2 +- .../Test/Unit/ReportXml/QueryTest.php | 2 +- .../Gateway/Response/CardDetailsHandler.php | 2 +- .../Gateway/Response/VaultDetailsHandler.php | 2 +- .../Braintree/Model/Ui/ConfigProvider.php | 2 +- .../Test/Unit/Gateway/Config/ConfigTest.php | 2 +- .../Magento/Catalog/Model/Product/Image.php | 2 +- .../Product/ShowUpdateResultTest.php | 2 +- .../Model/Import/Product/Option.php | 2 +- .../Magento/Checkout/Setup/InstallData.php | 2 +- .../Test/Unit/Block/Widget/NameTest.php | 2 +- .../Unit/Model/Customer/DataProviderTest.php | 2 +- .../Attribute/CollectionTest.php | 2 +- .../ResourceModel/Problem/Collection.php | 4 ++-- .../Model/ResourceModel/Queue/Collection.php | 2 +- .../Test/Unit/Block/Info/SubstitutionTest.php | 2 +- .../Unit/Gateway/Http/Client/SoapTest.php | 2 +- .../Payment/Test/Unit/Model/InfoTest.php | 2 +- .../PreventExpressCheckoutObserverTest.php | 2 +- .../GuestCart/GuestCartManagementTest.php | 2 +- .../Controller/Adminhtml/Order/Unhold.php | 2 +- .../Unit/Block/Order/Create/TotalsTest.php | 6 ++--- .../SalesRule/Model/ResourceModel/Rule.php | 2 +- .../Shipping/Model/Shipping/Labels.php | 8 +++---- .../Test/Unit/Model/Resolver/GroupTest.php | 2 +- .../Test/Unit/Model/Resolver/StoreTest.php | 2 +- .../Test/Unit/Model/Resolver/WebsiteTest.php | 2 +- .../Unit/Model/TaxClass/Type/CustomerTest.php | 6 ++--- .../Command/ThemeUninstallCommandTest.php | 2 +- .../System/Design/Theme/UploadJsTest.php | 24 +++++++++---------- .../Unit/Model/ResourceModel/UserTest.php | 2 +- .../Framework/App/Test/Unit/BootstrapTest.php | 2 +- .../App/Test/Unit/StaticResourceTest.php | 2 +- .../Test/Unit/DependencyCheckerTest.php | 2 +- .../Framework/Config/Composer/Package.php | 2 +- .../Test/Unit/Router/Route/FactoryTest.php | 2 +- lib/internal/Magento/Framework/File/Size.php | 4 ++-- .../Filesystem/Test/Unit/DriverPoolTest.php | 2 +- .../Magento/Framework/Image/Adapter/Gd2.php | 8 +++---- .../Magento/Framework/Indexer/Action/Base.php | 2 +- .../Test/Unit/Factory/FactoryTest.php | 2 +- .../Magento/Framework/RequireJs/Config.php | 2 +- .../Unit/DateTime/DateTimeFormatterTest.php | 2 +- .../Unit/Matcher/MethodInvokedAtIndexTest.php | 2 +- .../FileCollector/AggregatedFileCollector.php | 2 +- .../Framework/View/Model/Layout/Merge.php | 2 +- .../View/Page/Config/Reader/Head.php | 2 +- .../Unit/Element/Html/Link/CurrentTest.php | 2 +- .../Message/MessageConfigurationsPoolTest.php | 4 ++-- .../Framework/View/Test/Unit/LayoutTest.php | 2 +- .../Magento/Setup/Model/PhpReadinessCheck.php | 4 ++-- 55 files changed, 81 insertions(+), 81 deletions(-) diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php index 48b4c58918740..17e7ffc20c5e9 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php @@ -213,7 +213,7 @@ protected function setUp() '_getCustomerGroupById', 'correctExportData' ]); - $this->advancedPricing = $this->getMockbuilder( + $this->advancedPricing = $this->getMockBuilder( \Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class ) ->setMethods($mockMethods) diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php index cbf06264096ac..407e323aeaae6 100644 --- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php +++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php @@ -65,11 +65,11 @@ public function testRender() ->method('getLabel') ->willReturn('Comment label'); $html = $this->additionalComment->render($this->abstractElementMock); - $this->assertRegexp( + $this->assertRegExp( "/New comment/", $html ); - $this->assertRegexp( + $this->assertRegExp( "/Comment label/", $html ); diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php index a652cf6b3d548..54612076a757f 100644 --- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php +++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php @@ -73,7 +73,7 @@ public function testRender() $this->abstractElementMock->expects($this->any()) ->method('getComment') ->willReturn('Eastern Standard Time (America/New_York)'); - $this->assertRegexp( + $this->assertRegExp( "/Eastern Standard Time \(America\/New_York\)/", $this->collectionTimeLabel->render($this->abstractElementMock) ); diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php index 09e753e4ac8aa..0806187ebac01 100644 --- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php +++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php @@ -77,7 +77,7 @@ public function testRender() $this->abstractElementMock->expects($this->any()) ->method('getComment') ->willReturn('Subscription status: Enabled'); - $this->assertRegexp( + $this->assertRegExp( "/Subscription status: Enabled/", $this->subscriptionStatusLabel->render($this->abstractElementMock) ); diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php index abce48c36c86a..6a0cecc781062 100644 --- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php +++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php @@ -65,7 +65,7 @@ public function testRender() ->method('getHint') ->willReturn('New hint'); $html = $this->vertical->render($this->abstractElementMock); - $this->assertRegexp( + $this->assertRegExp( "/New comment/", $html ); diff --git a/app/code/Magento/Analytics/Test/Unit/ReportXml/QueryTest.php b/app/code/Magento/Analytics/Test/Unit/ReportXml/QueryTest.php index a4b08a9ce5e0a..fd924abdd9f44 100644 --- a/app/code/Magento/Analytics/Test/Unit/ReportXml/QueryTest.php +++ b/app/code/Magento/Analytics/Test/Unit/ReportXml/QueryTest.php @@ -49,7 +49,7 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); - $this->selectHydratorMock = $this->getMockBuilder(selectHydrator::class) + $this->selectHydratorMock = $this->getMockBuilder(SelectHydrator::class) ->disableOriginalConstructor() ->getMock(); diff --git a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php index e89e604867baa..32abeac4c8ffb 100644 --- a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php +++ b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php @@ -85,7 +85,7 @@ public function handle(array $handlingSubject, array $response) private function getCreditCardType($type) { $replaced = str_replace(' ', '-', strtolower($type)); - $mapper = $this->config->getCctypesMapper(); + $mapper = $this->config->getCcTypesMapper(); return $mapper[$replaced]; } diff --git a/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php index 89bf7f14692b0..ca46e3b0ab93c 100644 --- a/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php +++ b/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php @@ -156,7 +156,7 @@ private function convertDetailsToJSON($details) private function getCreditCardType($type) { $replaced = str_replace(' ', '-', strtolower($type)); - $mapper = $this->config->getCctypesMapper(); + $mapper = $this->config->getCcTypesMapper(); return $mapper[$replaced]; } diff --git a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php index 6ab69923760ce..5c4a1c9598d1d 100644 --- a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php +++ b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php @@ -70,7 +70,7 @@ public function getConfig() self::CODE => [ 'isActive' => $this->config->isActive($storeId), 'clientToken' => $this->getClientToken(), - 'ccTypesMapper' => $this->config->getCctypesMapper(), + 'ccTypesMapper' => $this->config->getCcTypesMapper(), 'sdkUrl' => $this->config->getSdkUrl(), 'countrySpecificCardTypes' => $this->config->getCountrySpecificCardTypeConfig($storeId), 'availableCardTypes' => $this->config->getAvailableCardTypes($storeId), diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php index 7b9d59a5bc482..36ea3aea465dd 100644 --- a/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php +++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php @@ -142,7 +142,7 @@ public function testGetCcTypesMapper($value, $expected) static::assertEquals( $expected, - $this->model->getCctypesMapper() + $this->model->getCcTypesMapper() ); } diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php index 971f34e02f9e5..ffae39cb6ed05 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -826,7 +826,7 @@ public function getResizedImageInfo() $image = $this->imageAsset->getPath(); } - $imageProperties = $this->getimagesize($image); + $imageProperties = $this->getImageSize($image); return $imageProperties; } finally { diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php index ba716fdb53c89..47a60a1916142 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php @@ -58,7 +58,7 @@ protected function getContext() $objectManagerMock = $this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class); $objectManagerMock->expects($this->any()) ->method('get') - ->willreturn($productActionMock); + ->willReturn($productActionMock); $eventManager = $this->getMockBuilder(\Magento\Framework\Event\Manager::class) ->setMethods(['dispatch']) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php index 0a6e8032d484a..d2b03936f4f0f 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -1214,7 +1214,7 @@ protected function _importData() $optionsToRemove = []; foreach ($bunch as $rowNumber => $rowData) { - if (isset($optionId, $valueId) && empty($rowData[PRODUCT::COL_STORE_VIEW_CODE])) { + if (isset($optionId, $valueId) && empty($rowData[Product::COL_STORE_VIEW_CODE])) { $nextOptionId = $optionId; $nextValueId = $valueId; } diff --git a/app/code/Magento/Checkout/Setup/InstallData.php b/app/code/Magento/Checkout/Setup/InstallData.php index 38879e06d65ac..58b118c482307 100644 --- a/app/code/Magento/Checkout/Setup/InstallData.php +++ b/app/code/Magento/Checkout/Setup/InstallData.php @@ -816,7 +816,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $connection->commit(); } catch (\Exception $e) { - $connection->rollback(); + $connection->rollBack(); throw $e; } } diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php index 3f174484df3e1..bd81400f47e74 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php @@ -453,7 +453,7 @@ private function _setUpIsAttributeRequired() */ $this->_block->setForceUseCustomerAttributes(false); $this->_block->setForceUseCustomerRequiredAttributes(true); - $this->_block->setObject(new \StdClass()); + $this->_block->setObject(new \stdClass()); /** * The first call to isRequired() is false so that the second if conditional in the other code path diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php index 029949c5f35b0..71b99586f6fb4 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php @@ -1266,7 +1266,7 @@ public function testGetDataWithVisibleAttributesWithAccountEdit() $helper = new ObjectManager($this); $context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class) ->setMethods(['getRequestParam']) - ->getMockforAbstractClass(); + ->getMockForAbstractClass(); $context->expects($this->any()) ->method('getRequestParam') ->with('request-field-name') diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php index 823f32f46b9a5..bc34c3b6e5d3a 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php @@ -112,7 +112,7 @@ protected function setUp() $this->connectionMock->expects($this->any())->method('quoteIdentifier')->will($this->returnArgument(0)); $this->connectionMock->expects($this->any()) ->method('describeTable') - ->will($this->returnvalueMap( + ->will($this->returnValueMap( [ [ 'some_main_table', diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php index 6854b90a8888c..ce0e1446d216c 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php @@ -165,8 +165,8 @@ protected function _addCustomersData() $customerName = $this->_customerView->getCustomerName($customer); foreach ($problems as $problem) { $problem->setCustomerName($customerName) - ->setCustomerFirstName($customer->getFirstName()) - ->setCustomerLastName($customer->getLastName()); + ->setCustomerFirstName($customer->getFirstname()) + ->setCustomerLastName($customer->getLastname()); } } catch (NoSuchEntityException $e) { // do nothing if customer is not found by id diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php index 3e221047ec40a..0f0a97fd9e983 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php @@ -221,7 +221,7 @@ public function addOnlyForSendingFilter() [\Magento\Newsletter\Model\Queue::STATUS_SENDING, \Magento\Newsletter\Model\Queue::STATUS_NEVER] )->where( 'main_table.queue_start_at < ?', - $this->_date->gmtdate() + $this->_date->gmtDate() )->where( 'main_table.queue_start_at IS NOT NULL' ); diff --git a/app/code/Magento/Payment/Test/Unit/Block/Info/SubstitutionTest.php b/app/code/Magento/Payment/Test/Unit/Block/Info/SubstitutionTest.php index 729da9eb8196d..268d4f39ba634 100644 --- a/app/code/Magento/Payment/Test/Unit/Block/Info/SubstitutionTest.php +++ b/app/code/Magento/Payment/Test/Unit/Block/Info/SubstitutionTest.php @@ -136,7 +136,7 @@ public function testBeforeToHtml() $infoMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($methodMock)); $this->block->setInfo($infoMock); - $fakeBlock = new \StdClass(); + $fakeBlock = new \stdClass(); $this->layout->expects( $this->any() )->method( diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Http/Client/SoapTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Http/Client/SoapTest.php index 546dadfb1bf62..af26ea428a235 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Http/Client/SoapTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Http/Client/SoapTest.php @@ -64,7 +64,7 @@ public function testPlaceRequest() $expectedResult = [ 'result' => [] ]; - $soapResult = new \StdClass(); + $soapResult = new \stdClass(); $this->logger->expects(static::at(0)) ->method('debug') diff --git a/app/code/Magento/Payment/Test/Unit/Model/InfoTest.php b/app/code/Magento/Payment/Test/Unit/Model/InfoTest.php index 3203f1498b9a3..93279f308eefa 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/InfoTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/InfoTest.php @@ -176,7 +176,7 @@ public function testDecrypt() */ public function testSetAdditionalInformationException() { - $this->info->setAdditionalInformation('object', new \StdClass()); + $this->info->setAdditionalInformation('object', new \stdClass()); } /** diff --git a/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php b/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php index 7749377bbfcd0..669728804af1a 100644 --- a/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php +++ b/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php @@ -122,7 +122,7 @@ public function testPreventExpressCheckoutEmpty() $this->_event->setControllerAction(null); $this->_model->execute($this->_observer); - $this->_event->setControllerAction(new \StdClass()); + $this->_event->setControllerAction(new \stdClass()); $this->_model->execute($this->_observer); $expectedActionName = 'realAction'; diff --git a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php index ee0ffd3bcc666..73ed2e65b41a9 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php @@ -94,7 +94,7 @@ public function testCreateEmptyCart() $cartId = 1; $this->quoteIdMaskMock->expects($this->once())->method('setQuoteId')->with($cartId)->willReturnSelf(); $this->quoteIdMaskMock->expects($this->once())->method('save')->willReturnSelf(); - $this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willreturn($maskedCartId); + $this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willReturn($maskedCartId); $this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock); $this->quoteManagementMock->expects($this->once())->method('createEmptyCart')->willReturn($cartId); diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php index 752ab088689c8..fa9676856a442 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php @@ -32,7 +32,7 @@ public function execute() if (!$order->canUnhold()) { throw new \Magento\Framework\Exception\LocalizedException(__('Can\'t unhold order.')); } - $this->orderManagement->unhold($order->getEntityId()); + $this->orderManagement->unHold($order->getEntityId()); $this->messageManager->addSuccess(__('You released the order from holding status.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->messageManager->addError($e->getMessage()); diff --git a/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php b/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php index 2a839dd018dba..492cfee5f5d83 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php @@ -70,10 +70,10 @@ protected function setUp() $this->quoteMock->expects($this->any()) ->method('getBillingAddress') - ->willreturn($this->billingAddressMock); + ->willReturn($this->billingAddressMock); $this->quoteMock->expects($this->any()) ->method('getShippingAddress') - ->willreturn($this->shippingAddressMock); + ->willReturn($this->shippingAddressMock); $this->sessionQuoteMock->expects($this->any())->method('getQuote')->willReturn($this->quoteMock); $this->totals = $this->helperManager->getObject( \Magento\Sales\Block\Adminhtml\Order\Create\Totals::class, @@ -88,7 +88,7 @@ public function testGetTotals($isVirtual) { $expected = 'expected'; $this->quoteMock->expects($this->at(1))->method('collectTotals'); - $this->quoteMock->expects($this->once())->method('isVirtual')->willreturn($isVirtual); + $this->quoteMock->expects($this->once())->method('isVirtual')->willReturn($isVirtual); if ($isVirtual) { $this->billingAddressMock->expects($this->once())->method('getTotals')->willReturn($expected); } else { diff --git a/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php b/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php index 794fc94d6a2a8..3a5ed16fdd2fd 100644 --- a/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php +++ b/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php @@ -239,7 +239,7 @@ public function saveStoreLabels($ruleId, $labels) $connection->delete($table, ['rule_id=?' => $ruleId, 'store_id IN (?)' => $deleteByStoreIds]); } } catch (\Exception $e) { - $connection->rollback(); + $connection->rollBack(); throw $e; } $connection->commit(); diff --git a/app/code/Magento/Shipping/Model/Shipping/Labels.php b/app/code/Magento/Shipping/Model/Shipping/Labels.php index b1709b0a16998..15f0c88a7944a 100644 --- a/app/code/Magento/Shipping/Model/Shipping/Labels.php +++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php @@ -117,8 +117,8 @@ public function requestToShipment(Shipment $orderShipment) ) ); - if (!$admin->getFirstname() - || !$admin->getLastname() + if (!$admin->getFirstName() + || !$admin->getLastName() || !$storeInfo->getName() || !$storeInfo->getPhone() || !$originStreet1 @@ -187,8 +187,8 @@ protected function setShipperDetails( ); $request->setShipperContactPersonName($storeAdmin->getName()); - $request->setShipperContactPersonFirstName($storeAdmin->getFirstname()); - $request->setShipperContactPersonLastName($storeAdmin->getLastname()); + $request->setShipperContactPersonFirstName($storeAdmin->getFirstName()); + $request->setShipperContactPersonLastName($storeAdmin->getLastName()); $request->setShipperContactCompanyName($store->getName()); $request->setShipperContactPhoneNumber($store->getPhone()); $request->setShipperEmail($storeAdmin->getEmail()); diff --git a/app/code/Magento/Store/Test/Unit/Model/Resolver/GroupTest.php b/app/code/Magento/Store/Test/Unit/Model/Resolver/GroupTest.php index 9817bd532c18a..6fade2de934e4 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Resolver/GroupTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Resolver/GroupTest.php @@ -53,7 +53,7 @@ public function testGetScope() */ public function testGetScopeWithInvalidScope() { - $scopeMock = new \StdClass(); + $scopeMock = new \stdClass(); $this->storeManagerMock ->expects($this->once()) ->method('getGroup') diff --git a/app/code/Magento/Store/Test/Unit/Model/Resolver/StoreTest.php b/app/code/Magento/Store/Test/Unit/Model/Resolver/StoreTest.php index 958cfdea37bab..50a043f45bc16 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Resolver/StoreTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Resolver/StoreTest.php @@ -52,7 +52,7 @@ public function testGetScope() */ public function testGetScopeWithInvalidScope() { - $scopeMock = new \StdClass(); + $scopeMock = new \stdClass(); $this->_storeManagerMock ->expects($this->once()) ->method('getStore') diff --git a/app/code/Magento/Store/Test/Unit/Model/Resolver/WebsiteTest.php b/app/code/Magento/Store/Test/Unit/Model/Resolver/WebsiteTest.php index c5b3dbaff99be..5c33090f28eeb 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Resolver/WebsiteTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Resolver/WebsiteTest.php @@ -52,7 +52,7 @@ public function testGetScope() */ public function testGetScopeWithInvalidScope() { - $scopeMock = new \StdClass(); + $scopeMock = new \stdClass(); $this->_storeManagerMock ->expects($this->once()) ->method('getWebsite') diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php index fc27e68c8e55b..707b999c5e467 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php @@ -26,9 +26,9 @@ public function testIsAssignedToObjects() $filterBuilder->expects($this->once())->method('setField')->with( \Magento\Customer\Api\Data\GroupInterface::TAX_CLASS_ID - )->willReturnself(); - $filterBuilder->expects($this->once())->method('setValue')->willReturnself(); - $filterBuilder->expects($this->once())->method('create')->willReturnself(); + )->willReturnSelf(); + $filterBuilder->expects($this->once())->method('setValue')->willReturnSelf(); + $filterBuilder->expects($this->once())->method('create')->willReturnSelf(); $filterGroupBuilder = $this->createMock(\Magento\Framework\Api\Search\FilterGroupBuilder::class); $searchCriteriaBuilder = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaBuilder::class) diff --git a/app/code/Magento/Theme/Test/Unit/Console/Command/ThemeUninstallCommandTest.php b/app/code/Magento/Theme/Test/Unit/Console/Command/ThemeUninstallCommandTest.php index 2ae889e69bb12..36daf7d4aff48 100644 --- a/app/code/Magento/Theme/Test/Unit/Console/Command/ThemeUninstallCommandTest.php +++ b/app/code/Magento/Theme/Test/Unit/Console/Command/ThemeUninstallCommandTest.php @@ -8,7 +8,7 @@ use Magento\Framework\App\Console\MaintenanceModeEnabler; use Magento\Theme\Console\Command\ThemeUninstallCommand; -use Magento\Theme\Model\Theme\themePackageInfo; +use Magento\Theme\Model\Theme\ThemePackageInfo; use Magento\Theme\Model\Theme\ThemeUninstaller; use Magento\Theme\Model\Theme\ThemeDependencyChecker; use Symfony\Component\Console\Tester\CommandTester; diff --git a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php index d5919db5edcba..bbcaa87acb9c3 100644 --- a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php +++ b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php @@ -63,22 +63,22 @@ public function testExecuteWithoutTheme() ->expects($this->at(0)) ->method('get') ->with(\Magento\Theme\Model\Uploader\Service::class) - ->WillReturn($this->serviceModel); + ->willReturn($this->serviceModel); $this->_objectManagerMock ->expects($this->at(1)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class) - ->WillReturn($this->themeFactory); + ->willReturn($this->themeFactory); $this->_objectManagerMock ->expects($this->at(2)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class) - ->WillReturn($this->customizationJs); + ->willReturn($this->customizationJs); $this->_objectManagerMock ->expects($this->at(3)) ->method('get') ->with(\Magento\Framework\Json\Helper\Data::class) - ->WillReturn($this->jsonHelper); + ->willReturn($this->jsonHelper); $this->themeFactory->expects($this->once()) ->method('create') @@ -107,21 +107,21 @@ public function testExecuteWithException() $this->_objectManagerMock->expects($this->at(0)) ->method('get') ->with(\Magento\Theme\Model\Uploader\Service::class) - ->WillReturn($this->serviceModel); + ->willReturn($this->serviceModel); $this->_objectManagerMock->expects($this->at(1)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class) - ->WillReturn($this->themeFactory); + ->willReturn($this->themeFactory); $this->_objectManagerMock ->expects($this->at(2)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class) - ->WillReturn($this->customizationJs); + ->willReturn($this->customizationJs); $this->_objectManagerMock ->expects($this->at(4)) ->method('get') ->with(\Magento\Framework\Json\Helper\Data::class) - ->WillReturn($this->jsonHelper); + ->willReturn($this->jsonHelper); $this->themeFactory->expects($this->once()) ->method('create') @@ -172,19 +172,19 @@ public function testExecute() $this->_objectManagerMock->expects($this->at(0)) ->method('get') ->with(\Magento\Theme\Model\Uploader\Service::class) - ->WillReturn($this->serviceModel); + ->willReturn($this->serviceModel); $this->_objectManagerMock->expects($this->at(1)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class) - ->WillReturn($this->themeFactory); + ->willReturn($this->themeFactory); $this->_objectManagerMock->expects($this->at(2)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class) - ->WillReturn($this->customizationJs); + ->willReturn($this->customizationJs); $this->_objectManagerMock->expects($this->at(4)) ->method('get') ->with(\Magento\Framework\Json\Helper\Data::class) - ->WillReturn($this->jsonHelper); + ->willReturn($this->jsonHelper); $this->themeFactory->expects($this->once()) ->method('create') diff --git a/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php b/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php index ff0873c369075..28bfe34a05733 100644 --- a/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php +++ b/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php @@ -330,7 +330,7 @@ public function testDeleteFromRole() $roleId = 44; $methodUserMock->expects($this->once())->method('getUserId')->willReturn($uid); $this->resourceMock->expects($this->atLeastOnce())->method('getConnection')->willReturn($this->dbAdapterMock); - $methodUserMock->expects($this->atleastOnce())->method('getRoleId')->willReturn($roleId); + $methodUserMock->expects($this->atLeastOnce())->method('getRoleId')->willReturn($roleId); $this->dbAdapterMock->expects($this->once())->method('delete'); $this->assertInstanceOf( diff --git a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php index 1e2947084ee6b..4b04507dcedc0 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php @@ -135,7 +135,7 @@ public function testCreateFilesystemDriverPool() ); /** @var \Magento\Framework\Filesystem\DriverPool $result */ $this->assertInstanceOf(\Magento\Framework\Filesystem\DriverPool::class, $result); - $this->assertInstanceof($driverClass, $result->getDriver('custom')); + $this->assertInstanceOf($driverClass, $result->getDriver('custom')); } public function testGetParams() diff --git a/lib/internal/Magento/Framework/App/Test/Unit/StaticResourceTest.php b/lib/internal/Magento/Framework/App/Test/Unit/StaticResourceTest.php index 3074a951159b8..618b67663304a 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/StaticResourceTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/StaticResourceTest.php @@ -271,7 +271,7 @@ public function testLaunchPathAbove() { $this->stateMock->expects($this->once()) ->method('getMode') - ->willreturn(State::MODE_DEVELOPER); + ->willReturn(State::MODE_DEVELOPER); $this->requestMock->expects($this->once()) ->method('get') ->with('resource') diff --git a/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php b/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php index 801d99373bc50..15ceb0c6c2755 100644 --- a/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php +++ b/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php @@ -69,7 +69,7 @@ function ($input, $buffer) { $buffer->writeln($output); } ); - $composerApp->Expects($this->at(6))->method('run')->willReturnCallback( + $composerApp->expects($this->at(6))->method('run')->willReturnCallback( function ($input, $buffer) { $output = 'magento/package-d requires magento/package-c (1.0)' . PHP_EOL . 'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL; diff --git a/lib/internal/Magento/Framework/Config/Composer/Package.php b/lib/internal/Magento/Framework/Config/Composer/Package.php index a8ff6ac724c3f..5e75f0be4b104 100644 --- a/lib/internal/Magento/Framework/Config/Composer/Package.php +++ b/lib/internal/Magento/Framework/Config/Composer/Package.php @@ -83,7 +83,7 @@ public function get($propertyPath, $filter = null) * @param int $index * @return mixed */ - private function traverseGet(\StdClass $json, array $chain, $index = 0) + private function traverseGet(\stdClass $json, array $chain, $index = 0) { $property = $chain[$index]; if (!property_exists($json, $property)) { diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Router/Route/FactoryTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Router/Route/FactoryTest.php index 87adadbd34e3b..2b53541022505 100644 --- a/lib/internal/Magento/Framework/Controller/Test/Unit/Router/Route/FactoryTest.php +++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Router/Route/FactoryTest.php @@ -69,7 +69,7 @@ public function testCreateRouteNegative() { $this->objectManager->expects($this->once()) ->method('create') - ->will($this->returnValue(new \StdClass())); + ->will($this->returnValue(new \stdClass())); $object = new Factory($this->objectManager); $object->createRoute( diff --git a/lib/internal/Magento/Framework/File/Size.php b/lib/internal/Magento/Framework/File/Size.php index 6f48024f71c16..c259069637293 100644 --- a/lib/internal/Magento/Framework/File/Size.php +++ b/lib/internal/Magento/Framework/File/Size.php @@ -36,7 +36,7 @@ class Size */ public function getPostMaxSize() { - return $this->_iniget('post_max_size'); + return $this->_iniGet('post_max_size'); } /** @@ -46,7 +46,7 @@ public function getPostMaxSize() */ public function getUploadMaxSize() { - return $this->_iniget('upload_max_filesize'); + return $this->_iniGet('upload_max_filesize'); } /** diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/DriverPoolTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/DriverPoolTest.php index 8e550ff0597d7..1aaedbc475446 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/DriverPoolTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/DriverPoolTest.php @@ -38,6 +38,6 @@ public function testCustomDriver() */ public function testCustomDriverException() { - new DriverPool(['custom' => new \StdClass()]); + new DriverPool(['custom' => new \stdClass()]); } } diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php index a36e41a526466..33d73768b3b07 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php +++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php @@ -106,7 +106,7 @@ protected function _getImageNeedMemorySize($file) } return round( - ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + Pow(2, 16)) * 1.65 + ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + pow(2, 16)) * 1.65 ); } @@ -426,7 +426,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = imagecolortransparent($newWatermark, $col); imagefilledrectangle($newWatermark, 0, 0, $this->getWatermarkWidth(), $this->getWatermarkHeight(), $col); imagealphablending($newWatermark, true); - imageSaveAlpha($newWatermark, true); + imagesavealpha($newWatermark, true); imagecopyresampled( $newWatermark, $watermark, @@ -451,7 +451,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = imagecolortransparent($newWatermark, $col); imagefilledrectangle($newWatermark, 0, 0, $this->_imageSrcWidth, $this->_imageSrcHeight, $col); imagealphablending($newWatermark, true); - imageSaveAlpha($newWatermark, true); + imagesavealpha($newWatermark, true); imagecopyresampled( $newWatermark, $watermark, @@ -669,7 +669,7 @@ private function imageDestroy() private function _saveAlpha($imageHandler) { $background = imagecolorallocate($imageHandler, 0, 0, 0); - ImageColorTransparent($imageHandler, $background); + imagecolortransparent($imageHandler, $background); imagealphablending($imageHandler, false); imagesavealpha($imageHandler, true); } diff --git a/lib/internal/Magento/Framework/Indexer/Action/Base.php b/lib/internal/Magento/Framework/Indexer/Action/Base.php index 11cf1cec62636..636335192cbc5 100644 --- a/lib/internal/Magento/Framework/Indexer/Action/Base.php +++ b/lib/internal/Magento/Framework/Indexer/Action/Base.php @@ -221,7 +221,7 @@ protected function prepareDataSource(array $ids = []) { return !count($ids) ? $this->createResultCollection() - : $this->createResultCollection()->addFieldToFilter($this->getPrimaryResource()->getIdFieldname(), $ids); + : $this->createResultCollection()->addFieldToFilter($this->getPrimaryResource()->getIdFieldName(), $ids); } /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Factory/FactoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Factory/FactoryTest.php index 8deb2750653e7..25a49074c1ad3 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Factory/FactoryTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Factory/FactoryTest.php @@ -37,7 +37,7 @@ protected function setUp() public function testCreateNoArgs() { - $this->assertInstanceOf('StdClass', $this->factory->create(\StdClass::class)); + $this->assertInstanceOf('StdClass', $this->factory->create(\stdClass::class)); } /** diff --git a/lib/internal/Magento/Framework/RequireJs/Config.php b/lib/internal/Magento/Framework/RequireJs/Config.php index 08131b2cccea3..ae45e29f38911 100644 --- a/lib/internal/Magento/Framework/RequireJs/Config.php +++ b/lib/internal/Magento/Framework/RequireJs/Config.php @@ -157,7 +157,7 @@ public function getConfig() $customConfigFiles = $this->fileSource->getFiles($this->design->getDesignTheme(), self::CONFIG_FILE_NAME); foreach ($customConfigFiles as $file) { /** @var $fileReader \Magento\Framework\Filesystem\File\Read */ - $fileReader = $this->readFactory->create($file->getFileName(), DriverPool::FILE); + $fileReader = $this->readFactory->create($file->getFilename(), DriverPool::FILE); $config = $fileReader->readAll($file->getName()); $distributedConfig .= str_replace( ['%config%', '%context%'], diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php index 5012c6a47f1c5..f90b1b2c3fd15 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeFormatterTest.php @@ -133,6 +133,6 @@ public function testFormatObjectIfPassedWrongFormat() $reflectionProperty = $reflection->getProperty('localeResolver'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($dateTimeFormatter, $this->localeResolverMock); - $dateTimeFormatter->formatObject(new \DateTime('2013-06-06 17:05:06 Europe/Dublin'), new \StdClass()); + $dateTimeFormatter->formatObject(new \DateTime('2013-06-06 17:05:06 Europe/Dublin'), new \stdClass()); } } diff --git a/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php b/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php index 9721cdb8f9331..52dd39cb7a558 100644 --- a/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php +++ b/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php @@ -16,7 +16,7 @@ public function testMatches() 'ValidMethodName', [], 'void', - new \StdClass() + new \stdClass() ); $matcher = new \Magento\Framework\TestFramework\Unit\Matcher\MethodInvokedAtIndex(0); $this->assertTrue($matcher->matches($invocationObject)); diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php index 17a320164dad3..9ba7833a355d7 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php @@ -75,7 +75,7 @@ public function collectFiles($searchPattern = null) } $files = $this->collectorAggregated->getFiles($this->design->getDesignTheme(), $searchPattern); foreach ($files as $file) { - $fullFileName = $file->getFileName(); + $fullFileName = $file->getFilename(); $fileDir = dirname($fullFileName); $fileName = basename($fullFileName); $dirRead = $this->readFactory->create($fileDir); diff --git a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php index 06b00afe42ad9..5be878720620b 100644 --- a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php +++ b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php @@ -663,7 +663,7 @@ public function getFileLayoutUpdatesXml() $result = $this->_loadXmlString($result); } else { $result = $this->_loadFileLayoutUpdatesXml(); - $this->_saveCache($result->asXml(), $cacheId); + $this->_saveCache($result->asXML(), $cacheId); } $this->layoutUpdatesCache = $result; return $result; diff --git a/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php b/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php index a596b85decff9..510da2b1b1ca9 100644 --- a/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php +++ b/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php @@ -147,6 +147,6 @@ private function setMetadata($pageConfigStructure, $node) $metadataName = $node->getAttribute('name'); } - $pageConfigStructure->setMetaData($metadataName, $node->getAttribute('content')); + $pageConfigStructure->setMetadata($metadataName, $node->getAttribute('content')); } } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php index 4515a29c65e4f..909748722a081 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php @@ -57,7 +57,7 @@ public function testIsCurrentIfIsset() /** @var \Magento\Framework\View\Element\Html\Link\Current $link */ $link = $this->_objectManager->getObject(\Magento\Framework\View\Element\Html\Link\Current::class); $link->setCurrent(true); - $this->assertTrue($link->IsCurrent()); + $this->assertTrue($link->isCurrent()); } public function testIsCurrent() diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Message/MessageConfigurationsPoolTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Message/MessageConfigurationsPoolTest.php index 1330f0563fc71..406036ed808b9 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Message/MessageConfigurationsPoolTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Message/MessageConfigurationsPoolTest.php @@ -54,7 +54,7 @@ public function wrongRenderersDataProvider() return [ [['message_identifier' => []]], [['message_identifier' => ['renderer' => 5]]], - [['message_identifier' => ['renderer' => new \StdClass]]], + [['message_identifier' => ['renderer' => new \stdClass]]], ]; } @@ -87,7 +87,7 @@ public function wrongDataDataProvider() [ [ 'message_identifier' => - ['renderer' => 'RendererCode', 'data' => new \StdClass] + ['renderer' => 'RendererCode', 'data' => new \stdClass] ] ], ]; diff --git a/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php b/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php index c0300164e26fe..f8a8939bbfe36 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php @@ -273,7 +273,7 @@ public function testGenerateXml() ->with($this->equalTo([])) ->will($this->returnSelf()); $this->assertSame($this->model, $this->model->generateXml()); - $this->assertSame('<some_update>123</some_update>', $this->model->getNode('some_update')->asXml()); + $this->assertSame('<some_update>123</some_update>', $this->model->getNode('some_update')->asXML()); } public function testGetChildBlock() diff --git a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php index c2bdafa8df82e..2c4967c4c2ffd 100644 --- a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php +++ b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php @@ -286,7 +286,7 @@ private function checkPopulateRawPostSetting() $data = []; $error = false; - $iniSetting = intVal(ini_get('always_populate_raw_post_data')); + $iniSetting = intval(ini_get('always_populate_raw_post_data')); $checkVersionConstraint = $this->versionParser->parseConstraints('~5.6.0'); $normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion(PHP_VERSION); @@ -302,7 +302,7 @@ private function checkPopulateRawPostSetting() Please open your php.ini file and set always_populate_raw_post_data to -1. If you need more help please call your hosting provider.', PHP_VERSION, - intVal(ini_get('always_populate_raw_post_data')) + intval(ini_get('always_populate_raw_post_data')) ); $data['always_populate_raw_post_data'] = [ From 0e9ed86353874d6fa8c9c5bbec2612bfeba5583c Mon Sep 17 00:00:00 2001 From: Leandro Ferraz Luvisotto <l.luvisotto@youwe.nl> Date: Mon, 18 Jun 2018 16:36:54 +0200 Subject: [PATCH 10/20] PHPDoc --- .../System/Message/CacheOutdatedTest.php | 6 +++ .../Media/Synchronization/ErrorTest.php | 3 ++ .../Model/System/Message/SecurityTest.php | 3 ++ .../Validator/TierPriceTest.php | 6 +++ .../AdvancedPricing/Validator/WebsiteTest.php | 3 ++ .../Import/AdvancedPricing/ValidatorTest.php | 3 ++ .../Unit/Model/Import/AdvancedPricingTest.php | 9 +++++ .../Test/Unit/Model/Acl/AclRetrieverTest.php | 3 ++ .../Unit/Model/Directpost/ResponseTest.php | 11 ++++++ .../App/Action/Plugin/AuthenticationTest.php | 3 ++ .../App/Action/Plugin/MassactionKeyTest.php | 3 ++ .../Test/Unit/App/Action/Stub/ActionStub.php | 3 ++ .../Unit/App/Area/FrontNameResolverTest.php | 3 ++ .../Backend/Test/Unit/App/ConfigTest.php | 3 ++ .../Test/Unit/Block/AnchorRendererTest.php | 3 ++ .../Test/Unit/Block/Cache/AdditionalTest.php | 3 ++ .../Test/Unit/Block/GlobalSearchTest.php | 3 ++ .../Test/Unit/Block/MenuItemCheckerTest.php | 3 ++ .../Test/Unit/Block/Widget/ButtonTest.php | 3 ++ .../Column/Renderer/Radio/ExtendedTest.php | 3 ++ .../Widget/Grid/Column/Renderer/RadioTest.php | 3 ++ .../Unit/Block/Widget/Grid/ColumnTest.php | 6 +++ .../Widget/Grid/Massaction/ExtendedTest.php | 3 ++ .../Unit/Block/Widget/Grid/MassactionTest.php | 3 ++ .../Test/Unit/Block/Widget/TabTest.php | 3 ++ .../Backend/Test/Unit/Helper/DataTest.php | 3 ++ .../Test/Unit/Model/Auth/SessionTest.php | 9 +++++ .../SessionLifetime/BackendModelTest.php | 3 ++ .../Test/Unit/Model/Menu/ConfigTest.php | 3 ++ .../Unit/Model/Menu/Item/ValidatorTest.php | 6 +++ .../Test/Unit/Model/MenuBuilderTest.php | 3 ++ .../Unit/Model/Session/AdminConfigTest.php | 3 ++ .../Unit/Model/Widget/Grid/ParserTest.php | 3 ++ .../Sales/Order/Items/RendererTest.php | 21 ++++++++++ .../Sales/Order/View/Items/RendererTest.php | 18 +++++++++ .../Catalog/Product/View/Type/BundleTest.php | 10 +++++ .../Block/Sales/Order/Items/RendererTest.php | 21 ++++++++++ .../Order/Pdf/Items/AbstractItemsTest.php | 24 ++++++++++++ .../Pricing/Adjustment/CalculatorTest.php | 3 ++ .../Unit/Pricing/Price/BundleOptionsTest.php | 3 ++ .../Price/BundleSelectionPriceTest.php | 6 +++ .../Product/BundleDataProviderTest.php | 3 ++ .../Test/Unit/Model/PurgeCacheTest.php | 3 ++ .../Captcha/Test/Unit/Model/DefaultTest.php | 3 ++ .../Adminhtml/Product/Edit/Tab/AlertsTest.php | 3 ++ .../Product/Helper/Form/CategoryTest.php | 3 ++ .../Test/Unit/Block/Category/Rss/LinkTest.php | 6 +++ .../Block/Product/ProductList/RelatedTest.php | 3 ++ .../Block/Product/ProductList/ToolbarTest.php | 3 ++ .../Unit/Block/Product/View/GalleryTest.php | 3 ++ .../Block/Rss/Product/NewProductsTest.php | 6 +++ .../Unit/Block/Rss/Product/SpecialTest.php | 3 ++ .../Adminhtml/Category/Image/UploadTest.php | 3 ++ .../Product/Attribute/ValidateTest.php | 3 ++ .../Unit/Model/Attribute/Config/XsdTest.php | 3 ++ .../Category/Attribute/Backend/ImageTest.php | 3 ++ .../Category/Attribute/Backend/SortbyTest.php | 15 ++++++++ .../Unit/Model/CategoryRepositoryTest.php | 3 ++ .../Catalog/Test/Unit/Model/CategoryTest.php | 9 +++++ .../Flat/Plugin/IndexerConfigDataTest.php | 3 ++ .../Model/Indexer/Category/Flat/StateTest.php | 3 ++ .../Category/Flat/System/Config/ModeTest.php | 9 +++++ .../Product/Plugin/StoreGroupTest.php | 3 ++ .../Product/Eav/AbstractActionTest.php | 3 ++ .../Indexer/Product/Flat/ProcessorTest.php | 6 +++ .../Product/Flat/System/Config/ModeTest.php | 9 +++++ .../Filter/DataProvider/CategoryTest.php | 3 ++ .../Layer/Filter/DataProvider/PriceTest.php | 3 ++ .../Test/Unit/Model/Product/ActionTest.php | 3 ++ .../Model/Product/CartConfigurationTest.php | 3 ++ .../Model/Product/Gallery/ProcessorTest.php | 3 ++ .../Model/Product/LinkTypeProviderTest.php | 3 ++ .../Product/Option/Validator/SelectTest.php | 6 +++ .../Model/Product/ProductList/ToolbarTest.php | 6 +++ .../Product/ReservedAttributeListTest.php | 3 ++ .../Model/Product/TierPriceManagementTest.php | 6 +++ .../Model/Product/Type/AbstractTypeTest.php | 3 ++ .../Test/Unit/Model/Product/UrlTest.php | 3 ++ .../Test/Unit/Model/ProductRepositoryTest.php | 6 +++ .../Catalog/Test/Unit/Model/ProductTest.php | 6 +++ .../Unit/Model/ProductTypes/ConfigTest.php | 3 ++ .../Test/Unit/Model/View/Asset/ImageTest.php | 3 ++ .../Unit/Model/View/Asset/PlaceholderTest.php | 3 ++ .../Test/Unit/Pricing/Price/BasePriceTest.php | 3 ++ .../Pricing/Price/CustomOptionPriceTest.php | 10 +++++ .../Price/MinimalTierPriceCalculatorTest.php | 3 ++ .../Test/Unit/Pricing/Price/TierPriceTest.php | 3 ++ .../Unit/Pricing/Render/FinalPriceBoxTest.php | 3 ++ .../Test/Unit/Pricing/Render/PriceBoxTest.php | 3 ++ .../CatalogEavValidationRulesTest.php | 3 ++ .../Import/Product/CategoryProcessorTest.php | 3 ++ .../Import/Product/Type/AbstractTypeTest.php | 3 ++ .../Product/Validator/TierPriceTest.php | 5 +++ .../Test/Unit/Model/Import/ProductTest.php | 15 ++++++++ .../Test/Unit/Model/Import/UploaderTest.php | 6 +++ .../Test/Unit/Helper/StockTest.php | 3 ++ .../Unit/Model/Plugin/ProductLinksTest.php | 3 ++ .../Initializer/QuantityValidatorTest.php | 7 ++++ .../Unit/Model/Spi/StockStateProviderTest.php | 32 ++++++++++++++++ .../Test/Unit/Model/Stock/ItemTest.php | 3 ++ .../Test/Unit/Model/StockTest.php | 5 ++- .../Form/Element/UseConfigSettingsTest.php | 3 ++ .../Unit/Model/Product/PriceModifierTest.php | 3 ++ .../MappableConditionProcessorTest.php | 11 ++++++ .../Adapter/Mysql/Filter/PreprocessorTest.php | 3 ++ .../Test/Unit/Model/AdvancedTest.php | 11 ++++++ .../Model/Autocomplete/DataProviderTest.php | 3 ++ .../ResourceModel/Fulltext/CollectionTest.php | 9 +++++ .../BaseSelectStrategy/StrategyMapperTest.php | 3 ++ .../Search/CustomAttributeFilterCheckTest.php | 3 ++ .../Search/Indexer/IndexStructureTest.php | 13 +++++++ .../QueryChecker/FullTextSearchCheckTest.php | 15 ++++++++ .../Model/Search/RequestGeneratorTest.php | 5 +++ .../SelectContainerBuilderTest.php | 6 +++ .../Unit/Model/Search/TableMapperTest.php | 15 ++++++++ .../Form/Modifier/ProductUrlRewriteTest.php | 3 ++ .../Unit/Block/Product/ProductsListTest.php | 3 ++ .../Test/Unit/Block/Cart/AbstractCartTest.php | 3 ++ .../Test/Unit/Block/Cart/LinkTest.php | 3 ++ .../Checkout/Test/Unit/Block/LinkTest.php | 3 ++ .../Test/Unit/Block/Onepage/SuccessTest.php | 3 ++ .../Test/Unit/Controller/Stub/OnepageStub.php | 3 ++ .../Checkout/Test/Unit/Model/CartTest.php | 3 ++ .../Model/Session/SuccessValidatorTest.php | 5 +++ .../Checkout/Test/Unit/Model/SidebarTest.php | 3 ++ .../Test/Unit/Model/Type/OnepageTest.php | 6 +++ .../Adminhtml/Block/Widget/ChooserTest.php | 3 ++ .../Adminhtml/Page/Widget/ChooserTest.php | 3 ++ .../Magento/Cms/Test/Unit/Helper/PageTest.php | 6 +++ .../Test/Unit/Helper/Wysiwyg/ImagesTest.php | 9 +++++ .../ResourceModel/Block/CollectionTest.php | 3 ++ .../ResourceModel/Page/CollectionTest.php | 3 ++ .../Test/Unit/Model/Wysiwyg/ConfigTest.php | 3 ++ .../Unit/Observer/NoCookiesObserverTest.php | 3 ++ .../Unit/Block/System/Config/DwstreeTest.php | 3 ++ .../Form/Field/Select/AllowspecificTest.php | 3 ++ .../Fieldset/Modules/DisableOutputTest.php | 3 ++ .../Unit/Block/System/Config/FormTest.php | 6 +++ .../Config/Backend/Email/AddressTest.php | 3 ++ .../Model/Config/Backend/Email/SenderTest.php | 3 ++ .../Model/Config/Backend/SerializedTest.php | 6 +++ .../Config/Structure/AbstractElementTest.php | 6 +++ .../Element/Dependency/FieldTest.php | 9 +++++ .../Element/Dependency/MapperTest.php | 3 ++ .../Config/Structure/Element/IteratorTest.php | 3 ++ .../Config/Structure/Mapper/ExtendsTest.php | 15 ++++++++ .../Helper/RelativePathConverterTest.php | 6 +++ .../Test/Unit/Model/Config/StructureTest.php | 6 +++ .../Model/Placeholder/EnvironmentTest.php | 3 ++ .../Import/Product/Type/ConfigurableTest.php | 3 ++ .../Product/Steps/SelectAttributesTest.php | 3 ++ .../Model/Attribute/LockValidatorTest.php | 5 +++ .../Test/Unit/Model/OptionRepositoryTest.php | 3 ++ .../HideUnsupportedAttributeTypesTest.php | 21 ++++++++++ .../Test/Unit/Controller/Index/PostTest.php | 3 ++ .../Test/Unit/Controller/Stub/IndexStub.php | 3 ++ .../Cookie/Test/Unit/Helper/CookieTest.php | 3 ++ .../Unit/Model/System/CurrencysymbolTest.php | 3 ++ .../Block/Account/AuthenticationPopupTest.php | 3 ++ .../Test/Unit/Block/Account/CustomerTest.php | 3 ++ .../Unit/Block/Account/Dashboard/InfoTest.php | 3 ++ .../Edit/Tab/View/Grid/Renderer/ItemTest.php | 7 ++++ .../Test/Unit/Block/Widget/NameTest.php | 3 ++ .../Controller/Account/CreatePostTest.php | 3 ++ .../Unit/Controller/Address/FormPostTest.php | 3 ++ .../Adminhtml/Index/InlineEditTest.php | 3 ++ .../Test/Unit/Controller/Section/LoadTest.php | 3 ++ .../Plugin/SessionCheckerTest.php | 3 ++ .../Customer/Test/Unit/Helper/AddressTest.php | 15 ++++++++ .../Unit/Model/Address/Config/XsdTest.php | 3 ++ .../Test/Unit/Model/AttributeCheckerTest.php | 3 ++ .../Test/Unit/Model/AuthenticationTest.php | 3 ++ .../Attribute/Backend/PasswordTest.php | 3 ++ .../Unit/Model/Customer/DataProviderTest.php | 3 ++ .../Test/Unit/Model/FileProcessorTest.php | 6 +++ .../Model/Metadata/Form/AbstractDataTest.php | 15 ++++++++ .../Unit/Model/Metadata/Form/BooleanTest.php | 3 ++ .../Unit/Model/Metadata/Form/DateTest.php | 6 +++ .../Unit/Model/Metadata/Form/FileTest.php | 15 ++++++++ .../Model/Metadata/Form/MultilineTest.php | 6 +++ .../Unit/Model/Metadata/Form/SelectTest.php | 9 +++++ .../Unit/Model/Metadata/Form/TextTest.php | 9 +++++ .../Unit/Model/Metadata/ValidatorTest.php | 3 ++ .../Test/Unit/Model/Renderer/RegionTest.php | 3 ++ .../Unit/Model/ResourceModel/AddressTest.php | 14 +++++++ .../Group/Grid/ServiceCollectionTest.php | 3 ++ .../Observer/AfterAddressSaveObserverTest.php | 6 +++ .../Command/App/ConfigStatusCommandTest.php | 3 ++ .../Unit/Service/DeployStaticContentTest.php | 3 ++ .../Developer/Test/Unit/Helper/DataTest.php | 3 ++ .../Decorator/DebugHintsTest.php | 3 ++ .../Unit/Model/Currency/Import/ConfigTest.php | 9 +++++ .../Test/Unit/Model/PriceCurrencyTest.php | 15 ++++++++ .../Unit/Block/Catalog/Product/LinksTest.php | 6 +++ .../Helper/Plugin/DownloadableTest.php | 3 ++ .../Test/Unit/Helper/DownloadTest.php | 13 +++++++ .../Test/Unit/Model/LinkRepositoryTest.php | 4 ++ .../Observer/SetLinkStatusObserverTest.php | 3 ++ .../Test/Unit/_files/download_mock.php | 6 +++ .../Test/Unit/Model/AttributeFactoryTest.php | 6 +++ .../Unit/Model/CustomAttributesMapperTest.php | 3 ++ .../Unit/Model/Entity/AbstractEntityTest.php | 6 +++ .../Attribute/Backend/ArrayBackendTest.php | 3 ++ .../Entity/Attribute/Source/TableTest.php | 6 +++ .../Test/Unit/Model/Entity/AttributeTest.php | 6 +++ .../Collection/AbstractCollectionTest.php | 6 +++ .../VersionControl/AbstractCollectionTest.php | 3 ++ .../Model/Entity/Increment/AlphanumTest.php | 3 ++ .../Model/Entity/Increment/NumericTest.php | 3 ++ .../Attribute/CollectionTest.php | 3 ++ .../ResourceModel/AttributeLoaderTest.php | 3 ++ .../Model/ResourceModel/ReadHandlerTest.php | 3 ++ .../Test/Unit/Model/AbstractTemplateTest.php | 3 ++ .../Unit/Model/Template/Config/XsdTest.php | 3 ++ .../Test/Unit/Model/Template/ConfigTest.php | 9 +++++ .../Email/Test/Unit/Model/TemplateTest.php | 15 ++++++++ .../Renderer/Actions/ItemIdProcessorTest.php | 3 ++ .../Test/Unit/Helper/DataTest.php | 3 ++ .../Unit/Model/Filter/UppercaseTitleTest.php | 3 ++ .../SetConversionValueObserverTest.php | 6 +++ .../Import/Product/Type/Grouped/LinksTest.php | 12 ++++++ .../Block/Product/View/Type/GroupedTest.php | 3 ++ .../ProductLinks/Plugin/GroupedTest.php | 6 +++ .../Unit/Pricing/Price/FinalPriceTest.php | 5 +++ .../GroupedProductDataProviderTest.php | 3 ++ .../Test/Unit/Model/Export/ConfigTest.php | 9 +++++ .../Test/Unit/Model/Import/ConfigTest.php | 6 +++ .../Test/Unit/Model/Import/Source/ZipTest.php | 3 ++ .../Indexer/Test/Unit/App/IndexerTest.php | 3 ++ .../Grid/Column/Renderer/ScheduledTest.php | 3 ++ .../Grid/Column/Renderer/StatusTest.php | 3 ++ .../Grid/Column/Renderer/UpdatedTest.php | 3 ++ .../Indexer/Test/Unit/Model/IndexerTest.php | 3 ++ .../ResourceModel/AbstractResourceTest.php | 3 ++ .../DataProvider/Indexer/DataCollection.php | 7 ++++ .../Controller/Button/PlaceOrder.php | 12 ++++++ .../DeferredShippingMethodChooserPool.php | 10 +++++ .../Integration/Edit/Tab/WebapiTest.php | 6 +++ .../Widget/Grid/Column/Renderer/NameTest.php | 3 ++ .../Integration/Test/Unit/Helper/DataTest.php | 3 ++ .../Test/Unit/Helper/Oauth/ConsumerTest.php | 5 +++ .../Integration/Test/Unit/Oauth/OauthTest.php | 38 +++++++++++++++++++ .../Test/Unit/Block/NavigationTest.php | 3 ++ .../MediaStorage/Test/Unit/App/MediaTest.php | 3 ++ .../Test/Unit/Helper/File/MediaTest.php | 3 ++ .../Unit/Helper/File/Storage/DatabaseTest.php | 18 +++++++++ .../Test/Unit/Helper/File/StorageTest.php | 6 +++ .../Block/Checkout/Address/SelectTest.php | 3 ++ .../Checkout/Address/NewShippingTest.php | 3 ++ .../NewRelicReporting/Plugin/StatePlugin.php | 9 +++++ .../Test/Unit/Model/Apm/DeploymentsTest.php | 3 ++ .../Test/Unit/Model/Module/CollectTest.php | 3 ++ .../ReportProductSavedToNewRelicTest.php | 3 ++ .../Test/Unit/Model/SubscriberTest.php | 3 ++ .../Test/Unit/Model/TemplateTest.php | 3 ++ .../Unit/Model/CheckmoConfigProviderTest.php | 3 ++ .../Model/InstructionsConfigProviderTest.php | 3 ++ .../Checkout/Block/Cart/ShippingTest.php | 3 ++ .../Carrier/Tablerate/CSV/RowParserTest.php | 3 ++ .../Unit/Model/SalesRule/CalculatorTest.php | 3 ++ .../Test/Unit/Block/JavascriptTest.php | 6 +++ .../Test/Unit/Controller/Block/EsiTest.php | 3 ++ .../App/FrontController/BuiltinPluginTest.php | 3 ++ .../Unit/Model/App/PageCachePluginTest.php | 3 ++ .../Model/App/Response/HttpPluginTest.php | 3 ++ .../Test/Unit/Model/Cache/ServerTest.php | 3 ++ .../Unit/Model/Layout/LayoutPluginTest.php | 6 +++ .../Unit/Observer/FlushCacheByTagsTest.php | 3 ++ .../Payment/Test/Unit/Block/InfoTest.php | 3 ++ .../Gateway/Data/Order/AddressAdapterTest.php | 6 +++ .../Gateway/Data/Quote/AddressAdapterTest.php | 6 +++ .../Validator/CountryValidatorTest.php | 6 +++ .../Unit/Gateway/Validator/ResultTest.php | 3 ++ .../Payment/Test/Unit/Helper/DataTest.php | 3 ++ .../Model/Cart/SalesModel/FactoryTest.php | 3 ++ .../Unit/Model/Cart/SalesModel/OrderTest.php | 3 ++ .../Unit/Model/Cart/SalesModel/QuoteTest.php | 6 +++ .../Payment/Test/Unit/Model/ConfigTest.php | 3 ++ .../System/Config/Field/CountryTest.php | 3 ++ .../System/Config/Fieldset/GroupTest.php | 3 ++ .../System/Config/Fieldset/PaymentTest.php | 3 ++ .../Test/Unit/Block/Express/ReviewTest.php | 3 ++ .../Controller/Express/PlaceOrderTest.php | 6 +++ .../Controller/Express/ReturnActionTest.php | 3 ++ .../Unit/Controller/Express/StartTest.php | 3 ++ .../Paypal/Test/Unit/Helper/BackendTest.php | 6 +++ .../Test/Unit/Model/AbstractConfigTest.php | 3 ++ .../Paypal/Test/Unit/Model/Api/NvpTest.php | 3 ++ .../Paypal/Test/Unit/Model/CartTest.php | 9 +++++ .../Structure/PaymentSectionModifierTest.php | 3 ++ .../Test/Unit/Model/Hostedpro/RequestTest.php | 3 ++ .../Paypal/Test/Unit/Model/PayflowproTest.php | 3 ++ ...dBillingAgreementToSessionObserverTest.php | 3 ++ ...AdminBillingAgreementUsageObserverTest.php | 3 ++ .../Unit/Observer/RefreshCustomerDataTest.php | 3 ++ .../Test/Unit/Block/Email/StockTest.php | 3 ++ .../Unit/Block/Product/View/StockTest.php | 3 ++ .../Model/Cart/CartTotalManagementTest.php | 3 ++ .../Model/Cart/CartTotalRepositoryTest.php | 3 ++ .../Product/Plugin/UpdateQuoteItemsTest.php | 3 ++ .../Quote/Address/Total/SubtotalTest.php | 3 ++ .../Unit/Model/Quote/Address/TotalTest.php | 12 ++++++ .../Model/Quote/Item/RelatedProductsTest.php | 3 ++ .../Unit/Model/Quote/Item/UpdaterTest.php | 6 +++ .../Quote/Test/Unit/Model/Quote/ItemTest.php | 6 +++ .../Quote/Test/Unit/Model/QuoteTest.php | 12 ++++++ .../Backend/CustomerQuoteObserverTest.php | 3 ++ .../Notification/MarkUserNotified.php | 3 ++ .../Condition/CanViewNotificationTest.php | 3 ++ .../Review/Test/Unit/Block/FormTest.php | 3 ++ .../Test/Unit/Block/Product/ReviewTest.php | 3 ++ .../ResourceModel/Review/CollectionTest.php | 3 ++ .../Model/Condition/AbstractConditionTest.php | 6 +++ .../Collection/AbstractCollectionTest.php | 3 ++ .../Adminhtml/Order/Create/Items/GridTest.php | 3 ++ .../Create/Sidebar/AbstractSidebarTest.php | 3 ++ .../Adminhtml/Order/Invoice/ViewTest.php | 3 ++ .../Test/Unit/Block/Order/TotalsTest.php | 4 ++ .../Order/Create/ProcessDataTest.php | 3 ++ .../Download/DownloadCustomOptionTest.php | 3 ++ .../Test/Unit/Cron/CleanExpiredQuotesTest.php | 3 ++ .../CustomerData/LastOrderedItemsTest.php | 3 ++ .../Sales/Test/Unit/Helper/AdminTest.php | 6 +++ .../Test/Unit/Model/InvoiceOrderTest.php | 3 ++ .../Test/Unit/Model/Order/AddressTest.php | 3 ++ .../CreateQuantityValidatorTest.php | 3 ++ .../Order/Creditmemo/RefundOperationTest.php | 6 +++ .../Order/Email/Sender/AbstractSenderTest.php | 11 ++++++ .../Order/InvoiceQuantityValidatorTest.php | 13 +++++++ .../Test/Unit/Model/Order/InvoiceTest.php | 6 +++ .../Sales/Test/Unit/Model/Order/ItemTest.php | 3 ++ .../Model/Order/Payment/RepositoryTest.php | 5 +++ .../Order/Payment/Transaction/BuilderTest.php | 3 ++ .../Order/Payment/Transaction/ManagerTest.php | 6 +++ .../Test/Unit/Model/Order/PaymentTest.php | 25 ++++++++++++ .../Unit/Model/Order/StatusResolverTest.php | 3 ++ .../Sales/Test/Unit/Model/OrderTest.php | 12 ++++++ .../Test/Unit/Model/RefundInvoiceTest.php | 3 ++ .../Sales/Test/Unit/Model/RefundOrderTest.php | 3 ++ .../AddVatRequestParamsOrderCommentTest.php | 3 ++ .../Frontend/RestoreCustomerGroupIdTest.php | 3 ++ .../Unit/Model/Order/ReturnValidatorTest.php | 3 ++ .../InvoiceRefundCreationArgumentsTest.php | 3 ++ .../RefundOrderInventoryObserverTest.php | 5 +++ .../Plugin/CouponUsagesDecrement.php | 5 +++ .../Plugin/CouponUsagesIncrement.php | 5 +++ .../Test/Unit/Block/Rss/DiscountsTest.php | 3 ++ .../Unit/Model/Converter/ToDataModelTest.php | 3 ++ .../Test/Unit/Model/Converter/ToModelTest.php | 3 ++ .../Test/Unit/Model/CouponRepositoryTest.php | 3 ++ .../Test/Unit/Model/Quote/DiscountTest.php | 3 ++ .../SalesRule/Test/Unit/Model/RuleTest.php | 6 +++ .../Test/Unit/Model/RulesApplierTest.php | 7 ++++ .../SalesRule/Test/Unit/Model/UtilityTest.php | 3 ++ .../Test/Unit/Model/ValidatorTest.php | 3 ++ .../Search/Test/Unit/Helper/DataTest.php | 3 ++ .../CollectionFactoryTest.php | 3 ++ .../Block/Plugin/Catalog/Product/ViewTest.php | 3 ++ .../Adminhtml/Order/Shipment/ViewTest.php | 8 ++++ .../Guarantee/CreateGuaranteeAbilityTest.php | 3 ++ .../Model/Guarantee/CreationServiceTest.php | 12 ++++++ .../Client/ResponseHandlerTest.php | 3 ++ .../Model/SignifydGateway/GatewayTest.php | 3 ++ .../Config/Importer/Processor/UpdateTest.php | 3 ++ .../Model/Service/StoreConfigManagerTest.php | 8 ++++ .../Test/Unit/Model/StoreManagerTest.php | 3 ++ .../Store/Test/Unit/Model/StoreTest.php | 9 +++++ .../Test/Unit/Model/System/StoreTest.php | 6 +++ .../Store/Test/Unit/Setup/UpgradeDataTest.php | 3 ++ .../Edit/Options/AbstractSwatchTest.php | 3 ++ .../Product/Attribute/Edit/FormTest.php | 3 ++ .../Controller/Adminhtml/Iframe/ShowTest.php | 3 ++ .../Product/Attribute/Plugin/SaveTest.php | 3 ++ .../Swatches/Test/Unit/Helper/DataTest.php | 28 ++++++++++++++ .../Swatches/Test/Unit/Helper/MediaTest.php | 9 +++++ .../Unit/Model/Plugin/EavAttributeTest.php | 3 ++ .../Unit/Model/Plugin/ProductImageTest.php | 3 ++ .../Test/Unit/Model/Plugin/ProductTest.php | 3 ++ .../AddFieldsToAttributeObserverTest.php | 3 ++ .../AddSwatchAttributeTypeObserverTest.php | 3 ++ .../Test/Unit/Block/Checkout/ShippingTest.php | 3 ++ .../Unit/Block/Item/Price/RendererTest.php | 9 +++++ .../Model/Calculation/RateRepositoryTest.php | 3 ++ .../Test/Unit/Model/Plugin/OrderSaveTest.php | 12 ++++++ .../Quote/GrandTotalDetailsPluginTest.php | 15 ++++++++ .../Unit/Model/Quote/ToOrderConverterTest.php | 3 ++ .../Total/Quote/CommonTaxCollectorTest.php | 3 ++ .../Unit/Model/Sales/Total/Quote/TaxTest.php | 3 ++ .../ApplyDiscountOnPricesTest.php | 3 ++ .../System/Message/NotificationsTest.php | 3 ++ .../Test/Unit/Model/TaxAddressManagerTest.php | 6 +++ .../Test/Unit/Model/TaxClass/FactoryTest.php | 3 ++ .../Test/Unit/Model/TaxRuleRepositoryTest.php | 3 ++ .../Observer/AfterAddressSaveObserverTest.php | 3 ++ .../Tax/Test/Unit/Pricing/AdjustmentTest.php | 9 +++++ .../Test/Unit/Block/Html/TopmenuTest.php | 3 ++ .../Unit/Model/Design/Backend/ThemeTest.php | 6 +++ .../Test/Unit/Model/Theme/ValidationTest.php | 3 ++ .../Theme/Test/Unit/Model/ThemeTest.php | 6 +++ .../Test/Unit/Model/Wysiwyg/StorageTest.php | 6 +++ .../Listing/Column/EditActionTest.php | 3 ++ .../Form/Element/AbstractElementTest.php | 3 ++ .../Form/Element/ActionDeleteTest.php | 3 ++ .../Form/Element/CheckboxSetTest.php | 3 ++ .../Form/Element/MultiSelectTest.php | 3 ++ .../Component/Form/Element/RadioSetTest.php | 3 ++ .../Component/Form/Element/SelectTest.php | 3 ++ .../Component/Form/Element/WysiwygTest.php | 6 +++ .../Ui/Test/Unit/Component/MassActionTest.php | 3 ++ .../Unit/Config/Converter/ActionsTest.php | 3 ++ .../Unit/Config/Converter/OptionsTest.php | 3 ++ .../Ui/Test/Unit/Model/ManagerTest.php | 6 +++ .../Test/Unit/Helper/UrlRewriteTest.php | 6 +++ .../Variable/Test/Unit/Model/VariableTest.php | 6 +++ .../Observer/AfterPaymentSaveObserverTest.php | 3 ++ .../Unit/Controller/PathProcessorTest.php | 3 ++ .../Authorization/TokenUserContextTest.php | 3 ++ .../Unit/Model/Rest/Swagger/GeneratorTest.php | 6 +++ .../Unit/Block/Item/Price/RendererTest.php | 9 +++++ .../Unit/Model/Total/Invoice/WeeeTest.php | 3 ++ .../Unit/Observer/AfterAddressSaveTest.php | 3 ++ .../Weee/Test/Unit/Pricing/AdjustmentTest.php | 6 +++ .../Customer/Wishlist/Item/OptionsTest.php | 3 ++ .../Unit/Controller/Index/AllcartTest.php | 3 ++ .../Test/Unit/Controller/Index/IndexTest.php | 3 ++ .../Test/Unit/Controller/Index/PluginTest.php | 3 ++ .../Test/Unit/Controller/Index/RemoveTest.php | 3 ++ .../Wishlist/Test/Unit/Model/ItemTest.php | 3 ++ .../Model/LocaleQuantityProcessorTest.php | 3 ++ .../Acl/Test/Unit/Role/RegistryTest.php | 7 ++++ .../Generator/EntityChildTestAbstract.php | 12 ++++++ .../Api/Test/Unit/DataObjectHelperTest.php | 3 ++ .../Framework/Api/Test/Unit/SortOrderTest.php | 6 +++ .../App/Test/Unit/Action/Stub/ActionStub.php | 3 ++ .../Framework/App/Test/Unit/AreaTest.php | 3 ++ .../Framework/App/Test/Unit/BootstrapTest.php | 3 ++ .../App/Test/Unit/Cache/Frontend/PoolTest.php | 3 ++ .../App/Test/Unit/Cache/Type/ConfigTest.php | 3 ++ .../Test/Unit/Cache/Type/FrontendPoolTest.php | 3 ++ .../Framework/App/Test/Unit/CacheTest.php | 6 +++ .../Unit/Config/ConfigPathResolverTest.php | 3 ++ .../App/Test/Unit/Config/DataTest.php | 3 ++ .../App/Test/Unit/Config/InitialTest.php | 3 ++ .../App/Test/Unit/Config/ValueTest.php | 3 ++ .../Framework/App/Test/Unit/ConfigTest.php | 3 ++ .../Console/MaintenanceModeEnablerTest.php | 11 ++++++ .../App/Test/Unit/Console/ResponseTest.php | 3 ++ .../Framework/App/Test/Unit/CronTest.php | 3 ++ .../App/Test/Unit/DeploymentConfigTest.php | 3 ++ .../App/Test/Unit/DocRootLocatorTest.php | 3 ++ .../App/Test/Unit/ErrorHandlerTest.php | 6 +++ .../Test/Unit/PageCache/IdentifierTest.php | 3 ++ .../App/Test/Unit/PageCache/KernelTest.php | 3 ++ .../App/Test/Unit/ProductMetadataTest.php | 3 ++ .../App/Test/Unit/Request/HttpTest.php | 18 +++++++++ .../App/Test/Unit/Router/ActionListTest.php | 3 ++ .../App/Test/Unit/ScopeResolverPoolTest.php | 3 ++ .../Framework/App/Test/Unit/SetupInfoTest.php | 3 ++ .../Framework/App/Test/Unit/StateTest.php | 4 ++ .../Backend/Decorator/CompressionTest.php | 11 ++++++ .../Decorator/DecoratorAbstractTest.php | 6 +++ .../Cache/Test/Unit/Backend/MongoDbTest.php | 18 +++++++++ .../Framework/Cache/Test/Unit/CoreTest.php | 3 ++ .../Test/Unit/Frontend/Adapter/ZendTest.php | 3 ++ .../Unit/Frontend/Decorator/TagScopeTest.php | 3 ++ .../Unit/Generator/DefinedClassesTest.php | 5 +++ .../Unit/Generator/InterfaceGeneratorTest.php | 3 ++ .../Code/Test/Unit/Generator/IoTest.php | 6 +++ .../Code/Test/Unit/GeneratorTest.php | 3 ++ .../Code/Test/Unit/NameBuilderTest.php | 3 ++ .../Test/Unit/Reader/ArgumentsReaderTest.php | 3 ++ .../Unit/Validator/TypeDuplicationTest.php | 3 ++ .../_files/ClassesForArgumentSequence.php | 10 +++++ .../_files/ClassesForConstructorIntegrity.php | 9 +++++ .../Magento/SomeModule/Model/Five/Test.php | 5 +++ .../Magento/SomeModule/Model/Four/Test.php | 6 +++ .../Magento/SomeModule/Model/One/Test.php | 5 +++ .../SomeModule/Model/SevenInterface.php | 3 ++ .../Magento/SomeModule/Model/Six/Test.php | 6 +++ .../Magento/SomeModule/Model/Three/Test.php | 6 +++ .../Magento/SomeModule/Model/Two/Test.php | 6 +++ .../Test/Unit/ComposerInformationTest.php | 3 ++ .../Config/Test/Unit/Converter/DomTest.php | 3 ++ .../Config/Test/Unit/Data/ConfigDataTest.php | 3 ++ .../Config/Test/Unit/Data/ScopedTest.php | 3 ++ .../Test/Unit/Dom/NodePathMatcherTest.php | 3 ++ .../Test/Unit/GenericSchemaLocatorTest.php | 8 ++++ .../Test/Unit/Result/RedirectTest.php | 3 ++ .../Framework/Convert/Test/Unit/XmlTest.php | 3 ++ .../DB/Test/Unit/Adapter/Pdo/MysqlTest.php | 3 ++ .../DB/Test/Unit/Ddl/SequenceTest.php | 3 ++ .../DB/Test/Unit/ExpressionConverterTest.php | 3 ++ .../Test/Unit/Helper/Mysql/FulltextTest.php | 3 ++ .../Test/Unit/Select/ColumnsRendererTest.php | 3 ++ .../Argument/Interpreter/ArrayTypeTest.php | 6 +++ .../Argument/Interpreter/CompositeTest.php | 3 ++ .../Unit/Argument/Interpreter/NumberTest.php | 6 +++ .../Data/Test/Unit/Collection/DbTest.php | 9 +++++ .../Data/Test/Unit/Form/Element/DateTest.php | 8 ++++ .../Test/Unit/Form/FormKey/ValidatorTest.php | 3 ++ .../Encryption/Test/Unit/CryptTest.php | 26 +++++++++++++ .../Encryption/Test/Unit/EncryptorTest.php | 12 ++++++ .../Test/Unit/Helper/SecurityTest.php | 3 ++ .../Test/Unit/Observer/CollectionTest.php | 3 ++ .../Event/Test/Unit/Observer/CronTest.php | 9 +++++ .../Event/Test/Unit/Observer/RegexTest.php | 3 ++ .../Filesystem/Test/Unit/Driver/FileTest.php | 6 +++ .../Filesystem/Test/Unit/Driver/HttpTest.php | 6 +++ .../Test/Unit/File/ExcludeFilterTest.php | 3 ++ .../Test/Unit/Input/MaliciousCodeTest.php | 3 ++ .../Unit/Template/Tokenizer/ParameterTest.php | 6 +++ .../Unit/Template/Tokenizer/VariableTest.php | 3 ++ .../Filter/Test/Unit/TemplateTest.php | 3 ++ .../HTTP/Test/Unit/Adapter/CurlTest.php | 3 ++ .../Test/Unit/PhpEnvironment/RequestTest.php | 5 +++ .../Image/Test/Unit/Adapter/AbstractTest.php | 3 ++ .../Image/Test/Unit/Adapter/Gd2Test.php | 3 ++ .../Indexer/Test/Unit/IndexStructureTest.php | 19 ++++++++++ .../Unit/Code/Generator/_files/Sample.php | 3 ++ .../Unit/Code/Generator/_files/TSample.php | 6 +++ .../Test/Unit/Config/ConfigTest.php | 3 ++ .../Framework/Lock/Backend/Database.php | 7 ++++ .../Framework/Math/Test/Unit/RandomTest.php | 6 +++ .../Message/Test/Unit/ManagerTest.php | 9 +++++ .../Unit/ResourceModel/Db/AbstractDbTest.php | 9 +++++ .../Db/Collection/AbstractCollectionTest.php | 18 +++++++++ .../Unit/ResourceModel/Db/Collection/Uut.php | 15 ++++++++ .../Unit/Declaration/Converter/DomTest.php | 3 ++ .../Test/Unit/Dir/ReverseResolverTest.php | 3 ++ .../Module/Test/Unit/ManagerTest.php | 6 +++ .../Mview/Test/Unit/View/ChangelogTest.php | 4 ++ .../Framework/Mview/Test/Unit/ViewTest.php | 18 +++++++++ .../Unit/Code/Generator/RepositoryTest.php | 12 ++++++ .../_files/SampleRepositoryInterface.php | 20 ++++++++++ .../_files/TSampleRepositoryInterface.php | 15 ++++++++ .../Config/Reader/_files/ConfigDomMock.php | 3 ++ .../Test/Unit/Relations/RuntimeTest.php | 3 ++ .../Unit/_files/Aggregate/AggregateParent.php | 9 +++++ .../Test/Unit/_files/Aggregate/Child.php | 11 ++++++ .../Unit/_files/Aggregate/WithOptional.php | 6 +++ .../Test/Unit/Adjustment/CollectionTest.php | 6 +++ .../Pricing/Test/Unit/Adjustment/PoolTest.php | 3 ++ .../Pricing/Test/Unit/Helper/DataTest.php | 6 +++ .../Test/Unit/PriceInfo/FactoryTest.php | 3 ++ .../Pricing/Test/Unit/Render/AmountTest.php | 7 ++++ .../Pricing/Test/Unit/Render/PriceBoxTest.php | 6 +++ .../Test/Unit/DataObjectProcessorTest.php | 3 ++ .../Unit/ExtensionAttributesProcessorTest.php | 3 ++ .../Reflection/Test/Unit/TestDataObject.php | 20 ++++++++++ .../Test/Unit/TypeProcessorTest.php | 3 ++ .../Search/Test/Unit/Request/MapperTest.php | 9 +++++ .../Test/Unit/Serializer/Base64JsonTest.php | 6 +++ .../Test/Unit/Serializer/JsonTest.php | 9 +++++ .../Test/Unit/Serializer/SerializeTest.php | 9 +++++ .../Session/Test/Unit/ConfigTest.php | 6 +++ .../Unit/SaveHandler/Redis/LoggerTest.php | 3 ++ .../Shell/Test/Unit/CommandRendererTest.php | 3 ++ .../Simplexml/Test/Unit/ElementTest.php | 3 ++ .../Stdlib/Test/Unit/BooleanUtilsTest.php | 6 +++ .../Test/Unit/Cookie/PhpCookieManagerTest.php | 8 ++++ .../Cookie/SensitiveCookieMetadataTest.php | 9 +++++ .../Framework/Test/Unit/ArchiveTest.php | 12 ++++++ .../Unit/Data/Form/Element/HiddenTest.php | 3 ++ .../Framework/Test/Unit/DataObjectTest.php | 3 ++ .../Framework/Test/Unit/EscaperTest.php | 3 ++ .../Framework/Test/Unit/FlagManagerTest.php | 3 ++ .../Test/Unit/Message/PhraseFactoryTest.php | 3 ++ .../Module/Plugin/DbStatusValidatorTest.php | 3 ++ .../Magento/Framework/Test/Unit/ShellTest.php | 3 ++ .../Framework/Test/Unit/TranslateTest.php | 9 +++++ .../Magento/Framework/Test/Unit/UrlTest.php | 18 +++++++++ .../Translate/Test/Unit/InlineTest.php | 12 ++++++ .../Unserialize/Test/Unit/UnserializeTest.php | 3 ++ .../Url/Test/Unit/Helper/DataTest.php | 9 +++++ .../Url/Test/Unit/SecurityInfoTest.php | 3 ++ .../Validator/Test/Unit/ObjectTest.php | 3 ++ .../Unit/Asset/File/FallbackContextTest.php | 3 ++ .../View/Test/Unit/Asset/FileTest.php | 3 ++ .../View/Test/Unit/Asset/MergeServiceTest.php | 3 ++ .../Framework/View/Test/Unit/ContextTest.php | 3 ++ .../View/Test/Unit/DataSourcePoolTest.php | 5 +++ .../View/Test/Unit/Element/Html/LinkTest.php | 3 ++ .../View/Test/Unit/Element/Js/CookieTest.php | 3 ++ .../Unit/Element/Text/TextList/ItemTest.php | 3 ++ .../Unit/Element/Text/TextList/LinkTest.php | 3 ++ .../Decorator/ModuleDependencyTest.php | 3 ++ .../Argument/Interpreter/HelperMethodTest.php | 8 ++++ .../Argument/Interpreter/NamedParamsTest.php | 3 ++ .../Argument/Interpreter/OptionsTest.php | 3 ++ .../Test/Unit/Layout/BuilderFactoryTest.php | 3 ++ .../View/Test/Unit/Layout/ElementTest.php | 6 +++ .../Unit/Layout/Reader/UiComponentTest.php | 3 ++ .../Unit/Page/Config/Generator/HeadTest.php | 3 ++ .../View/Test/Unit/Page/ConfigTest.php | 21 ++++++++++ .../Webapi/Test/Unit/RequestTest.php | 3 ++ .../Test/Unit/ServiceInputProcessorTest.php | 3 ++ .../Command/GenerateFixturesCommand.php | 4 ++ .../Setup/Console/Style/MagentoStyle.php | 5 +++ .../Console/Command/DbStatusCommandTest.php | 3 ++ .../DeployStaticContentCommandTest.php | 3 ++ .../Console/Command/UninstallCommandTest.php | 3 ++ .../Test/Unit/Console/Style/TestOutput.php | 4 ++ .../Model/ConfigOptionsList/SessionTest.php | 6 +++ .../Test/Unit/Model/ConfigOptionsListTest.php | 3 ++ .../Model/Cron/JobComponentUninstallTest.php | 3 ++ .../Test/Unit/Model/Cron/JobFactoryTest.php | 9 +++++ .../Unit/Model/Cron/ReadinessCheckTest.php | 3 ++ .../Description/Mixin/BrakeMixinTest.php | 3 ++ .../Description/Mixin/HeaderMixinTest.php | 3 ++ .../Mixin/Helper/RandomWordSelectorTest.php | 3 ++ .../Mixin/Helper/WordWrapperTest.php | 3 ++ .../Description/Mixin/ParagraphMixinTest.php | 3 ++ .../Test/Unit/Model/Grid/TypeMapperTest.php | 3 ++ .../Unit/Model/ObjectManagerProviderTest.php | 3 ++ .../Test/Unit/Model/PayloadValidatorTest.php | 6 +++ .../Test/Unit/Model/PhpReadinessCheckTest.php | 5 +++ .../Setup/Test/Unit/Model/WebLoggerTest.php | 6 +++ .../Code/Reader/ClassReaderDecoratorTest.php | 3 ++ .../code/Magento/SomeModule/Helper/Test.php | 7 ++++ .../Module/I18n/Parser/AbstractParserTest.php | 3 ++ .../Test/Unit/Module/Setup/SetupCacheTest.php | 3 ++ .../Mvc/Bootstrap/InitParamListenerTest.php | 3 ++ 622 files changed, 3217 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php index 2fbfc43aa8775..f49911c3e7a93 100644 --- a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php +++ b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php @@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes) $this->assertEquals($expectedSum, $this->_messageModel->getIdentity()); } + /** + * @return array + */ public function getIdentityDataProvider() { $cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']); @@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes) $this->assertEquals($expected, $this->_messageModel->isDisplayed()); } + /** + * @return array + */ public function isDisplayedDataProvider() { $cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']); diff --git a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php index 2c259db868851..b490efd8e9683 100644 --- a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php +++ b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php @@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data) $this->assertEquals($expectedFirstRun, $model->isDisplayed()); } + /** + * @return array + */ public function isDisplayedDataProvider() { return [ diff --git a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php index 1e71570a5e30b..c6f61fee862ba 100644 --- a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php +++ b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php @@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response) $this->assertEquals($expectedResult, $this->_messageModel->isDisplayed()); } + /** + * @return array + */ public function isDisplayedDataProvider() { return [ diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php index bb64acb558320..7a81ccae6f0d0 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php @@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr $this->tierPrice->isValid($value); } + /** + * @return array + */ public function isValidResultFalseDataProvider() { return [ @@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider() ]; } + /** + * @return array + */ public function isValidAddMessagesCallDataProvider() { return [ diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php index 9a380ff75da24..b46e286e75007 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php @@ -114,6 +114,9 @@ public function testGetAllWebsitesValue() $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function isValidReturnDataProvider() { return [ diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php index d9fce98826105..5ca534284a48d 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php @@ -77,6 +77,9 @@ public function testInit() $this->validator->init(null); } + /** + * @return array + */ public function isValidDataProvider() { return [ diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php index 6d130d93ee6a5..08743b9fa7f2c 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php @@ -768,6 +768,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum) $this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']); } + /** + * @return array + */ public function saveProductPricesDataProvider() { return [ @@ -839,6 +842,9 @@ public function testDeleteProductTierPrices( ); } + /** + * @return array + */ public function deleteProductTierPricesDataProvider() { return [ @@ -921,6 +927,9 @@ public function testProcessCountExistingPrices( $this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']); } + /** + * @return array + */ public function processCountExistingPricesDataProvider() { return [ diff --git a/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php b/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php index bd1a3616a746e..58720ad9c9f5c 100644 --- a/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php +++ b/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php @@ -78,6 +78,9 @@ public function testGetAllowedResourcesByUser() ); } + /** + * @return AclRetriever + */ protected function createAclRetriever() { $this->roleMock = $this->createPartialMock(\Magento\Authorization\Model\Role::class, ['getId', '__wakeup']); diff --git a/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php b/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php index 6e5d55e52675e..b4274e87401ca 100644 --- a/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php +++ b/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php @@ -37,6 +37,9 @@ public function testGenerateHash($merchantMd5, $merchantApiLogin, $amount, $amou ); } + /** + * @return array + */ public function generateHashDataProvider() { return [ @@ -57,6 +60,14 @@ public function generateHashDataProvider() ]; } + /** + * @param $merchantMd5 + * @param $merchantApiLogin + * @param $amount + * @param $transactionId + * + * @return string + */ protected function generateHash($merchantMd5, $merchantApiLogin, $amount, $transactionId) { return strtoupper(md5($merchantMd5 . $merchantApiLogin . $transactionId . $amount)); diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php index 7e4c426de9452..88b994a6b93b7 100644 --- a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php +++ b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php @@ -146,6 +146,9 @@ public function testProcessNotLoggedInUser($isIFrameParam, $isAjaxParam, $isForw $this->assertEquals($expectedResult, $this->plugin->aroundDispatch($subject, $proceed, $request)); } + /** + * @return array + */ public function processNotLoggedInUserDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php index 2f808eaf2d1b8..d793a80cdeacf 100644 --- a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php +++ b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php @@ -74,6 +74,9 @@ public function testBeforeDispatchWhenMassactionPrepareKeyRequestExists($postDat $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock); } + /** + * @return array + */ public function beforeDispatchDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php b/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php index 4eff6218961af..2d60bef3f3e8c 100644 --- a/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php +++ b/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php @@ -8,6 +8,9 @@ class ActionStub extends \Magento\Backend\App\Action { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php b/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php index bc7dce6f20bac..642c6283decae 100644 --- a/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php +++ b/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php @@ -118,6 +118,9 @@ public function testIsHostBackend($url, $host, $useCustomAdminUrl, $customAdminU $this->assertEquals($this->model->isHostBackend(), $expectedValue); } + /** + * @return array + */ public function hostsDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php b/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php index 114c57867badf..53640a81e722f 100644 --- a/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php +++ b/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php @@ -70,6 +70,9 @@ public function testIsSetFlag($configPath, $configValue, $expectedResult) $this->assertEquals($expectedResult, $this->model->isSetFlag($configPath)); } + /** + * @return array + */ public function isSetFlagDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php b/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php index f52f4ab337712..eccb08e788a95 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php @@ -141,6 +141,9 @@ public function testRenderAnchorLevelIsNotOne($hasTarget) ); } + /** + * @return array + */ public function targetDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php b/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php index 160cfe609f85f..7a56536eaef44 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php @@ -88,6 +88,9 @@ public function testIsInProductionMode($mode, $expected) $this->assertEquals($expected, $this->additonalBlock->isInProductionMode()); } + /** + * @return array + */ public function isInProductionModeDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php b/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php index 0010ffad87524..f08a0098578b9 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php @@ -103,6 +103,9 @@ public function testGetEntitiesToShow(array $results, int $expectedEntitiesQty) $this->assertSame($expectedEntitiesQty, count($this->globalSearch->getEntitiesToShow())); } + /** + * @return array + */ public function getEntitiesToShowDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php b/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php index a79050faeb84a..aca719b2e65e9 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php @@ -74,6 +74,9 @@ public function testIsItemActiveLevelNotZero() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php index bcf5d1adbc12b..e64d1a97af4ae 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php @@ -61,6 +61,9 @@ public function testGetAttributesHtml($data, $expect) $this->assertRegExp($expect, $attributes); } + /** + * @return array + */ public function getAttributesHtmlDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php index 35e21d7d194aa..81f104dbb636b 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php @@ -54,6 +54,9 @@ public function testRender(array $rowData, $expectedResult) $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData))); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php index 67ead0ddd8f35..6f838634c6bed 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php @@ -63,6 +63,9 @@ public function testRender(array $rowData, $expectedResult) $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData))); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php index c5c56fd75fbe7..2e6bed4783e7f 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php @@ -86,6 +86,9 @@ public function testGetSortable($value) $this->assertFalse($this->_block->getSortable()); } + /** + * @return array + */ public function getSortableDataProvider() { return ['zero' => ['0'], 'false' => [false], 'null' => [null]]; @@ -374,6 +377,9 @@ public function testColumnIsGrouped($groupedData, $expected) $this->assertEquals($expected, $block->isGrouped()); } + /** + * @return array + */ public function columnGroupedDataProvider() { return [[[], false], [['grouped' => 0], false], [['grouped' => 1], true]]; diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php index 4525de1fee542..f81928c4540ba 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php @@ -152,6 +152,9 @@ public function testGetGridIdsJsonWithUseSelectAll(array $items, $result) $this->assertEquals($result, $this->_block->getGridIdsJson()); } + /** + * @return array + */ public function dataProviderGetGridIdsJsonWithUseSelectAll() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php index 29ce448a04ecb..e8143b5f6b43a 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php @@ -243,6 +243,9 @@ public function testSelected($param, $expectedJson, $expected) $this->assertEquals($expected, $this->_block->getSelected()); } + /** + * @return array + */ public function selectedDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php index 1670233324f8e..ad7c6fa99afd2 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php @@ -34,6 +34,9 @@ public function testGetters($method, $field, $value, $expected) $this->assertEquals($expected, $object->{$method}()); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php b/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php index b7a33ab883b69..50c3a8571b48f 100644 --- a/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php @@ -60,6 +60,9 @@ public function testPrepareFilterStringValues(array $inputString, array $expecte $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getPrepareFilterStringValuesDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php b/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php index 391deac5a1f4e..f1a4bc355b08e 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php @@ -120,6 +120,9 @@ public function testRefreshAcl($isUserPassedViaParams) $this->assertSame($aclMock, $this->session->getAcl()); } + /** + * @return array + */ public function refreshAclDataProvider() { return [ @@ -234,6 +237,9 @@ public function testIsAllowed($isUserDefined, $isAclDefined, $isAllowed, $expect $this->assertEquals($expectedResult, $this->session->isAllowed('resource')); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ @@ -254,6 +260,9 @@ public function testFirstPageAfterLogin($isFirstPageAfterLogin) $this->assertEquals($isFirstPageAfterLogin, $this->session->isFirstPageAfterLogin()); } + /** + * @return array + */ public function firstPageAfterLoginDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php index 2f0102ffd410d..4695ef00d5d05 100755 --- a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php @@ -28,6 +28,9 @@ public function testBeforeSave($value, $errorMessage = null) $this->assertEquals($model, $object); } + /** + * @return array + */ public function adminSessionLifetimeDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php b/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php index bc18bd44f4be4..a6b728ceb392f 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php @@ -140,6 +140,9 @@ public function testGetMenuExceptionLogged($expectedException) $this->model->getMenu(); } + /** + * @return array + */ public function getMenuExceptionLoggedDataProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php b/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php index 3c1f1e43900be..dec85f4b98e3d 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php @@ -79,6 +79,9 @@ public function testValidateWithMissingRequiredParamThrowsException($requiredPar } } + /** + * @return array + */ public function requiredParamsProvider() { return [['id'], ['title'], ['resource']]; @@ -102,6 +105,9 @@ public function testValidateWithNonValidPrimitivesThrowsException($param, $inval } } + /** + * @return array + */ public function invalidParamsProvider() { return [ diff --git a/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php b/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php index 23d1ed5da1425..5d026a2b1fc32 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php @@ -35,6 +35,9 @@ public function testAfterGetResult($isPub, $times) ); } + /** + * @return array + */ public function afterGetResultDataProvider() { return [[true, 1], [false, 0],]; diff --git a/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php b/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php index 49fcdf4fc8770..00ae8c2f44a69 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php @@ -136,6 +136,9 @@ public function testSetSessionSettingsByConstructor($secureRequest) $this->assertSame($secureRequest, $adminConfig->getCookieSecure()); } + /** + * @return array + */ public function requestSecureDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php b/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php index 569c5ffc16c9c..98f1965477b2c 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php @@ -58,6 +58,9 @@ public function testIsOperation($operation, $expected) $this->assertEquals($expected, $this->_model->isOperation($operation)); } + /** + * @return array + */ public function isOperationDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php index 414b460a1b81d..473fbbd035b00 100644 --- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php @@ -46,6 +46,9 @@ public function testGetChildrenEmptyItems($class, $method, $returnClass) $this->assertSame(null, $this->model->getChildren($item)); } + /** + * @return array + */ public function getChildrenEmptyItemsDataProvider() { return [ @@ -97,6 +100,9 @@ public function testGetChildren($parentItem) $this->assertSame([2 => $this->orderItem], $this->model->getChildren($item)); } + /** + * @return array + */ public function getChildrenDataProvider() { return [ @@ -116,6 +122,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isShipmentSeparately()); } + /** + * @return array + */ public function isShipmentSeparatelyWithoutItemDataProvider() { return [ @@ -145,6 +154,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare $this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem)); } + /** + * @return array + */ public function isShipmentSeparatelyWithItemDataProvider() { return [ @@ -166,6 +178,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isChildCalculated()); } + /** + * @return array + */ public function isChildCalculatedWithoutItemDataProvider() { return [ @@ -195,6 +210,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI $this->assertSame($result, $this->model->isChildCalculated($this->orderItem)); } + /** + * @return array + */ public function isChildCalculatedWithItemDataProvider() { return [ @@ -257,6 +275,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result) $this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem)); } + /** + * @return array + */ public function canShowPriceInfoDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php index 95dcb48f84be1..5d8cabdd8c1b9 100644 --- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php @@ -41,6 +41,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isShipmentSeparately()); } + /** + * @return array + */ public function isShipmentSeparatelyWithoutItemDataProvider() { return [ @@ -70,6 +73,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare $this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem)); } + /** + * @return array + */ public function isShipmentSeparatelyWithItemDataProvider() { return [ @@ -91,6 +97,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isChildCalculated()); } + /** + * @return array + */ public function isChildCalculatedWithoutItemDataProvider() { return [ @@ -120,6 +129,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI $this->assertSame($result, $this->model->isChildCalculated($this->orderItem)); } + /** + * @return array + */ public function isChildCalculatedWithItemDataProvider() { return [ @@ -151,6 +163,9 @@ public function testGetSelectionAttributesWithBundle() $this->assertEquals($unserializedResult, $this->model->getSelectionAttributes($this->orderItem)); } + /** + * @return array + */ public function getSelectionAttributesDataProvider() { return [ @@ -184,6 +199,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result) $this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem)); } + /** + * @return array + */ public function canShowPriceInfoDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php index 2353dc8251b6a..0f36049a86cac 100644 --- a/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php @@ -330,6 +330,11 @@ private function updateBundleBlock($options, $priceInfo, $priceType) ->will($this->returnArgument(0)); } + /** + * @param $price + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getPriceInfoMock($price) { $priceInfoMock = $this->getMockBuilder(\Magento\Framework\Pricing\PriceInfo\Base::class) @@ -354,6 +359,11 @@ private function getPriceInfoMock($price) return $priceInfoMock; } + /** + * @param $prices + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getPriceMock($prices) { $methods = []; diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php index d79afdddfb7ae..2f5dcef391063 100644 --- a/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php @@ -47,6 +47,9 @@ public function testGetChildrenEmptyItems($class, $method, $returnClass) $this->assertSame(null, $this->model->getChildren($item)); } + /** + * @return array + */ public function getChildrenEmptyItemsDataProvider() { return [ @@ -96,6 +99,9 @@ public function testGetChildren($parentItem) $this->assertSame([2 => $this->orderItem], $this->model->getChildren($item)); } + /** + * @return array + */ public function getChildrenDataProvider() { return [ @@ -115,6 +121,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isShipmentSeparately()); } + /** + * @return array + */ public function isShipmentSeparatelyWithoutItemDataProvider() { return [ @@ -144,6 +153,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare $this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem)); } + /** + * @return array + */ public function isShipmentSeparatelyWithItemDataProvider() { return [ @@ -165,6 +177,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isChildCalculated()); } + /** + * @return array + */ public function isChildCalculatedWithoutItemDataProvider() { return [ @@ -194,6 +209,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI $this->assertSame($result, $this->model->isChildCalculated($this->orderItem)); } + /** + * @return array + */ public function isChildCalculatedWithItemDataProvider() { return [ @@ -238,6 +256,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result) $this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem)); } + /** + * @return array + */ public function canShowPriceInfoDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php index ecce34363819e..3e9aeaed5c5b4 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php @@ -49,6 +49,9 @@ public function testGetChildrenEmptyItems($class, $method, $returnClass) $this->assertSame(null, $this->model->getChildren($item)); } + /** + * @return array + */ public function getChildrenEmptyItemsDataProvider() { return [ @@ -97,6 +100,9 @@ public function testGetChildren($parentItem) $this->assertSame([2 => $this->orderItem], $this->model->getChildren($item)); } + /** + * @return array + */ public function getChildrenDataProvider() { return [ @@ -116,6 +122,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isShipmentSeparately()); } + /** + * @return array + */ public function isShipmentSeparatelyWithoutItemDataProvider() { return [ @@ -146,6 +155,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare $this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem)); } + /** + * @return array + */ public function isShipmentSeparatelyWithItemDataProvider() { return [ @@ -167,6 +179,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result) $this->assertSame($result, $this->model->isChildCalculated()); } + /** + * @return array + */ public function isChildCalculatedWithoutItemDataProvider() { return [ @@ -197,6 +212,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI $this->assertSame($result, $this->model->isChildCalculated($this->orderItem)); } + /** + * @return array + */ public function isChildCalculatedWithItemDataProvider() { return [ @@ -217,6 +235,9 @@ public function testGetBundleOptions($productOptions, $result) $this->assertSame($result, $this->model->getBundleOptions()); } + /** + * @return array + */ public function getBundleOptionsDataProvider() { return [ @@ -277,6 +298,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result) $this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem)); } + /** + * @return array + */ public function canShowPriceInfoDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php index f7f6b30daa300..8d29908b75280 100644 --- a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php @@ -585,6 +585,9 @@ public function testGetOptionsAmount($searchMin, $useRegularPrice) $this->assertEquals($expectedResult, $result, 'Incorrect result'); } + /** + * @return array + */ public function getOptionsAmountDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php index 26a7b46683330..2d8a73164008b 100644 --- a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php @@ -145,6 +145,9 @@ private function prepareOptionMocks($selectionCollection) ->will($this->returnValue($priceTypeMock)); } + /** + * @return array + */ public function getOptionsDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php index 700bfd4f3c084..cbcfb1b85fc97 100644 --- a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php @@ -103,6 +103,9 @@ protected function setUp() $this->setupSelectionPrice(); } + /** + * @param bool $useRegularPrice + */ protected function setupSelectionPrice($useRegularPrice = false) { $this->selectionPrice = new \Magento\Bundle\Pricing\Price\BundleSelectionPrice( @@ -339,6 +342,9 @@ public function testFixedPriceWithMultipleQty($useRegularPrice) $this->assertEquals($expectedPrice, $selectionPrice->getValue()); } + /** + * @return array + */ public function useRegularPriceDataProvider() { return [ diff --git a/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php b/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php index 7b4d42568f686..1c3cf33cbf73b 100644 --- a/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php @@ -76,6 +76,9 @@ protected function setUp() ->getMock(); } + /** + * @return object + */ protected function getModel() { return $this->objectManager->getObject(BundleDataProvider::class, [ diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php index 013ec3a467104..c66e27ea41025 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php @@ -84,6 +84,9 @@ public function testSendPurgeRequest($hosts) $this->assertTrue($this->model->sendPurgeRequest('tags')); } + /** + * @return array + */ public function sendPurgeRequestDataProvider() { return [ diff --git a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php index 429c13e802a87..0500b29f787c2 100644 --- a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php +++ b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php @@ -354,6 +354,9 @@ public function testIsShownToLoggedInUser($expectedResult, $formId) $this->assertEquals($expectedResult, $captcha->isShownToLoggedInUser()); } + /** + * @return array + */ public function isShownToLoggedInUserDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php index b45df0380dcc6..5d8db5d5ba589 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php @@ -55,6 +55,9 @@ public function testCanShowTab($priceAllow, $stockAllow, $canShowTab) $this->assertEquals($canShowTab, $this->alerts->canShowTab()); } + /** + * @return array + */ public function canShowTabDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php index 5e899263519da..1fc105686011f 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php @@ -50,6 +50,9 @@ public function testIsAllowed($isAllowed) } } + /** + * @return array + */ public function isAllowedDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php index 8932d77a81247..0cff8b2d0f207 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php @@ -72,6 +72,9 @@ public function testIsRssAllowed($isAllowed) $this->assertEquals($isAllowed, $this->link->isRssAllowed()); } + /** + * @return array + */ public function isRssAllowedDataProvider() { return [ @@ -98,6 +101,9 @@ public function testIsTopCategory($isTop, $categoryLevel) $this->assertEquals($isTop, $this->link->isTopCategory()); } + /** + * @return array + */ public function isTopCategoryDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php index 1d927a6e04ef5..deb84b7b2d3c4 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php @@ -72,6 +72,9 @@ public function testCanItemsAddToCart($isComposite, $isSaleable, $hasRequiredOpt ); } + /** + * @return array + */ public function canItemsAddToCartDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php index dce0be8e62df3..ac963326dbfa1 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php @@ -216,6 +216,9 @@ public function testSetModes($mode, $expected) $this->assertEquals($expected, $block->getModes()); } + /** + * @return array + */ public function setModesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php index e0ba6531c8ab2..ae5176e78df7b 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php @@ -100,6 +100,9 @@ public function testGetGalleryImagesJsonWithoutLabel() $this->assertEquals('test_product_name', $decodedJson[0]['caption']); } + /** + * @param bool $hasLabel + */ private function prepareGetGalleryImagesJsonMocks($hasLabel = true) { $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php index e2e0fa2f27667..129dea37b185e 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php @@ -91,6 +91,9 @@ protected function setUp() ); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ @@ -108,6 +111,9 @@ public function testIsAllowed($configValue, $expectedResult) $this->assertEquals($expectedResult, $this->block->isAllowed()); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getItemMock() { $methods = [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php index 6509aa138802e..3c9f19d61d16a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php @@ -167,6 +167,9 @@ public function testGetRssData() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getItemMock() { $item = $this->getMockBuilder(\Magento\Catalog\Model\Product::class) diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php index 07dacae7298cf..e2cd01fd1c23a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php @@ -23,6 +23,9 @@ protected function setUp() $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php index 450cf4663c99c..9c747393cc72a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php @@ -195,6 +195,9 @@ public function testUniqueValidation(array $options, $isError) $this->assertInstanceOf(ResultJson::class, $this->getModel()->execute()); } + /** + * @return array + */ public function provideUniqueData() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php index a0a563e1e070e..779630b9559c6 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php @@ -39,6 +39,9 @@ public function testExemplarXml($fixtureXml, array $expectedErrors) $this->assertEquals($expectedErrors, $actualErrors); } + /** + * @return array + */ public function exemplarXmlDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php index d4e09714d0522..49e6a58b52032 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php @@ -205,6 +205,9 @@ private function setUpModelForAfterSave() return $model->setAttribute($this->attribute); } + /** + * @return array + */ public function attributeValueDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php index 3b99f2697f6b8..073a07818b52e 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php @@ -70,6 +70,9 @@ public function testBeforeSave($attributeCode, $data, $expected) $this->assertSame($expected, $object->getData($attributeCode)); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ @@ -116,6 +119,9 @@ public function testAfterLoad($attributeCode, $data, $expected) $this->assertSame($expected, $object->getData($attributeCode)); } + /** + * @return array + */ public function afterLoadDataProvider() { return [ @@ -158,6 +164,9 @@ public function testValidate($attributeData, $data, $expected) $this->assertSame($expected, $this->_model->validate($object)); } + /** + * @return array + */ public function validateDataProvider() { return [ @@ -250,6 +259,9 @@ public function testValidateDefaultSort($attributeCode, $data) $this->assertTrue($this->_model->validate($object)); } + /** + * @return array + */ public function validateDefaultSortDataProvider() { return [ @@ -293,6 +305,9 @@ public function testValidateDefaultSortException($attributeCode, $data) $this->_model->validate($object); } + /** + * @return array + */ public function validateDefaultSortException() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php index f77a6fec283a5..7d448302666cc 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php @@ -280,6 +280,9 @@ public function testSaveWithValidateCategoryException($error, $expectedException $this->model->save($categoryMock); } + /** + * @return array + */ public function saveWithValidateCategoryExceptionDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php index b989cba2927d6..a53b87dcf1567 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php @@ -259,6 +259,9 @@ public function testGetUseFlatResourceTrue() $this->assertEquals(true, $category->getUseFlatResource()); } + /** + * @return object + */ protected function getCategoryModel() { return $this->objectManager->getObject( @@ -287,6 +290,9 @@ protected function getCategoryModel() ); } + /** + * @return array + */ public function reindexFlatEnabledTestDataProvider() { return [ @@ -336,6 +342,9 @@ public function testReindexFlatEnabled($flatScheduled, $productScheduled, $expec $this->category->reindex(); } + /** + * @return array + */ public function reindexFlatDisabledTestDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php index 56bd04594018c..f69cbeb91631f 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php @@ -48,6 +48,9 @@ public function testAroundGet($isFlat, $path, $default, $inputData, $outputData) $this->assertEquals($outputData, $this->model->afterGet($this->subjectMock, $inputData, $path, $default)); } + /** + * @return array + */ public function aroundGetDataProvider() { $flatIndexerData = [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php index 3beb9a3ffb773..6916cef2dfa61 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php @@ -102,6 +102,9 @@ public function testIsAvailable($isAvailable, $isFlatEnabled, $isValid, $result) $this->assertEquals($result, $this->model->isAvailable()); } + /** + * @return array + */ public function isAvailableDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php index 3b3941d116fde..fb02b80a60175 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php @@ -57,6 +57,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataProviderProcessValueEqual() { return [['0', '0'], ['', '0'], ['0', ''], ['1', '1']]; @@ -92,6 +95,9 @@ public function testProcessValueEqual($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOn() { return [['0', '1'], ['', '1']]; @@ -143,6 +149,9 @@ public function testProcessValueOn($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOff() { return [['1', '0'], ['1', '']]; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php index 8310f3692d966..e134407d547ac 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php @@ -89,6 +89,9 @@ public function testBeforeAndAfterSaveNotNew($valueMap) $this->assertSame($this->subject, $this->model->afterSave($this->subject, $this->subject, $this->groupMock)); } + /** + * @return array + */ public function changedDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Eav/AbstractActionTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Eav/AbstractActionTest.php index 52bbff6eb5597..a2ca4ef616926 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Eav/AbstractActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Eav/AbstractActionTest.php @@ -177,6 +177,9 @@ public function testReindexWithNotNullArgumentExecutesReindexEntities( $this->_model->reindex($ids); } + /** + * @return array + */ public function reindexEntitiesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php index 8c63d77b74f53..d30a8da0e77a2 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php @@ -129,6 +129,9 @@ public function testReindexRow( $this->_model->reindexRow(1, $forceReindex); } + /** + * @return array + */ public function dataProviderReindexRow() { return [ @@ -198,6 +201,9 @@ public function testReindexList( $this->_model->reindexList([1], $forceReindex); } + /** + * @return array + */ public function dataProviderReindexList() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php index ca67185203738..34cc5c70418b9 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php @@ -50,6 +50,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataProviderProcessValueEqual() { return [['0', '0'], ['', '0'], ['0', ''], ['1', '1']]; @@ -84,6 +87,9 @@ public function testProcessValueEqual($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOn() { return [['0', '1'], ['', '1']]; @@ -134,6 +140,9 @@ public function testProcessValueOn($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOff() { return [['1', '0'], ['1', '']]; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php index 3e5daf1a98a9c..257a84e50248d 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php @@ -77,6 +77,9 @@ protected function setUp() ); } + /** + * @return \Magento\Catalog\Model\Layer\Filter\DataProvider\Category + */ public function testGetCategoryWithAppliedId() { $storeId = 1234; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php index 3a23ebcdf4518..f2c77627e38d0 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php @@ -165,6 +165,9 @@ public function testValidateFilter($filter, $expectedResult) $this->assertSame($expectedResult, $this->target->validateFilter($filter)); } + /** + * @return array + */ public function validateFilterDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php index 8cf075f4d8504..a97e4650b49bd 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php @@ -164,6 +164,9 @@ public function testUpdateWebsites($type, $methodName) $this->assertEquals($this->model->getDataByKey('action_type'), $type); } + /** + * @return array + */ public function updateWebsitesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php index 6f1f5e120b100..2144cf34c2a09 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php @@ -21,6 +21,9 @@ public function testIsProductConfigured($productType, $config, $expected) $this->assertEquals($expected, $cartConfiguration->isProductConfigured($productMock, $config)); } + /** + * @return array + */ public function isProductConfiguredDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php index d52aad50f05f3..15f003282dc04 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php @@ -151,6 +151,9 @@ public function testValidate($value) $this->assertEquals(!$value, $this->model->validate($this->dataObject)); } + /** + * @return array + */ public function validateDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php index 0e29aeab697af..c1e5559dbfd66 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php @@ -111,6 +111,9 @@ public function testGetItemAttributes($type, $typeId) $this->assertEquals($expectedResult, $this->model->getItemAttributes($type)); } + /** + * @return array + */ public function getItemAttributesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php index 046ee703c850e..95a9b961c8d81 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php @@ -69,6 +69,9 @@ public function testIsValidSuccess($expectedResult, array $value) $this->assertEquals($expectedResult, $this->validator->isValid($this->valueMock)); } + /** + * @return array + */ public function isValidSuccessDataProvider() { return [ @@ -154,6 +157,9 @@ public function testIsValidateWithInvalidData($priceType, $price, $title) $this->assertEquals($messages, $this->validator->getMessages()); } + /** + * @return array + */ public function isValidateWithInvalidDataDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php index 84a9e9ded094b..3789ba4ee126d 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php @@ -112,6 +112,9 @@ public function testGetCurrentPageNoParam() $this->assertEquals(1, $this->toolbarModel->getCurrentPage()); } + /** + * @return array + */ public function stringParamProvider() { return [ @@ -119,6 +122,9 @@ public function stringParamProvider() ]; } + /** + * @return array + */ public function intParamProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php index 7506b4adc1d3a..5080e64f46e27 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php @@ -40,6 +40,9 @@ public function testIsReservedAttribute($isUserDefined, $attributeCode, $expecte $this->assertEquals($expected, $this->model->isReservedAttribute($attribute)); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php index 6d42a33d1fc73..bbd0886442fd3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php @@ -147,6 +147,9 @@ public function testGetList($configValue, $customerGroupId, $groupData, $expecte } } + /** + * @return array + */ public function getListDataProvider() { return [ @@ -399,6 +402,9 @@ public function testAddWithInvalidData($price, $qty) $this->service->add('product_sku', 1, $price, $qty); } + /** + * @return array + */ public function addDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php index dcddab60fb0b9..b34375256a959 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php @@ -96,6 +96,9 @@ public function testAttributesCompare($attr1, $attr2, $expectedResult) $this->assertEquals($expectedResult, $this->model->attributesCompare($attribute, $attribute2)); } + /** + * @return array + */ public function attributeCompareProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php index 9fa820d64bae1..ef7aad2cbb802 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php @@ -169,6 +169,9 @@ public function testGetUrl( } } + /** + * @return array + */ public function getUrlDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php index a9760d81bbac4..1460b8348c827 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php @@ -1112,6 +1112,9 @@ public function testSaveWithLinks(array $newLinks, array $existingLinks, array $ $this->assertEquals($this->initializedProductMock, $results); } + /** + * @return mixed + */ public function saveWithLinksDataProvider() { // Scenario 1 @@ -1264,6 +1267,9 @@ public function testSaveExistingWithNewMediaGalleryEntries() $this->model->save($this->product); } + /** + * @return array + */ public function websitesProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php index 26199eb3fabbe..a2e9a8e5060cc 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php @@ -513,6 +513,9 @@ public function testGetCategoryCollectionCollectionNull($initCategoryCollection, $this->assertEquals($initCategoryCollection, $result); } + /** + * @return array + */ public function getCategoryCollectionCollectionNullDataProvider() { return [ @@ -623,6 +626,9 @@ public function testReindex($productChanged, $isScheduled, $productFlatCount, $c $this->model->reindex(); } + /** + * @return array + */ public function getProductReindexProvider() { return array( diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php index e6de1d33e564d..fb289c7beaac6 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php @@ -68,6 +68,9 @@ public function testGetType($value, $expected) $this->assertEquals($expected, $this->config->getType('global')); } + /** + * @return array + */ public function getTypeDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php index 517b5949ee8ea..405c1ced44ba3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php @@ -145,6 +145,9 @@ public function testGetUrl($filePath, $miscParams) ); } + /** + * @return array + */ public function getPathDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php index 96a6c15e35651..58007145d21a4 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php @@ -147,6 +147,9 @@ public function testGetUrl($imageType, $placeholderPath) $this->assertEquals($expectedResult, $imageModel->getUrl()); } + /** + * @return array + */ public function getPathDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php index 25c3c3ab24ad8..78cc028b51de7 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php @@ -108,6 +108,9 @@ public function testGetValue($specialPriceValue, $expectedResult) $this->assertSame($expectedResult, $this->basePrice->getValue()); } + /** + * @return array + */ public function getValueDataProvider() { return [[77, 77], [0, 0], [false, 99]]; diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php index 9225a37c3e5b4..4a206d023ec16 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php @@ -77,6 +77,11 @@ protected function setUp() ); } + /** + * @param array $optionsData + * + * @return array + */ protected function setupOptions(array $optionsData) { $options = []; @@ -105,6 +110,11 @@ protected function setupOptions(array $optionsData) return $options; } + /** + * @param $optionsData + * + * @return array + */ protected function setupSingleValueOptions($optionsData) { $options = []; diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php index d04bb4c681e67..1c50271976d15 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php @@ -61,6 +61,9 @@ public function setUp() ); } + /** + * @return int + */ private function getValueTierPricesExistShouldReturnMinTierPrice() { $minPrice = 5; diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/TierPriceTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/TierPriceTest.php index fd13439d7d34c..64a6324a35620 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/TierPriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/TierPriceTest.php @@ -411,6 +411,9 @@ public function testGetQuantity($quantity, $expectedValue) $this->assertEquals($expectedValue, $tierPrice->getQuantity()); } + /** + * @return array + */ public function getQuantityDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php index 6322fc76ff442..42f537228ddf8 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php @@ -347,6 +347,9 @@ public function testHasSpecialPrice($regularPrice, $finalPrice, $expectedResult) $this->assertEquals($expectedResult, $this->object->hasSpecialPrice()); } + /** + * @return array + */ public function hasSpecialPriceProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php index 986a1f7710919..e4d531e91fa07 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php @@ -88,6 +88,9 @@ public function testGetCanDisplayQty($typeCode, $expected) $this->assertEquals($expected, $this->object->getCanDisplayQty($product)); } + /** + * @return array + */ public function getCanDisplayQtyDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php index 9b0ade2b1288f..57b277a786ea3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php @@ -53,6 +53,9 @@ public function testBuild($frontendInput, $frontendClass, array $eavConfig, arra $this->assertEquals($expectedResult, $this->catalogEavValidationRules->build($attribute, $eavConfig)); } + /** + * @return array + */ public function buildDataProvider() { $data['required'] = true; diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php index bf47ec4f9da13..e56cb62e042bb 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php @@ -135,6 +135,9 @@ public function testGetCategoryById($categoriesCache, $expectedResult) $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function getCategoryByIdDataProvider() { return [ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php index e24b4e1948149..70ac3a4fa2e97 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php @@ -269,6 +269,9 @@ public function testIsRowValidError() $this->assertFalse($this->simpleType->isRowValid($rowData, $rowNum)); } + /** + * @return array + */ public function addAttributeOptionDataProvider() { return [ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php index 4e902024769f7..f1965e3063217 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php @@ -48,6 +48,11 @@ protected function setUp() ); } + /** + * @param $groupId + * + * @return \Magento\CatalogImportExport\Model\Import\Product\Validator\TierPrice + */ protected function processInit($groupId) { $searchResult = $this->createMock(\Magento\Customer\Api\Data\GroupSearchResultsInterface::class); diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php index 6d183fc8e6e20..1cd19852f393c 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php @@ -790,6 +790,9 @@ public function testGetCategoryProcessor() $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function getStoreIdByCodeDataProvider() { return [ @@ -1239,6 +1242,9 @@ public function uploadMediaFilesDataProvider() ]; } + /** + * @return array + */ public function getImagesFromRowDataProvider() { return [ @@ -1265,6 +1271,9 @@ public function getImagesFromRowDataProvider() ]; } + /** + * @return array + */ public function validateRowValidateNewProductTypeAddRowErrorCallDataProvider() { return [ @@ -1299,6 +1308,9 @@ public function validateRowValidateNewProductTypeAddRowErrorCallDataProvider() ]; } + /** + * @return array + */ public function validateRowCheckSpecifiedSkuDataProvider() { return [ @@ -1317,6 +1329,9 @@ public function validateRowCheckSpecifiedSkuDataProvider() ]; } + /** + * @return array + */ public function validateRowDataProvider() { return [ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php index e28c2e1f3c01d..0c21538889498 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php @@ -193,6 +193,9 @@ public function testMoveFileUrlDrivePool($fileUrl, $expectedHost, $expectedDrive $this->assertNull($result); } + /** + * @return array + */ public function moveFileUrlDriverPoolDataProvider() { return [ @@ -211,6 +214,9 @@ public function moveFileUrlDriverPoolDataProvider() ]; } + /** + * @return array + */ public function moveFileUrlDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php index 2fe40c118b06a..bd04df0da0a4a 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php @@ -167,6 +167,9 @@ public function testAddInStockFilterToCollection($configMock) $this->assertNull($this->stock->addInStockFilterToCollection($collectionMock)); } + /** + * @return array + */ public function filterProvider() { $configMock = $this->getMockBuilder(\Magento\Framework\App\Config::class) diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php index ea562da2f01c0..3788b1bc401fe 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php @@ -48,6 +48,9 @@ public function testAfterGetProductCollectionShow($status, $callCount) $this->assertEquals($collectionMock, $this->model->afterGetProductCollection($subjectMock, $collectionMock)); } + /** + * @return array + */ private function buildMocks() { /** @var \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection $collectionMock */ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php index 11a04d26994ae..7e2bad0b96354 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php @@ -450,6 +450,10 @@ public function testException() $this->quantityValidator->validate($this->observerMock); } + /** + * @param $qty + * @param $hasError + */ private function setUpStubForQuantity($qty, $hasError) { $this->productMock->expects($this->any()) @@ -480,6 +484,9 @@ private function setUpStubForQuantity($qty, $hasError) ->willReturn(''); } + /** + * @param $qty + */ private function createInitialStub($qty) { $this->storeMock->expects($this->any()) diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php index 5c75249b7cbf8..b542dd219af1d 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php @@ -243,41 +243,67 @@ public function testCheckQuoteItemQty(StockItemInterface $stockItem, $expectedRe ); } + /** + * @return array + */ public function verifyStockDataProvider() { return $this->prepareDataForMethod('verifyStock'); } + /** + * @return array + */ public function verifyNotificationDataProvider() { return $this->prepareDataForMethod('verifyNotification'); } + /** + * @return array + */ public function checkQtyDataProvider() { return $this->prepareDataForMethod('checkQty'); } + /** + * @return array + */ public function suggestQtyDataProvider() { return $this->prepareDataForMethod('suggestQty'); } + /** + * @return array + */ public function getStockQtyDataProvider() { return $this->prepareDataForMethod('getStockQty'); } + /** + * @return array + */ public function checkQtyIncrementsDataProvider() { return $this->prepareDataForMethod('checkQtyIncrements'); } + /** + * @return array + */ public function checkQuoteItemQtyDataProvider() { return $this->prepareDataForMethod('checkQuoteItemQty'); } + /** + * @param $methodName + * + * @return array + */ protected function prepareDataForMethod($methodName) { $variations = []; @@ -318,6 +344,9 @@ protected function prepareDataForMethod($methodName) return $variations; } + /** + * @return array + */ protected function getVariations() { $stockQty = 100; @@ -430,6 +459,9 @@ public function testCheckQtyIncrementsMsg($isChildItem, $expectedMsg) $this->assertEquals($expectedMsg, $result->getMessage()->render()); } + /** + * @return array + */ public function checkQtyIncrementsMsgDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php index d1d8e171bea16..359b0e80f1b74 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php @@ -482,6 +482,9 @@ public function testDispatchEvents($eventName, $methodName, $objectName) ); } + /** + * @return array + */ public function eventsDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php index c3abad50ef9f4..9ecab4dca77e3 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php @@ -125,7 +125,10 @@ public function testDispatchEvents($eventName, $methodName, $objectName) sprintf('Event "%s" with object name "%s" doesn\'t dispatched properly', $eventName, $objectName) ); } - + + /** + * @return array + */ public function eventsDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php index db183ae5c0da0..0ce62133d6f9b 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php @@ -106,6 +106,9 @@ public function testPrepareSource( $this->assertEquals($expectedResult, $this->useConfigSettings->getData('config')); } + /** + * @return array + */ public function prepareSourceDataProvider() { return [ diff --git a/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php b/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php index b1e27bf973404..ccc86920a7e74 100644 --- a/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php +++ b/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php @@ -56,6 +56,9 @@ public function testModifyPriceIfPriceExists($resultPrice, $expectedPrice) $this->assertEquals($expectedPrice, $this->priceModifier->modifyPrice(100, $this->productMock)); } + /** + * @return array + */ public function modifyPriceDataProvider() { return ['resulted_price_exists' => [150, 150], 'resulted_price_not_exists' => [null, 100]]; diff --git a/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php b/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php index 1643b3473ae27..59c0322678759 100644 --- a/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php +++ b/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php @@ -1006,6 +1006,12 @@ public function testException() $this->mappableConditionProcessor->rebuildConditionsTree($inputCondition); } + /** + * @param $subConditions + * @param $aggregator + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getMockForCombinedCondition($subConditions, $aggregator) { $mock = $this->getMockBuilder(CombinedCondition::class) @@ -1020,6 +1026,11 @@ protected function getMockForCombinedCondition($subConditions, $aggregator) return $mock; } + /** + * @param $attribute + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getMockForSimpleCondition($attribute) { $mock = $this->getMockBuilder(SimpleCondition::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php index f4c512916465f..01108358da2e0 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php @@ -314,6 +314,9 @@ public function testProcessTermFilter($frontendInput, $fieldValue, $isNegation, $this->assertSame($expected, $this->removeWhitespaces($actualResult)); } + /** + * @return array + */ public function testTermFilterDataProvider() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php index ac3e84a5c8fef..a04affcf810c1 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php @@ -99,6 +99,9 @@ protected function setUp() ->willReturn($this->store); } + /** + * @return array + */ public function addFiltersDataProvider() { return array_merge( @@ -269,6 +272,11 @@ private function createBackend($table) return $backend; } + /** + * @param string $optionText + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function createSource($optionText = 'optionText') { $source = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\Source\AbstractSource::class) @@ -281,6 +289,9 @@ private function createSource($optionText = 'optionText') return $source; } + /** + * @return array + */ private function addFiltersPriceDataProvider() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php index 75daf438f7bf2..b54a02ffb3cf9 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php @@ -107,6 +107,9 @@ public function testGetItems() $this->assertEquals($expected, $result[0]->toArray()); } + /** + * @param array $data + */ private function buildCollection(array $data) { $collectionData = []; diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php index c0f1f3fcaa5e6..ffdb849c81d65 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php @@ -206,6 +206,12 @@ protected function getFilterBuilder() return $filterBuilder; } + /** + * @param MockObject $filterBuilder + * @param array $filters + * + * @return MockObject + */ protected function addFiltersToFilterBuilder(MockObject $filterBuilder, array $filters) { $i = 1; @@ -222,6 +228,9 @@ protected function addFiltersToFilterBuilder(MockObject $filterBuilder, array $f return $filterBuilder; } + /** + * @return MockObject + */ protected function createFilter() { $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php index 1ff1131e5f002..5fa5b0333c6ba 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php @@ -91,6 +91,9 @@ public function testBaseSelectFullTextSearchStrategy( ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php index 2022492ed1c86..175407bda677f 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php @@ -78,6 +78,9 @@ public function testIsCustomPositive($attributeFrontEndType) ); } + /** + * @return array + */ public function dataProviderForIsCustomPositive() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php index c393f91f21fe1..02d6bec162c56 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php @@ -120,6 +120,13 @@ private function createDimensionMock($name, $value) return $dimension; } + /** + * @param $callNumber + * @param $tableName + * @param $isTableExist + * + * @return mixed + */ private function mockDropTable($callNumber, $tableName, $isTableExist) { $this->connection->expects($this->at($callNumber++)) @@ -135,6 +142,12 @@ private function mockDropTable($callNumber, $tableName, $isTableExist) return $callNumber; } + /** + * @param $callNumber + * @param $tableName + * + * @return mixed + */ private function mockFulltextTable($callNumber, $tableName) { $table = $this->getMockBuilder(\Magento\Framework\DB\Ddl\Table::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php index bb6e4ab8b4281..d13dcc11628f2 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php @@ -78,6 +78,9 @@ public function testInvalidArgumentException2() $this->fullTextSearchCheck->isRequiredForQuery($filterMock); } + /** + * @return array + */ public function positiveDataProvider() { $boolQueryMock = $this->getBoolQueryMock(); @@ -114,6 +117,9 @@ public function positiveDataProvider() ]; } + /** + * @return array + */ public function negativeDataProvider() { $emptyBoolQueryMock = $this->getBoolQueryMock(); @@ -147,6 +153,9 @@ public function negativeDataProvider() ]; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getMatchQueryMock() { $matchQueryMock = $this->getMockBuilder(\Magento\Framework\Search\Request\QueryInterface::class) @@ -161,6 +170,9 @@ private function getMatchQueryMock() return $matchQueryMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getBoolQueryMock() { $boolQueryMock = $this->getMockBuilder(\Magento\Framework\Search\Request\Query\BoolExpression::class) @@ -175,6 +187,9 @@ private function getBoolQueryMock() return $boolQueryMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getFilterQueryMock() { $filterQueryMock = $this->getMockBuilder(\Magento\Framework\Search\Request\Query\Filter::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php index 259c8e5d7f897..560de27ccdbc7 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php @@ -239,6 +239,11 @@ private function createAttributeMock($attributeOptions) return $attribute; } + /** + * @param $value + * + * @return int|void + */ private function countVal(&$value) { return !empty($value) ? count($value) : 0; diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php index ef4d8d314825b..374d0390f937c 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php @@ -190,6 +190,9 @@ public function testBuildByRequest() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function mockQuery() { return $this->getMockBuilder(QueryInterface::class) @@ -197,6 +200,9 @@ private function mockQuery() ->getMockForAbstractClass(); } + /** + * @return array + */ private function mockFilters() { $visibilityFilter = $this->getMockBuilder(Term::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php index 1521b38d8c298..cfddc07bceecc 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php @@ -275,6 +275,9 @@ function (FilterInterface $filter) { $this->tableMapper->addTables($select, $request); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getSelectMock() { return $this->getMockBuilder(\Magento\Framework\DB\Select::class) @@ -282,6 +285,9 @@ private function getSelectMock() ->getMock(); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getRequestMock() { return $this->getMockBuilder(\Magento\Framework\Search\RequestInterface::class) @@ -289,6 +295,9 @@ private function getRequestMock() ->getMock(); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getQueryMock() { return $this->getMockBuilder(QueryInterface::class) @@ -296,6 +305,9 @@ private function getQueryMock() ->getMockForAbstractClass(); } + /** + * @return array + */ private function getDifferentFiltersMock() { $visibilityFilter = $this->getMockBuilder(Term::class) @@ -316,6 +328,9 @@ private function getDifferentFiltersMock() return [$visibilityFilter, $customFilter, $nonCustomFilter]; } + /** + * @return array + */ private function getSameFiltersMock() { $visibilityFilter1 = $this->getMockBuilder(Term::class) diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php index 763f78ac1fea6..40f7642f35383 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php @@ -27,6 +27,9 @@ protected function setUp() ->getMockForAbstractClass(); } + /** + * @return \Magento\Ui\DataProvider\Modifier\ModifierInterface|object + */ protected function createModel() { return $this->objectManager->getObject(ProductUrlRewrite::class, [ diff --git a/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php b/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php index 3039066ad1388..5de8b9d9632fc 100644 --- a/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php +++ b/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php @@ -316,6 +316,9 @@ public function testCreateCollection($pagerEnable, $productsCount, $productsPerP $this->assertSame($collection, $this->productsList->createCollection()); } + /** + * @return array + */ public function createCollectionDataProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php index aecaf0ec9f039..1a9c5555c91c0 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php @@ -124,6 +124,9 @@ public function testGetTotalsCache($expectedResult, $isVirtual) $this->assertEquals($expectedResult, $model->getTotalsCache()); } + /** + * @return array + */ public function getTotalsCacheDataProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php index 2478270e0aec6..417c1e4295ea1 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php @@ -82,6 +82,9 @@ public function testGetLabel($productCount, $label) $this->assertSame($label, (string)$block->getLabel()); } + /** + * @return array + */ public function getLabelDataProvider() { return [[1, 'My Cart (1 item)'], [2, 'My Cart (2 items)'], [0, 'My Cart']]; diff --git a/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php b/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php index 24065c1f54eb3..7db5d7ecb19fd 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php @@ -68,6 +68,9 @@ public function testToHtml($canOnepageCheckout, $isOutputEnabled) $this->assertEquals('', $block->toHtml()); } + /** + * @return array + */ public function toHtmlDataProvider() { return [[false, true], [true, false], [false, false]]; diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php index 18281494029b6..36d37d07ef752 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php @@ -153,6 +153,9 @@ public function testToHtmlOrderVisibleOnFront(array $invisibleStatuses, $expecte $this->assertEquals($expectedResult, $this->block->getIsOrderVisible()); } + /** + * @return array + */ public function invisibleStatusesProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php b/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php index 26771c1531267..1a8fecd8356bb 100644 --- a/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php @@ -8,6 +8,9 @@ class OnepageStub extends \Magento\Checkout\Controller\Onepage { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php b/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php index 40de71e28c05e..6bd0bdf258a0a 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php @@ -279,6 +279,9 @@ public function testGetSummaryQty($useQty) $this->assertEquals($itemsCount, $this->cart->getSummaryQty()); } + /** + * @return array + */ public function useQtyDataProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php index fec1d6d4d003f..2751a54d2d2fe 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php @@ -90,6 +90,11 @@ public function testIsValidTrue() $this->assertTrue($this->createSuccessValidator($checkoutSession)->isValid($checkoutSession)); } + /** + * @param \PHPUnit_Framework_MockObject_MockObject $checkoutSession + * + * @return object + */ protected function createSuccessValidator(\PHPUnit_Framework_MockObject_MockObject $checkoutSession) { return $this->objectManagerHelper->getObject( diff --git a/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php b/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php index 29537e8ec0526..77b9469285b96 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php @@ -45,6 +45,9 @@ public function testGetResponseData($error, $result) $this->assertEquals($result, $this->sidebar->getResponseData($error)); } + /** + * @return array + */ public function dataProviderGetResponseData() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php index 684ad9264f77c..1733aff33228d 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php @@ -264,6 +264,9 @@ public function testInitCheckout($stepData, $isLoggedIn, $isSetStepDataCalled) $this->onepage->initCheckout(); } + /** + * @return array + */ public function initCheckoutDataProvider() { return [ @@ -296,6 +299,9 @@ public function testGetCheckoutMethod($isLoggedIn, $quoteCheckoutMethod, $isAllo $this->assertEquals($expected, $this->onepage->getCheckoutMethod()); } + /** + * @return array + */ public function getCheckoutMethodDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php index 97988a5676842..a27110ca96b6d 100644 --- a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php +++ b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php @@ -233,6 +233,9 @@ public function testPrepareElementHtml($elementValue, $modelBlockId) $this->assertEquals($this->elementMock, $this->this->prepareElementHtml($this->elementMock)); } + /** + * @return array + */ public function prepareElementHtmlDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php index 174e3a68b7c66..7b91d54ec3aa1 100644 --- a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php +++ b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php @@ -236,6 +236,9 @@ public function testPrepareElementHtml($elementValue, $cmsPageId) $this->assertEquals($this->elementMock, $this->this->prepareElementHtml($this->elementMock)); } + /** + * @return array + */ public function prepareElementHtmlDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php b/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php index 8b41f0e3ac0d4..c50f33caa6bc2 100644 --- a/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php +++ b/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php @@ -367,6 +367,9 @@ public function testPrepareResultPage( ); } + /** + * @return array + */ public function renderPageExtendedDataProvider() { return [ @@ -467,6 +470,9 @@ public function testGetPageUrl( $this->assertEquals($expectedResult, $this->object->getPageUrl($pageId)); } + /** + * @return array + */ public function getPageUrlDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php index 3fba04cd5604d..ba32f41c62f24 100644 --- a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php +++ b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php @@ -384,6 +384,9 @@ public function testGetCurrentPathThrowException() $this->fail('An expected exception has not been raised.'); } + /** + * @return array + */ public function providerGetCurrentPath() { return [ @@ -431,6 +434,9 @@ public function testGetImageHtmlDeclarationRenderingAsTag($baseUrl, $fileName, $ $this->assertEquals($expectedHtml, $this->imagesHelper->getImageHtmlDeclaration($fileName, true)); } + /** + * @return array + */ public function providerGetImageHtmlDeclarationRenderingAsTag() { return [ @@ -465,6 +471,9 @@ public function testGetImageHtmlDeclaration($baseUrl, $fileName, $isUsingStaticU $this->assertEquals($expectedHtml, $this->imagesHelper->getImageHtmlDeclaration($fileName)); } + /** + * @return array + */ public function providerGetImageHtmlDeclaration() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php index b9b0d6f772c62..26b5d74ffb961 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php @@ -119,6 +119,9 @@ public function testAfterLoad($item, $storesData) $this->assertEquals($expectedResult[$item->getId()], $item->getStoreId()); } + /** + * @return array + */ public function getItemsDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php index dd31650cb3a3a..6d45e7bf6ab1d 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php @@ -119,6 +119,9 @@ public function testAfterLoad($item, $storesData) $this->assertEquals($expectedResult[$item->getId()], $item->getStoreId()); } + /** + * @return array + */ public function getItemsDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php index d633c5a21fe32..7a5a6fe7b0c8c 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php @@ -187,6 +187,9 @@ public function testGetConfig($data, $isAuthorizationAllowed, $expectedResults) $this->assertEquals('localhost/pub/static/', $config->getData('baseStaticDefaultUrl')); } + /** + * @return array + */ public function getConfigDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php b/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php index 8c09d42ec556e..cbb13c6f254eb 100644 --- a/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php +++ b/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php @@ -139,6 +139,9 @@ public function testNoCookies($pageUrl) $this->assertEquals($this->noCookiesObserver, $this->noCookiesObserver->execute($this->observerMock)); } + /** + * @return array + */ public function noCookiesDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php index d3750022d93de..1cb393b212199 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php @@ -121,6 +121,9 @@ public function testInitTabs($section, $website, $store) ); } + /** + * @return array + */ public function initTabsDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php index be3b8e2ead0c1..f5c65e848b3bf 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php @@ -85,6 +85,9 @@ public function testGetHtmlWhenValueIsEmpty($value) $this->assertNotEmpty($this->_object->getHtml()); } + /** + * @return array + */ public function getHtmlWhenValueIsEmptyDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php index 9d76363213d0b..bb109bcb25f06 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php @@ -224,6 +224,9 @@ public function testRender($expanded, $nested, $extra) } } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php index 72e8386bddaf6..83b7bd5fda42e 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php @@ -224,6 +224,9 @@ public function testInitForm($sectionIsVisible) $this->assertEquals($this->_formMock, $object->getForm()); } + /** + * @return array + */ public function initFormDataProvider() { return [ @@ -337,6 +340,9 @@ public function testInitGroup($shouldCloneFields, $prefixes, $callNum) $object->initForm(); } + /** + * @return array + */ public function initGroupDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php index bacbda537fb1d..e6b774db041c3 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php @@ -40,6 +40,9 @@ public function testBeforeSave($value, $expectedValue) $this->assertEquals($expectedValue, $this->model->getValue()); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php index 8e559ff8284ed..e38c247c3861a 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php @@ -41,6 +41,9 @@ public function testBeforeSave($value, $expectedValue) $this->assertEquals($expectedValue, $this->model->getValue()); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php index 493fdf9505c4c..bb1e0e0225901 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php @@ -52,6 +52,9 @@ public function testAfterLoad($expected, $value, $numCalls, $unserializedValue = $this->assertEquals($expected, $this->serializedConfig->getValue()); } + /** + * @return array + */ public function afterLoadDataProvider() { return [ @@ -87,6 +90,9 @@ public function testBeforeSave($expected, $value, $numCalls, $serializedValue = $this->assertEquals($expected, $this->serializedConfig->getValue()); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php index 51432366bb441..e602e0407feff 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php @@ -141,6 +141,9 @@ public function testIsVisibleReturnsTrueForProperScopes($settings, $scope) $this->assertTrue($this->_model->isVisible()); } + /** + * @return array + */ public function isVisibleReturnsTrueForProperScopesDataProvider() { return [ @@ -170,6 +173,9 @@ public function testIsVisibleReturnsFalseForNonProperScopes($settings, $scope) $this->assertFalse($this->_model->isVisible()); } + /** + * @return array + */ public function isVisibleReturnsFalseForNonProperScopesDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php index 30c567fb490e6..750a829eef7ec 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php @@ -88,6 +88,9 @@ public function testIsNegative($data, $isNegative) $this->assertEquals($isNegative, $this->_getFieldObject($data, $isNegative)->isNegative()); } + /** + * @return array + */ public function dataProvider() { return [ @@ -110,6 +113,9 @@ public function testIsValueSatisfy($data, $isNegative, $value, $expected) $this->assertEquals($expected, $this->_getFieldObject($data, $isNegative)->isValueSatisfy($value)); } + /** + * @return array + */ public function isValueSatisfyDataProvider() { return [ @@ -135,6 +141,9 @@ public function testGetValues($data, $isNegative, $expected) $this->assertEquals($expected, $this->_getFieldObject($data, $isNegative)->getValues()); } + /** + * @return array + */ public function getValuesDataProvider() { $complexDataValues = [self::COMPLEX_VALUE1, self::COMPLEX_VALUE2, self::COMPLEX_VALUE3]; diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php index 2f081ea4285b9..c6cd03cf8f35b 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php @@ -150,6 +150,9 @@ public function testGetDependenciesWhenDependentIsInvisible($isValueSatisfy) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getDependenciesDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php index 1a0f3d03b060c..dcb7a90e55290 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php @@ -68,6 +68,9 @@ public function testIsLast($elementId, $result) $this->assertEquals($result, $this->_model->isLast($elementMock)); } + /** + * @return array + */ public function isLastDataProvider() { return [[1, false], [2, false], [3, true]]; diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php index 95e8246c6a3d3..7762c8993b24b 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php @@ -44,6 +44,9 @@ public function testMapWithBadPath() $this->_sut->map($sourceData); } + /** + * @return array + */ public function mapDataProvider() { return [ @@ -55,6 +58,9 @@ public function mapDataProvider() ]; } + /** + * @return array + */ protected function _emptySectionsNodeData() { $data = ['config' => ['system' => ['sections' => 'some_non_array']]]; @@ -62,6 +68,9 @@ protected function _emptySectionsNodeData() return [$data, $data]; } + /** + * @return array + */ protected function _extendFromASiblingData() { $source = $result = [ @@ -81,6 +90,9 @@ protected function _extendFromASiblingData() return [$source, $result]; } + /** + * @return array + */ protected function _extendFromNodeOnHigherLevelData() { $source = $result = [ @@ -114,6 +126,9 @@ protected function _extendFromNodeOnHigherLevelData() return [$source, $result]; } + /** + * @return array + */ protected function _extendWithMerge() { $source = $result = [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php index 058f9a380a27d..dd95574ffa62d 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php @@ -52,11 +52,17 @@ public function testConvert($nodePath, $relativePath, $result) $this->assertEquals($result, $this->_sut->convert($nodePath, $relativePath)); } + /** + * @return array + */ public function convertWithInvalidArgumentsDataProvider() { return [['', ''], ['some/node', ''], ['', 'some/node']]; } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php index e67ea6ec0fba1..6c059f4b69b70 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php @@ -221,6 +221,9 @@ private function getElementReturnsEmptyElementIfNotExistingElementIsRequested( return $elementMock; } + /** + * @return array + */ public function emptyElementDataProvider() { return [ @@ -389,6 +392,9 @@ public function testGetFieldPathsByAttribute($attributeName, $attributeValue, $p $this->assertEquals($paths, $this->_model->getFieldPathsByAttribute($attributeName, $attributeValue)); } + /** + * @return array + */ public function getFieldPathsByAttributeDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php b/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php index 8217ff09c0541..e4c01e794fb0f 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php @@ -52,6 +52,9 @@ public function testGenerate($path, $scope, $scopeId, $expected) ); } + /** + * @return array + */ public function getGenerateDataProvider() { return [ diff --git a/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php b/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php index 54552364de13b..1ff78ed89709a 100644 --- a/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php +++ b/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php @@ -392,6 +392,9 @@ protected function _getBunch() ]; } + /** + * @return array + */ protected function _getSuperAttributes() { return [ diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php index 040329dbb3d87..33b87467950fd 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php @@ -114,6 +114,9 @@ public function testGetAddNewAttributeButton($isAllowed, $result) $this->assertEquals($result, $this->selectAttributes->getAddNewAttributeButton()); } + /** + * @return array + */ public function attributesDataProvider() { return [ diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php index 090c464d49307..3565aba66427c 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php @@ -108,6 +108,11 @@ public function testValidateException() $this->validate(true); } + /** + * @param $exception + * + * @throws \Magento\Framework\Exception\LocalizedException + */ public function validate($exception) { $attrTable = 'someAttributeTable'; diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php index ab3fd33322aa5..7991d8fececb4 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php @@ -389,6 +389,9 @@ public function testValidateNewOptionData($attributeId, $label, $optionValues, $ $this->model->validateNewOptionData($optionMock); } + /** + * @return array + */ public function validateOptionDataProvider() { return [ diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php index 3bad81126f510..114fb7168ab33 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php @@ -59,6 +59,12 @@ private function createTarget(\PHPUnit_Framework_MockObject_MockObject $request, ); } + /** + * @param $popup + * @param string $productTab + * + * @return MockObject + */ private function createRequestMock($popup, $productTab = 'variations') { $request = $this->getMockBuilder(RequestInterface::class) @@ -107,6 +113,9 @@ public function testExecuteWithDefaultTypes(array $supportedTypes, array $origin $this->assertEquals(null, $target->execute($event)); } + /** + * @return array + */ public function executeDataProvider() { return [ @@ -143,11 +152,23 @@ public function executeDataProvider() ]; } + /** + * @param $value + * @param $label + * + * @return array + */ private function createFrontendInputValue($value, $label) { return ['value' => $value, 'label' => $label]; } + /** + * @param array $originalValues + * @param array $expectedValues + * + * @return MockObject + */ private function createForm(array $originalValues = [], array $expectedValues = []) { $form = $this->getMockBuilder(\Magento\Framework\Data\Form::class) diff --git a/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php b/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php index 0213173737b9b..f01922f42f40c 100644 --- a/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php +++ b/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php @@ -144,6 +144,9 @@ public function testExecutePostValidation($postData, $exceptionExpected) $this->controller->execute(); } + /** + * @return array + */ public function postDataProvider() { return [ diff --git a/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php b/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php index a238daafaafaf..cabcebda061f9 100644 --- a/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php +++ b/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php @@ -8,6 +8,9 @@ class IndexStub extends \Magento\Contact\Controller\Index { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php b/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php index 5694f3f3cab56..62ce6baf6c101 100644 --- a/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php +++ b/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php @@ -79,6 +79,9 @@ public function testGetCookieRestrictionLifetime() $this->assertEquals($this->_object->getCookieRestrictionLifetime(), 60 * 60 * 24 * 365); } + /** + * @return $this + */ protected function _initMock() { $scopeConfig = $this->_getConfigStub(); diff --git a/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php b/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php index 453a06651f354..0ae099fd78edc 100644 --- a/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php +++ b/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php @@ -236,6 +236,9 @@ public function testGetCurrencySymbol( $this->assertEquals($expectedSymbol, $currencySymbol); } + /** + * @return array + */ public function getCurrencySymbolDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php index b43b1d1aa39a9..618173e886e66 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php @@ -128,6 +128,9 @@ public function testGetConfig($isAutocomplete, $baseUrl, $registerUrl, $forgotUr $this->assertEquals($result, $this->model->getConfig()); } + /** + * @return array + */ public function dataProviderGetConfig() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php index 6489fea91e43e..793975c0b3191 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php @@ -22,6 +22,9 @@ protected function setUp() ->getObject(\Magento\Customer\Block\Account\Customer::class, ['httpContext' => $this->httpContext]); } + /** + * @return array + */ public function customerLoggedInDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php index 02d31d69e73df..ec84f53b7584e 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php @@ -204,6 +204,9 @@ public function testIsNewsletterEnabled($isNewsletterEnabled, $expectedValue) $this->assertEquals($expectedValue, $this->_block->isNewsletterEnabled()); } + /** + * @return array + */ public function isNewsletterEnabledProvider() { return [[true, true], [false, false]]; diff --git a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php index c12da66cdc616..92c2bcfeb8e59 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php @@ -14,6 +14,10 @@ class ItemTest extends \PHPUnit\Framework\TestCase /** @var \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item */ protected $itemBlock; + /** + * @param $amountOption + * @param bool $withoutOptions + */ public function configure($amountOption, $withoutOptions = false) { $options = []; @@ -95,6 +99,9 @@ public function testRender($amountOption, $expectedHtml) $this->assertXmlStringEqualsXmlString($expectedHtml, $realHtml); } + /** + * @return array + */ public function optionHtmlProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php index 3f174484df3e1..6ffe0da0c663e 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php @@ -159,6 +159,9 @@ public function testMethodWithNoSuchEntityException($method) $this->assertFalse($this->_block->{$method}()); } + /** + * @return array + */ public function methodDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php index 759d5f661c509..d9bf6a435ac15 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php @@ -529,6 +529,9 @@ public function testSuccessRedirect( $this->model->execute(); } + /** + * @return array + */ public function getSuccessRedirectDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php index 2b5438991b113..4ad1b5cbc96bd 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php @@ -578,6 +578,9 @@ public function testExecute( $this->assertEquals($this->resultRedirect, $this->model->execute()); } + /** + * @return array + */ public function dataProviderTestExecute() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php index 22c5003544bed..913c41070856e 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php @@ -164,6 +164,9 @@ protected function setUp() ]; } + /** + * @param int $populateSequence + */ protected function prepareMocksForTesting($populateSequence = 0) { $this->resultJsonFactory->expects($this->once()) diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php index 2552beeca463d..8fc4df1515b94 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php @@ -123,6 +123,9 @@ public function testExecute($sectionNames, $updateSectionID, $sectionNamesAsArra $this->loadAction->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php b/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php index a4246b6398fd1..5beea22bda3d7 100644 --- a/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php +++ b/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php @@ -86,6 +86,9 @@ public function testBeforeStart($result, $callCount) $this->plugin->beforeStart($this->sessionManager); } + /** + * @return array + */ public function beforeStartDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php b/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php index 50785247d7965..b2aa3161b36bf 100644 --- a/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php +++ b/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php @@ -78,6 +78,9 @@ public function testGetStreetLines($numLines, $expectedNumLines) $this->assertEquals($expectedNumLines, $this->helper->getStreetLines()); } + /** + * @return array + */ public function providerGetStreetLines() { return [ @@ -190,6 +193,9 @@ public function testConvertStreetLines($origStreets, $toCount, $result) $this->assertEquals($result, $this->helper->convertStreetLines($origStreets, $toCount)); } + /** + * @return array + */ public function getConvertStreetLinesDataProvider() { return [ @@ -330,6 +336,9 @@ public function testGetFormatTypeRenderer($code, $result) $this->assertEquals($result, $this->helper->getFormatTypeRenderer($code)); } + /** + * @return array + */ public function getFormatTypeRendererDataProvider() { $renderer = $this->getMockBuilder(\Magento\Customer\Block\Address\Renderer\RendererInterface::class) @@ -366,6 +375,9 @@ public function testGetFormat($code, $result) $this->assertEquals($result, $this->helper->getFormat($code)); } + /** + * @return array + */ public function getFormatDataProvider() { return [ @@ -396,6 +408,9 @@ public function testIsAttributeVisible($attributeCode, $isMetadataExists) $this->assertEquals($isMetadataExists, $this->helper->isAttributeVisible($attributeCode)); } + /** + * @return array + */ public function isAttributeVisibleDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php b/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php index 1b013a913b9f8..c64f7aca96fe6 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php @@ -39,6 +39,9 @@ public function testExemplarXml($fixtureXml, array $expectedErrors) $this->assertEquals($expectedErrors, $actualErrors); } + /** + * @return array + */ public function exemplarXmlDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/AttributeCheckerTest.php b/app/code/Magento/Customer/Test/Unit/Model/AttributeCheckerTest.php index 480f5be96e318..8454b793cf5ff 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/AttributeCheckerTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/AttributeCheckerTest.php @@ -75,6 +75,9 @@ public function testIsAttributeAllowedOnForm( $this->assertEquals($isAllowed, $this->model->isAttributeAllowedOnForm($attributeCode, $formName)); } + /** + * @return array + */ public function attributeOnFormDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php b/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php index ee788913373e5..14adc7bcf8795 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php @@ -196,6 +196,9 @@ public function testProcessAuthenticationFailureFirstAttempt( $this->authentication->processAuthenticationFailure($customerId); } + /** + * @return array + */ public function processAuthenticationFailureDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php index 9a9449a64ecbd..368e7cfd47f2f 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php @@ -39,6 +39,9 @@ public function testValidatePositive() $this->assertTrue($this->testable->validate($object)); } + /** + * @return array + */ public function passwordNegativeDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php index 029949c5f35b0..f3070c46ebb7b 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php @@ -493,6 +493,9 @@ private function attributeGetUsingMethodCallback() }; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCountryAttrMock() { $countryByWebsiteMock = $this->getMockBuilder(CountryWithWebsites::class) diff --git a/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php b/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php index f2db8c6cab6be..dc7cfbef3fa03 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php @@ -71,6 +71,12 @@ protected function setUp() ->getMock(); } + /** + * @param $entityTypeCode + * @param array $allowedExtensions + * + * @return FileProcessor + */ private function getModel($entityTypeCode, array $allowedExtensions = []) { $model = new FileProcessor( diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php index b9f8564d3616a..e4dc22ba40e31 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php @@ -94,6 +94,9 @@ public function testSetRequestScopeOnly($bool) $this->assertSame($bool, $this->_model->isRequestScopeOnly()); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; @@ -122,6 +125,9 @@ public function testApplyInputFilter($input, $output, $filter) $this->assertEquals($output, $this->_model->applyInputFilter($input)); } + /** + * @return array + */ public function applyInputFilterProvider() { return [ @@ -160,6 +166,9 @@ public function testDateFilterFormat($format, $output) $this->assertEquals($output, $actual); } + /** + * @return array + */ public function dateFilterFormatProvider() { return [[null, 'Whatever I put'], [false, self::MODEL], ['something else', self::MODEL]]; @@ -231,6 +240,9 @@ public function testValidateInputRule($value, $label, $inputValidation, $expecte $this->assertEquals($expectedOutput, $this->_model->validateInputRule($value)); } + /** + * @return array + */ public function validateInputRuleDataProvider() { return [ @@ -319,6 +331,9 @@ public function testGetRequestValue($request, $attributeCode, $requestScope, $re $this->assertEquals($expectedValue, $this->_model->getRequestValue($request)); } + /** + * @return array + */ public function getRequestValueDataProvider() { $expectedValue = 'EXPECTED_VALUE'; diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php index 4315340d65bff..d9f101b922cc8 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php @@ -28,6 +28,9 @@ public function testGetOptionText($value, $expected) $this->assertSame($expected, (string)$boolean->outputValue()); } + /** + * @return array + */ public function getOptionTextDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php index 2c09555374aef..6329970e0ca9c 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php @@ -112,6 +112,9 @@ public function testValidateValue($value, $validation, $required, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateValueDataProvider() { return [ @@ -163,6 +166,9 @@ public function testCompactValue($value, $expected) $this->assertSame($expected, $this->date->compactValue($value)); } + /** + * @return array + */ public function compactAndRestoreValueDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php index 97452b995ba0b..1cffaa6fe0379 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php @@ -118,6 +118,9 @@ public function testExtractValueNoRequestScope($expected, $attributeCode = '', $ } } + /** + * @return array + */ public function extractValueNoRequestScopeDataProvider() { return [ @@ -178,6 +181,9 @@ public function testExtractValueWithRequestScope($expected, $requestScope, $main } } + /** + * @return array + */ public function extractValueWithRequestScopeDataProvider() { return [ @@ -228,6 +234,9 @@ public function testValidateValueNotToUpload($expected, $value, $isAjax = false, $this->assertEquals($expected, $model->validateValue($value)); } + /** + * @return array + */ public function validateValueNotToUploadDataProvider() { return [ @@ -285,6 +294,9 @@ public function testValidateValueToUpload($expected, $value, $parameters = []) $this->assertEquals($expected, $model->validateValue($value)); } + /** + * @return array + */ public function validateValueToUploadDataProvider() { return [ @@ -429,6 +441,9 @@ public function testOutputValueNonJson($format) $this->assertSame('', $model->outputValue($format)); } + /** + * @return array + */ public function outputValueDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php index 25f10d7bb93c6..e74ddebdb597b 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php @@ -42,6 +42,9 @@ public function testValidateValueRequired($value, $expected) parent::testValidateValueRequired($value, $expected); } + /** + * @return array + */ public function validateValueRequiredDataProvider() { return array_merge( @@ -66,6 +69,9 @@ public function testValidateValueLength($value, $expected) parent::testValidateValueLength($value, $expected); } + /** + * @return array + */ public function validateValueLengthDataProvider() { return array_merge( diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php index c8564df6b086f..5861ef1f93784 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php @@ -42,6 +42,9 @@ public function testValidateValue($value, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateValueDataProvider() { return [ @@ -74,6 +77,9 @@ public function testValidateValueRequired($value, $expected) } } + /** + * @return array + */ public function validateValueRequiredDataProvider() { return [ @@ -145,6 +151,9 @@ public function testOutputValue($value, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function outputValueDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php index 9a3e1c1d8a7cb..b95987cba1dcf 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php @@ -52,6 +52,9 @@ public function testValidateValue($value, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateValueDataProvider() { return [ @@ -84,6 +87,9 @@ public function testValidateValueRequired($value, $expected) } } + /** + * @return array + */ public function validateValueRequiredDataProvider() { return [ @@ -150,6 +156,9 @@ public function testValidateValueLength($value, $expected) } } + /** + * @return array + */ public function validateValueLengthDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php index bef2db9bf2694..354932b0ede0b 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php @@ -79,6 +79,9 @@ public function testIsValid($isValid) $this->assertEquals($isValid, $this->validator->isValid(new \Magento\Framework\DataObject($data))); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php b/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php index 759c823eec7f9..c655ff7056ed6 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php @@ -90,6 +90,9 @@ public function testRender($regionCollection) $this->assertContains('required-entry', $html); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php index 723ce6fa1826a..466d44c58ca3f 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php @@ -227,6 +227,9 @@ protected function prepareValidatorFactory() return $validatorFactory; } + /** + * @return \Magento\Customer\Model\CustomerFactory|\PHPUnit_Framework_MockObject_MockObject + */ protected function prepareCustomerFactory() { $this->customerFactory = $this->createPartialMock(\Magento\Customer\Model\CustomerFactory::class, ['create']); @@ -248,16 +251,27 @@ class SubResourceModelAddress extends \Magento\Customer\Model\ResourceModel\Addr { protected $attributeLoader; + /** + * @param null $object + * + * @return \Magento\Customer\Model\ResourceModel\Address|\Magento\Eav\Model\Entity\AbstractEntity + */ public function loadAllAttributes($object = null) { return $this->getAttributeLoader()->loadAllAttributes($this, $object); } + /** + * @param $attributeLoader + */ public function setAttributeLoader($attributeLoader) { $this->attributeLoader = $attributeLoader; } + /** + * @return \Magento\Eav\Model\Entity\AttributeLoaderInterface + */ protected function getAttributeLoader() { return $this->attributeLoader; diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php index 61081e1aaf224..76651f9f07589 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php @@ -227,6 +227,9 @@ public function testAddFieldToFilterInconsistentArrays($fields, $conditions) $this->serviceCollection->addFieldToFilter($fields, $conditions); } + /** + * @return array + */ public function addFieldToFilterInconsistentArraysDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php b/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php index 939e2856f5eaa..8592d1bda66c1 100644 --- a/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php +++ b/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php @@ -411,6 +411,9 @@ public function testAfterAddressSaveDefaultGroup( $this->model->execute($observer); } + /** + * @return array + */ public function dataProviderAfterAddressSaveDefaultGroup() { return [ @@ -600,6 +603,9 @@ public function testAfterAddressSaveNewGroup( $this->model->execute($observer); } + /** + * @return array + */ public function dataProviderAfterAddressSaveNewGroup() { return [ diff --git a/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php b/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php index 7822e75930eba..737ad55d5e09b 100644 --- a/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php +++ b/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php @@ -57,6 +57,9 @@ public function testExecute(bool $hasChanges, $expectedMessage, $expectedCode) $this->assertSame($expectedCode, $tester->getStatusCode()); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php b/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php index 3fe1c9800a730..75edc8cb4f6ee 100644 --- a/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php +++ b/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php @@ -187,6 +187,9 @@ public function testDeploy($options, $expectedContentVersion) $this->assertEquals(null, $this->service->deploy($options)); } + /** + * @return array + */ public function deployDataProvider() { return [ diff --git a/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php b/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php index 94d7cd250adda..9b964566f6093 100644 --- a/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php @@ -68,6 +68,9 @@ public function testIsDevAllowed($allowedIps, $expected, $callNum = 1) $this->assertEquals($expected, $this->helper->isDevAllowed($storeId)); } + /** + * @return array + */ public function isDevAllowedDataProvider() { return [ diff --git a/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php b/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php index d23fc89acc1b3..fd2475320261a 100644 --- a/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php +++ b/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php @@ -33,6 +33,9 @@ public function testRender($showBlockHints) $this->assertNotNull($actualResult); } + /** + * @return array + */ public function renderDataProvider() { return ['block hints disabled' => [false], 'block hints enabled' => [true]]; diff --git a/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php b/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php index 76b23e4e79ec2..7ec34f609a29f 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php @@ -34,6 +34,9 @@ public function testConstructorException(array $configData, $expectedException) new \Magento\Directory\Model\Currency\Import\Config($configData); } + /** + * @return array + */ public function constructorExceptionDataProvider() { return [ @@ -79,6 +82,9 @@ public function testGetServiceClass($serviceName, $expectedResult) $this->assertEquals($expectedResult, $this->_model->getServiceClass($serviceName)); } + /** + * @return array + */ public function getServiceClassDataProvider() { return ['known' => ['service_one', 'Service_One'], 'unknown' => ['unknown', null]]; @@ -94,6 +100,9 @@ public function testGetServiceLabel($serviceName, $expectedResult) $this->assertEquals($expectedResult, $this->_model->getServiceLabel($serviceName)); } + /** + * @return array + */ public function getServiceLabelDataProvider() { return ['known' => ['service_one', 'Service One'], 'unknown' => ['unknown', null]]; diff --git a/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php b/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php index 915c11fe1b787..67dbe573b32d5 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php @@ -183,6 +183,9 @@ public function testGetCurrencySymbol() $this->assertEquals($currencySymbol, $this->priceCurrency->getCurrencySymbol($storeId, $currencyMock)); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getCurrentCurrencyMock() { $currency = $this->getMockBuilder(\Magento\Directory\Model\Currency::class) @@ -192,6 +195,11 @@ protected function getCurrentCurrencyMock() return $currency; } + /** + * @param $baseCurrency + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getStoreMock($baseCurrency) { $store = $this->getMockBuilder(\Magento\Store\Model\Store::class) @@ -205,6 +213,13 @@ protected function getStoreMock($baseCurrency) return $store; } + /** + * @param $amount + * @param $convertedAmount + * @param $currency + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getBaseCurrencyMock($amount, $convertedAmount, $currency) { $baseCurrency = $this->getMockBuilder(\Magento\Directory\Model\Currency::class) diff --git a/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php b/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php index 13f474e5f0bf8..be0ebeabee62c 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php @@ -156,6 +156,12 @@ public function testGetJsonConfig() $this->assertEquals(json_encode($config), $encodedJsonConfig); } + /** + * @param $linkPrice + * @param $linkId + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getLinkMock($linkPrice, $linkId) { $linkMock = $this->createPartialMock(\Magento\Downloadable\Model\Link::class, ['getPrice', diff --git a/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php b/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php index 3b3683c6af3e7..25a5d86b0385c 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php @@ -99,6 +99,9 @@ public function testAfterInitializeWithNoDataToSave($downloadable) $this->downloadablePlugin->afterInitialize($this->subjectMock, $this->productMock); } + /** + * @return array + */ public function afterInitializeWithEmptyDataDataProvider() { return [ diff --git a/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php b/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php index 3142900613296..7749c5980c864 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php @@ -155,6 +155,9 @@ public function testGetContentTypeThroughHelper($functionExistsResult, $mimeCont $this->assertEquals(self::MIME_TYPE, $this->_helper->getContentType()); } + /** + * @return array + */ public function dataProviderForTestGetContentTypeThroughHelper() { return [[false, ''], [true, false]]; @@ -187,6 +190,11 @@ public function testGetFileNameUrlWithContentDisposition() $this->assertEquals($fileName, $this->_helper->getFilename()); } + /** + * @param bool $doesExist + * @param int $size + * @param string $path + */ protected function _setupFileMocks($doesExist = true, $size = self::FILE_SIZE, $path = self::FILE_PATH) { $this->_handleMock->expects($this->any())->method('stat')->will($this->returnValue(['size' => $size])); @@ -199,6 +207,11 @@ protected function _setupFileMocks($doesExist = true, $size = self::FILE_SIZE, $ $this->_helper->setResource($path, DownloadHelper::LINK_TYPE_FILE); } + /** + * @param int $size + * @param string $url + * @param array $additionalStatData + */ protected function _setupUrlMocks($size = self::FILE_SIZE, $url = self::URL, $additionalStatData = []) { $this->_handleMock->expects( diff --git a/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php b/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php index d835f25523353..9ce917433ff1f 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php @@ -539,6 +539,10 @@ public function testGetList() $this->assertEquals([$linkInterfaceMock], $this->service->getList($productSku)); } + /** + * @param $resource + * @param $inputData + */ protected function setLinkAssertions($resource, $inputData) { $resource->expects($this->any())->method('getId')->will($this->returnValue($inputData['id'])); diff --git a/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php b/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php index 5a138d83d2673..e63ce2437035b 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php @@ -104,6 +104,9 @@ protected function setUp() ); } + /** + * @return array + */ public function setLinkStatusPendingDataProvider() { return [ diff --git a/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php b/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php index 467e1f428206b..e634f0ffa341d 100644 --- a/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php +++ b/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php @@ -7,11 +7,17 @@ use Magento\Downloadable\Test\Unit\Helper\DownloadTest; +/** + * @return bool + */ function function_exists() { return DownloadTest::$functionExists; } +/** + * @return string + */ function mime_content_type() { return DownloadTest::$mimeContentType; diff --git a/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php b/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php index 572e7192d810e..3699851f6b0e6 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php @@ -50,6 +50,12 @@ public function testCreateAttribute() $this->assertEquals($this->_className, $this->_factory->createAttribute($this->_className, $this->_arguments)); } + /** + * @param $className + * @param $arguments + * + * @return mixed + */ public function getModelInstance($className, $arguments) { $this->assertInternalType('array', $arguments); diff --git a/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php b/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php index d2067bccef0bb..67cb65c21443e 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php @@ -198,6 +198,9 @@ public function testDatabaseToEntity() $this->assertEquals($expected, $actual); } + /** + * @return array + */ private function getAttributes() { /* Attribute with the code we want to copy */ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php index 67899dc3902eb..1203e2cecb477 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php @@ -61,6 +61,9 @@ public function testCompareAttributes($attribute1Sort, $attribute2Sort, $expecte $this->assertEquals($expected, $this->_model->attributesCompare($attribute1, $attribute2)); } + /** + * @return array + */ public static function compareAttributesDataProvider() { return [ @@ -313,6 +316,9 @@ function ($entityType, $attributeCode) use ($attributes) { $model->save($object); } + /** + * @return array + */ public function productAttributesDataProvider() { $attributeSetId = 10; diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php index 3c0e304dbf628..475ffea98e90e 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php @@ -40,6 +40,9 @@ public function testValidate($data) $this->assertEquals(null, $product->getEmpty()); } + /** + * @return array + */ public static function attributeValueDataProvider() { return [[[1, 2, 3]], ['1,2,3']]; diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php index 31bf623b4bbdd..e309248168e89 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php @@ -207,6 +207,9 @@ public function testGetSpecificOptions($optionIds, $withEmpty) $this->assertEquals($options, $this->model->getSpecificOptions($optionIds, $withEmpty)); } + /** + * @return array + */ public function specificOptionsProvider() { return [ @@ -266,6 +269,9 @@ public function testGetOptionText($optionsIds, $value, $options, $expectedResult $this->assertEquals($expectedResult, $this->model->getOptionText($value)); } + /** + * @return array + */ public function getOptionTextProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php index 27957e8090d3e..911aecf8e7cfb 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php @@ -33,6 +33,9 @@ public function testGetBackendTypeByInput($givenFrontendInput, $expectedBackendT $this->assertEquals($expectedBackendType, $this->_model->getBackendTypeByInput($givenFrontendInput)); } + /** + * @return array + */ public static function dataGetBackendTypeByInput() { return [ @@ -61,6 +64,9 @@ public function testGetDefaultValueByInput($givenFrontendInput, $expectedDefault $this->assertEquals($expectedDefaultValue, $this->_model->getDefaultValueByInput($givenFrontendInput)); } + /** + * @return array + */ public static function dataGetDefaultValueByInput() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php index 88185387ed398..13c07740eb203 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php @@ -178,6 +178,9 @@ public function testRemoveItemByKey($values, $count) $this->assertNull($this->model->getItemById($testId)); } + /** + * @return array + */ public function getItemsDataProvider() { return [ @@ -187,6 +190,9 @@ public function getItemsDataProvider() ]; } + /** + * @return \Magento\Framework\DataObject + */ public function getMagentoObject() { return new \Magento\Framework\DataObject(); diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php index d281b8d1095f4..cce7b43786a76 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php @@ -68,6 +68,9 @@ public function testFetchItem(array $data) } } + /** + * @return array + */ public static function fetchItemDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php index 16ba85f4905ea..50e7f185a24e5 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php @@ -37,6 +37,9 @@ public function testGetNextId($lastId, $prefix, $expectedResult) $this->assertEquals($expectedResult, $this->model->getNextId()); } + /** + * @return array + */ public function getLastIdDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php index a976fc1f3e654..16767fb633028 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php @@ -32,6 +32,9 @@ public function testGetNextId($lastId, $prefix, $expectedResult) $this->assertEquals($expectedResult, $this->model->getNextId()); } + /** + * @return array + */ public function getLastIdDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php index 823f32f46b9a5..f1e776de265da 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php @@ -174,6 +174,9 @@ public function testInitSelect($column, $value) $this->model->getSelectCountSql()->assemble(); } + /** + * @return array + */ public function initSelectDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php index 8e6fa3afd15b9..ea02ec71a7bbd 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php @@ -90,6 +90,9 @@ public function testGetAttributes($entityType, $attributeSetId, $expectedConditi $this->assertEquals([$attributeMock], $this->attributeLoader->getAttributes($entityType, $attributeSetId)); } + /** + * @return array + */ public function getAttributesDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php index 4565b75e5f415..82e9033496b78 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php @@ -115,6 +115,9 @@ public function testExecute($eavEntityType, $callNum, array $expected, $isStatic $this->assertEquals($expected, $this->readHandler->execute('entity_type', $entityData)); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php b/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php index 76bbba7406609..e26df4f6d1197 100644 --- a/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php @@ -383,6 +383,9 @@ public function testSetDesignConfigWithValidInputParametersReturnsSuccess() $this->assertEquals($config, $model->getDesignConfig()->getData()); } + /** + * @return array + */ public function invalidInputParametersDataProvider() { return [[[]], [['area' => 'some_area']], [['store' => 'any_store']]]; diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php index f7ba4b7424cc6..5f8bef5c0c489 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php @@ -29,6 +29,9 @@ public function testMergedXml($fixtureXml, array $expectedErrors) $this->_testXmlAgainstXsd($fixtureXml, $schemaFile, $expectedErrors); } + /** + * @return array + */ public function mergedXmlDataProvider() { return [ diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php index 6a565ca08eb9b..ac14d07d4fa58 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php @@ -190,6 +190,9 @@ public function testParseTemplateIdParts($input, $expectedOutput) $this->assertEquals($this->model->parseTemplateIdParts($input), $expectedOutput); } + /** + * @return array + */ public function parseTemplateCodePartsDataProvider() { return [ @@ -301,6 +304,9 @@ public function testGetterMethodUnknownTemplate($getterMethod, $argument = null) } } + /** + * @return array + */ public function getterMethodUnknownTemplateDataProvider() { return [ @@ -348,6 +354,9 @@ public function testGetterMethodUnknownField( } } + /** + * @return array + */ public function getterMethodUnknownFieldDataProvider() { return [ diff --git a/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php b/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php index 3e6661816945a..6750fc3d3f49d 100644 --- a/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php @@ -298,6 +298,9 @@ public function testLoadDefault( $this->assertEquals($expectedTemplateStyles, $model->getTemplateStyles()); } + /** + * @return array + */ public function loadDefaultDataProvider() { return [ @@ -453,6 +456,9 @@ public function testIsValidForSend($senderName, $senderEmail, $templateSubject, $this->assertEquals($expectedValue, $model->isValidForSend()); } + /** + * @return array + */ public function isValidForSendDataProvider() { return [ @@ -548,6 +554,9 @@ public function testGetVariablesOptionArray($withGroup, $templateVariables, $exp $this->assertEquals($expectedResult, $model->getVariablesOptionArray($withGroup)); } + /** + * @return array + */ public function getVariablesOptionArrayDataProvider() { return [ @@ -648,6 +657,9 @@ public function testProcessTemplate($templateId, $expectedResult) $this->assertTrue($model->getUseAbsoluteLinks()); } + /** + * @return array + */ public function processTemplateVariable() { return [ @@ -744,6 +756,9 @@ public function testGetType($templateType, $expectedResult) $this->assertEquals($expectedResult, $model->getType()); } + /** + * @return array + */ public function getTypeDataProvider() { return [['text', 1], ['html', 2]]; diff --git a/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php b/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php index 35759f4d3f44a..f83f2304143a1 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php @@ -39,6 +39,9 @@ public function testProcess($itemId, array $jsLayout, array $result) $this->assertEquals($result, $this->model->process($jsLayout, $itemMock)); } + /** + * @return array + */ public function dataProviderProcess() { return [ diff --git a/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php b/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php index faa28603af62e..794837f9d6e74 100644 --- a/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php @@ -91,6 +91,9 @@ public function testGetLanguageCodes() $this->assertEquals($languages, $this->_helper->getLanguageCodes()); } + /** + * @return array + */ public function dataProviderForTestConvertLanguage() { return [ diff --git a/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php b/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php index cf013780105a7..76a746ea77b92 100644 --- a/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php +++ b/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php @@ -17,6 +17,9 @@ protected function setUp() $this->_model = new \Magento\GoogleAdwords\Model\Filter\UppercaseTitle(); } + /** + * @return array + */ public function dataProviderForFilterValues() { return [['some name', 'Some Name'], ['test', 'Test']]; diff --git a/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php b/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php index ccda04d052fc9..ab8e4f7f8dca8 100644 --- a/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php +++ b/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php @@ -56,6 +56,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataProviderForDisabled() { return [[false, false], [false, true], [true, false]]; @@ -88,6 +91,9 @@ function () use ($isDynamic) { $this->assertSame($this->_model, $this->_model->execute($this->_eventObserverMock)); } + /** + * @return array + */ public function dataProviderForOrdersIds() { return [[[]], ['']]; diff --git a/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php b/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php index ffcfa5c0a90d7..9a4ddeb4f55f5 100644 --- a/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php +++ b/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php @@ -57,6 +57,9 @@ protected function setUp() ); } + /** + * @return array + */ public function linksDataProvider() { return [ @@ -107,6 +110,9 @@ public function testSaveLinksDataWithProductsAttrs($linksData) $this->links->saveLinksData($linksData); } + /** + * @return array + */ public function attributesDataProvider() { return [ @@ -135,6 +141,9 @@ public function attributesDataProvider() ]; } + /** + * @param $dbAttributes + */ protected function processAttributeGetter($dbAttributes) { $select = $this->createMock(\Magento\Framework\DB\Select::class); @@ -162,6 +171,9 @@ public function testGetAttributes($dbAttributes, $returnedAttributes) $this->assertEquals($returnedAttributes, $actualAttributes); } + /** + * @param $behavior + */ protected function processBehaviorGetter($behavior) { $dataSource = $this->createMock(\Magento\ImportExport\Model\ResourceModel\Import\Data::class); diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php index 77ffb200f84e0..e8ed2e5d6f880 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php @@ -111,6 +111,9 @@ public function testSetPreconfiguredValue($id) $this->groupedView->setPreconfiguredValue(); } + /** + * @return array + */ public function setPreconfiguredValueDataProvider() { return ['item_id_exist_in_config' => ['id_one'], 'item_id_not_exist_in_config' => ['id_two']]; diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php index 309794a6cc37d..2dbdbb551f97a 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php @@ -92,6 +92,9 @@ public function testBeforeInitializeLinksRequestDoesNotHaveGrouped($productType) $this->model->beforeInitializeLinks($this->subjectMock, $this->productMock, []); } + /** + * @return array + */ public function productTypeDataProvider() { return [ @@ -141,6 +144,9 @@ public function testBeforeInitializeLinksRequestHasGrouped($linksData) $this->model->beforeInitializeLinks($this->subjectMock, $this->productMock, ['associated' => $linksData]); } + /** + * @return array + */ public function linksDataProvider() { return [ diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php index 13e1dde0c526c..dd640579ca65e 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php @@ -102,6 +102,11 @@ public function testGetValueWithoutMinProduct() $this->assertEquals(0.00, $this->finalPrice->getValue()); } + /** + * @param $price + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getProductMock($price) { $priceTypeMock = $this->createMock(\Magento\Catalog\Pricing\Price\FinalPrice::class); diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php index 8dc8fc0483d41..9a4662ffa42cc 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php @@ -75,6 +75,9 @@ protected function setUp() ->getMockForAbstractClass(); } + /** + * @return object + */ protected function getModel() { return $this->objectManager->getObject(GroupedProductDataProvider::class, [ diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php index 953f76f6cf702..f9d0cf11179dc 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php @@ -65,6 +65,9 @@ public function testGetEntities($value, $expected) $this->assertEquals($expected, $this->model->getEntities('entities')); } + /** + * @return array + */ public function getEntitiesDataProvider() { return [ @@ -100,6 +103,9 @@ public function testGetEntityTypes($configData, $entity, $expectedResult) $this->assertEquals($expectedResult, $this->model->getEntityTypes($entity)); } + /** + * @return array + */ public function getEntityTypesDataProvider() { return [ @@ -154,6 +160,9 @@ public function testGetFileFormats($value, $expected) $this->assertEquals($expected, $this->model->getFileFormats('fileFormats')); } + /** + * @return array + */ public function getFileFormatsDataProvider() { return [ diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php index 688e3a2659c6d..aa37551034a25 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php @@ -65,6 +65,9 @@ public function testGetEntities($value, $expected) $this->assertEquals($expected, $this->model->getEntities('entities')); } + /** + * @return array + */ public function getEntitiesDataProvider() { return [ @@ -100,6 +103,9 @@ public function testGetEntityTypes($configData, $entity, $expectedResult) $this->assertEquals($expectedResult, $this->model->getEntityTypes($entity)); } + /** + * @return array + */ public function getEntityTypesDataProvider() { return [ diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php index 6ef2ef02865f1..7fb9457c2d704 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php @@ -39,6 +39,9 @@ public function testConstructorFileDestinationMatch($fileName, $expectedfileName $this->_invokeConstructor($fileName); } + /** + * @return array + */ public function constructorFileDestinationMatchDataProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php b/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php index 5bc20e0633191..490d9437941f6 100644 --- a/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php +++ b/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php @@ -62,6 +62,9 @@ public function testExecute($isExist, $callCount) $this->assertEquals(0, $this->entryPoint->launch()->getCode()); } + /** + * @return array + */ public function executeProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php index 6ae005efa0550..1a226e073ca5e 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php @@ -31,6 +31,9 @@ public function testRender($rowValue, $class, $text) $this->assertEquals($result, $html); } + /** + * @return array + */ public function typeProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php index e419a010ad96d..705a9e3998ae8 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php @@ -33,6 +33,9 @@ public function testRender($indexValues, $expectedResult) ); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php index e1ad5c50f3c91..369a4d46abf49 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php @@ -27,6 +27,9 @@ public function testRender($defaultValue, $assert) $this->assertEquals($result, $assert); } + /** + * @return array + */ public function renderProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php b/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php index e9c82906121cc..6b7cc12218990 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php @@ -323,6 +323,9 @@ function () { $this->model->reindexAll(); } + /** + * @return array + */ protected function getIndexerData() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php b/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php index f7b99fdb8d23f..46ae79fc92f4a 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php @@ -165,6 +165,9 @@ public function testInsertFromTable($readToIndex) ); } + /** + * @return array + */ public function insertFromTableData() { return [[false], [true]]; diff --git a/app/code/Magento/Indexer/Ui/DataProvider/Indexer/DataCollection.php b/app/code/Magento/Indexer/Ui/DataProvider/Indexer/DataCollection.php index 5ba4521791c50..0b6477e550c7e 100644 --- a/app/code/Magento/Indexer/Ui/DataProvider/Indexer/DataCollection.php +++ b/app/code/Magento/Indexer/Ui/DataProvider/Indexer/DataCollection.php @@ -23,6 +23,13 @@ class DataCollection extends Collection */ private $indexerRegistry; + /** + * DataCollection constructor. + * + * @param EntityFactoryInterface $entityFactory + * @param ConfigInterface $config + * @param IndexerRegistry $indexerRegistry + */ public function __construct( EntityFactoryInterface $entityFactory, ConfigInterface $config, diff --git a/app/code/Magento/InstantPurchase/Controller/Button/PlaceOrder.php b/app/code/Magento/InstantPurchase/Controller/Button/PlaceOrder.php index 56ed9ca583a2b..3d46e1ef7466e 100644 --- a/app/code/Magento/InstantPurchase/Controller/Button/PlaceOrder.php +++ b/app/code/Magento/InstantPurchase/Controller/Button/PlaceOrder.php @@ -76,6 +76,18 @@ class PlaceOrder extends Action */ private $orderRepository; + /** + * PlaceOrder constructor. + * + * @param Context $context + * @param StoreManagerInterface $storeManager + * @param Session $customerSession + * @param FormKeyValidator $formKeyValidator + * @param InstantPurchaseOptionLoadingFactory $instantPurchaseOptionLoadingFactory + * @param ProductRepositoryInterface $productRepository + * @param PlaceOrderModel $placeOrder + * @param OrderRepositoryInterface $orderRepository + */ public function __construct( Context $context, StoreManagerInterface $storeManager, diff --git a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php index 5a43783ceea6a..a5bb2e2a834a8 100644 --- a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php +++ b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php @@ -15,6 +15,11 @@ class DeferredShippingMethodChooserPool { private $choosers; + /** + * DeferredShippingMethodChooserPool constructor. + * + * @param array $choosers + */ public function __construct(array $choosers) { foreach ($choosers as $chooser) { @@ -28,6 +33,11 @@ public function __construct(array $choosers) $this->choosers = $choosers; } + /** + * @param $type + * + * @return DeferredShippingMethodChooserInterface + */ public function get($type) : DeferredShippingMethodChooserInterface { if (!isset($this->choosers[$type])) { diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php index b5f2b22186187..7738e9939fcdd 100644 --- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php +++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php @@ -83,6 +83,9 @@ public function testCanShowTab($integrationData, $expectedValue) $this->assertEquals($expectedValue, $this->webapiBlock->canShowTab()); } + /** + * @return array + */ public function canShowTabProvider() { return [ @@ -127,6 +130,9 @@ public function testIsEverythingAllowed($rootResourceId, $integrationData, $sele $this->assertEquals($expectedValue, $this->webapiBlock->isEverythingAllowed()); } + /** + * @return array + */ public function isEverythingAllowedProvider() { return [ diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php index 91f56279a89e5..30f1dc1d90bdc 100644 --- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php +++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php @@ -87,6 +87,9 @@ public function testRender($endpoint, $name, $expectedResult) $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function endpointDataProvider() { return [ diff --git a/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php b/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php index ca79393efb113..0cb550913ba60 100644 --- a/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php @@ -33,6 +33,9 @@ public function testIsConfigType($integrationsData, $expectedResult) $this->assertEquals($expectedResult, $this->dataHelper->isConfigType($integrationsData)); } + /** + * @return array + */ public function integrationDataProvider() { return [ diff --git a/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php b/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php index ebdac167d257c..19734c535a101 100644 --- a/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php +++ b/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php @@ -197,6 +197,11 @@ public function testPostToConsumer() $this->assertEquals($oauthVerifier, $verifier, 'Checking Oauth Verifier'); } + /** + * @param $length + * + * @return bool|string + */ private function _generateRandomString($length) { return substr( diff --git a/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php b/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php index 529703500d4f0..76ce7d211691d 100644 --- a/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php +++ b/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php @@ -156,6 +156,11 @@ public function tearDown() unset($this->_oauth); } + /** + * @param array $amendments + * + * @return array + */ protected function _getRequestTokenParams($amendments = []) { $requiredParams = [ @@ -233,6 +238,9 @@ public function testGetRequestTokenOutdatedConsumerKey() $this->_oauth->getRequestToken($this->_getRequestTokenParams(), self::REQUEST_URL); } + /** + * @param bool $isLoadable + */ protected function _setupConsumer($isLoadable = true) { $this->_consumerMock->expects($this->any())->method('loadByKey')->will($this->returnSelf()); @@ -293,6 +301,9 @@ public function testGetRequestTokenOauthTimestampRefused($timestamp) ); } + /** + * @return array + */ public function dataProviderForGetRequestTokenNonceTimestampRefusedTest() { return [ @@ -302,6 +313,10 @@ public function dataProviderForGetRequestTokenNonceTimestampRefusedTest() ]; } + /** + * @param bool $isUsed + * @param int $timestamp + */ protected function _setupNonce($isUsed = false, $timestamp = 0) { $nonceMock = $this->getMockBuilder( @@ -361,6 +376,13 @@ public function testGetRequestTokenNoConsumer() $this->_oauth->getRequestToken($this->_getRequestTokenParams(), self::REQUEST_URL); } + /** + * @param bool $doesExist + * @param string $type + * @param int $consumerId + * @param null $verifier + * @param bool $isRevoked + */ protected function _setupToken( $doesExist = true, $type = \Magento\Integration\Model\Oauth\Token::TYPE_VERIFIER, @@ -604,6 +626,9 @@ public function testGetAccessTokenVerifierInvalid($verifier, $verifierFromToken) ); } + /** + * @return array + */ public function dataProviderForGetAccessTokenVerifierInvalidTest() { // Verifier is not a string @@ -789,6 +814,9 @@ public function testMissingParamForBuildAuthorizationHeader($expectedMessage, $r $this->_oauth->buildAuthorizationHeader($request, $requestUrl); } + /** + * @return array + */ public function dataProviderMissingParamForBuildAuthorizationHeaderTest() { return [ @@ -838,6 +866,11 @@ public function dataProviderMissingParamForBuildAuthorizationHeaderTest() ]; } + /** + * @param array $amendments + * + * @return array + */ protected function _getAccessTokenRequiredParams($amendments = []) { $requiredParams = [ @@ -855,6 +888,11 @@ protected function _getAccessTokenRequiredParams($amendments = []) return array_merge($requiredParams, $amendments); } + /** + * @param $length + * + * @return bool|string + */ private function _generateRandomString($length) { return substr( diff --git a/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php b/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php index 52a711fad2b60..74e42e38ee6b4 100644 --- a/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php +++ b/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php @@ -138,6 +138,9 @@ public function testCanShowBlockWithDifferentDisplayModes(string $mode, bool $re $this->assertEquals($result, $this->model->canShowBlock()); } + /** + * @return array + */ public function canShowBlockDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php b/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php index 46becd82343e9..48c7c0eda03d6 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php @@ -229,6 +229,9 @@ public function testCatchException($isDeveloper, $setBodyCalls) $this->model->catchException($bootstrap, $exception); } + /** + * @return array + */ public function catchExceptionDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php index 0c50b6e130484..88f368fbbe077 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php @@ -87,6 +87,9 @@ public function testCollectFileInfo($path, $expectedDir, $expectedFile) $this->assertEquals($expected, $this->helper->collectFileInfo($mediaDirectory, $path)); } + /** + * @return array + */ public function pathDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php index 6ff2397f543fa..56f57a9d32c1f 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php @@ -75,6 +75,9 @@ public function testCheckDbUsage($storage, $expected) $this->assertEquals($expected, $this->helper->checkDbUsage()); } + /** + * @return array + */ public function checkDbUsageDataProvider() { return [ @@ -144,6 +147,9 @@ public function testSaveFile($storage, $callNum) $this->helper->saveFile('media-dir/filename'); } + /** + * @return array + */ public function updateFileDataProvider() { return [ @@ -226,6 +232,9 @@ public function testFileExists($storage, $callNum, $expected) $this->assertEquals($expected, $this->helper->fileExists('media-dir/file')); } + /** + * @return array + */ public function fileExistsDataProvider() { return [ @@ -264,6 +273,9 @@ public function testGetUniqueFilename($storage, $callNum, $expected) $this->assertSame($expected, $this->helper->getUniqueFilename('media-dir/directory/', 'filename.ext')); } + /** + * @return array + */ public function getUniqueFilenameDataProvider() { return [ @@ -308,6 +320,9 @@ public function testSaveFileToFileSystem($expected, $storage, $callNum, $id = 0, $this->assertEquals($expected, $this->helper->saveFileToFilesystem('media-dir/filename')); } + /** + * @return array + */ public function saveFileToFileSystemDataProvider() { return [ @@ -430,6 +445,9 @@ public function testSaveUploadedFile($result, $expected, $expectedFullPath, $sto $this->assertEquals($expected, $this->helper->saveUploadedFile($result)); } + /** + * @return array + */ public function saveUploadedFileDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php index 8725bf1f0f02f..d1ae631a351c3 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php @@ -77,6 +77,9 @@ public function testIsInternalStorage($storage, $callNum, $expected) $this->assertEquals($expected, $this->helper->isInternalStorage($storage)); } + /** + * @return array + */ public function isInternalStorageDataProvider() { return [ @@ -146,6 +149,9 @@ public function testProcessStorageFile($expected, $storage, $callNum, $callSaveF $this->assertEquals($expected, $this->helper->processStorageFile($filename)); } + /** + * @return array + */ public function processStorageFileDataProvider() { return [ diff --git a/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php b/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php index c2bfe2137c72e..080c26dea4834 100644 --- a/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php +++ b/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php @@ -115,6 +115,9 @@ public function testIsAddressDefaultShipping($id, $expectedValue) $this->assertEquals($expectedValue, $this->block->isAddressDefaultShipping($this->addressMock)); } + /** + * @return array + */ public function isDefaultAddressDataProvider() { return [ diff --git a/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php b/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php index 7628fcf6270c7..6a5cd7ab6e21c 100644 --- a/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php +++ b/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php @@ -164,6 +164,9 @@ public function testExecute($backUrl, $shippingAddress, $url) $this->controller->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/NewRelicReporting/Plugin/StatePlugin.php b/app/code/Magento/NewRelicReporting/Plugin/StatePlugin.php index 0be7c72689e7f..d84f278bb1c68 100644 --- a/app/code/Magento/NewRelicReporting/Plugin/StatePlugin.php +++ b/app/code/Magento/NewRelicReporting/Plugin/StatePlugin.php @@ -65,6 +65,12 @@ public function afterSetAreaCode(State $state, $result) } } + /** + * @param State $state + * + * @return string + * @throws LocalizedException + */ private function appName(State $state) { $code = $state->getAreaCode(); @@ -73,6 +79,9 @@ private function appName(State $state) return $current . ';' . $current . '_' . $code; } + /** + * @return bool + */ private function shouldSetAppName() { if (!$this->config->isNewRelicEnabled()) { diff --git a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php index eb665773d5f4b..1193ac088633f 100644 --- a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php +++ b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php @@ -252,6 +252,9 @@ public function testSetDeploymentRequestFail() ); } + /** + * @return array + */ private function getDataVariables() { $description = 'Event description'; diff --git a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php index a9dbacdfb0405..71f818407f9e1 100644 --- a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php +++ b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php @@ -346,6 +346,9 @@ public function testGetModuleDataRefreshOrStatement($data) ); } + /** + * @return array + */ public function itemDataProvider() { return [ diff --git a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php index 20791511324bf..ba5f13d247fe0 100644 --- a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php +++ b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php @@ -140,6 +140,9 @@ public function testReportProductUpdatedToNewRelic($isNewObject) $this->model->execute($eventObserver); } + /** + * @return array + */ public function actionDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php index 7dd96be11bcbe..18721382ae872 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php @@ -378,6 +378,9 @@ public function testReceived() $this->assertEquals($this->subscriber, $this->subscriber->received($queue)); } + /** + * @return $this + */ protected function sendEmailCheck() { $storeModel = $this->getMockBuilder(\Magento\Store\Model\Store::class) diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php index 5773c77c5f7f9..52bb803dd377f 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php @@ -401,6 +401,9 @@ public function testIsValidForSend($senderName, $senderEmail, $templateSubject, $this->assertEquals($expectedValue, $model->isValidForSend()); } + /** + * @return array + */ public function isValidForSendDataProvider() { return [ diff --git a/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php b/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php index 7509ff03c3780..8d65146ec102b 100644 --- a/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php +++ b/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php @@ -63,6 +63,9 @@ public function testGetConfig($isAvailable, $mailingAddress, $payableTo, $result $this->assertEquals($result, $this->model->getConfig()); } + /** + * @return array + */ public function dataProviderGetConfig() { $checkmoCode = Checkmo::PAYMENT_METHOD_CHECKMO_CODE; diff --git a/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php b/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php index 120a7eb6ed88f..97a64d8ab59b9 100644 --- a/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php +++ b/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php @@ -82,6 +82,9 @@ public function testGetConfig($isOneAvailable, $instructionsOne, $isTwoAvailable $this->assertEquals($result, $this->model->getConfig()); } + /** + * @return array + */ public function dataProviderGetConfig() { $oneCode = Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE; diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php index 185f393ad4d0b..5f0894874ca3c 100644 --- a/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php +++ b/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php @@ -52,6 +52,9 @@ public function testAfterGetStateActive($scopeConfigMockReturnValue, $result, $a $this->assertEquals($assertResult, $this->model->afterIsStateActive($subjectMock, $result)); } + /** + * @return array + */ public function afterGetStateActiveDataProvider() { return [ diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php index 2f6c5ca600bd3..661120c7b7c5f 100644 --- a/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php +++ b/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php @@ -128,6 +128,9 @@ public function testParseWithException(array $rowData, $conditionFullName, array throw $exception; } + /** + * @return array + */ public function parseWithExceptionDataProvider() { $rowData = ['a', 'b', 'c', 'd', 'e']; diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php index b13a46a8fcdf0..2a886f20c42a7 100644 --- a/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php +++ b/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php @@ -20,6 +20,9 @@ protected function setUp() ); } + /** + * @return bool + */ public function testProcessFreeShipping() { $addressMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address::class) diff --git a/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php b/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php index a1c66c67b5524..42a9086daa442 100644 --- a/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php @@ -130,6 +130,9 @@ public function testGetScriptOptions($isSecure, $url, $expectedResult) $this->assertRegExp($expectedResult, $this->blockJavascript->getScriptOptions()); } + /** + * @return array + */ public function getScriptOptionsDataProvider() { return [ @@ -193,6 +196,9 @@ public function testGetScriptOptionsPrivateContent($url, $route, $controller, $a $this->assertRegExp($expectedResult, $this->blockJavascript->getScriptOptions()); } + /** + * @return array + */ public function getScriptOptionsPrivateContentDataProvider() { // @codingStandardsIgnoreStart diff --git a/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php b/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php index 4a7628c7ad839..9c7d55eb8550f 100644 --- a/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php @@ -130,6 +130,9 @@ public function testExecute($blockClass, $shouldSetHeaders) $this->action->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php index 2811cb5316dc6..db0edfa6bd779 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php @@ -226,6 +226,9 @@ public function testAroundDispatchDisabled($state) ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php index 033eb2501865b..2e69fdaf47910 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php @@ -57,6 +57,9 @@ public function testAfterSaveDecompression($data, $initResult) $this->assertSame($data, $this->plugin->afterLoad($this->subjectMock, $initResult)); } + /** + * @return array + */ public function afterSaveDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php index c9231f118fc75..59591c8ee957f 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php @@ -26,6 +26,9 @@ public function testBeforeSendResponse($responseInstanceClass, $sendVaryCalled) $plugin->beforeSendResponse($responseMock); } + /** + * @return array + */ public function beforeSendResponseDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php b/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php index 2321a951aafe8..a57effe1f31ad 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php @@ -90,6 +90,9 @@ public function testGetUris( $this->assertEquals($uris, $this->model->getUris()); } + /** + * @return array + */ public function getUrisDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php index 8c04db7cb8390..6c39fe1e7979c 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php @@ -70,6 +70,9 @@ public function testAfterGenerateXml($cacheState, $layoutIsCacheable) $this->assertSame($result, $output); } + /** + * @return array + */ public function afterGenerateXmlDataProvider() { return [ @@ -112,6 +115,9 @@ public function testAfterGetOutput($cacheState, $layoutIsCacheable, $expectedTag $this->assertSame($output, $html); } + /** + * @return array + */ public function afterGetOutputDataProvider() { $tags = 'identity1,identity2'; diff --git a/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php b/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php index af5d0d0f95e8f..2cbd005183f7b 100644 --- a/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php @@ -83,6 +83,9 @@ public function testExecute($cacheState) $this->assertNull($result); } + /** + * @return array + */ public function flushCacheByTagsDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php b/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php index 469d7971e21a9..5f9238ca4360a 100644 --- a/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php +++ b/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php @@ -83,6 +83,9 @@ public function testGetIsSecureMode($isSecureMode, $methodInstance, $store, $sto $this->assertEquals($result, $expectedResult); } + /** + * @return array + */ public function getIsSecureModeDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php index 1cf19ff9292e9..faf4818965386 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php @@ -54,6 +54,9 @@ public function testStreetLine1($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine1()); } + /** + * @return array + */ public function streetLine1DataProvider() { return [ @@ -73,6 +76,9 @@ public function testStreetLine2($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine2()); } + /** + * @return array + */ public function streetLine2DataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php index 751d8c51b4410..1f5b1c2d87053 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php @@ -54,6 +54,9 @@ public function testStreetLine1($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine1()); } + /** + * @return array + */ public function streetLine1DataProvider() { return [ @@ -73,6 +76,9 @@ public function testStreetLine2($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine2()); } + /** + * @return array + */ public function streetLine2DataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php index 0c808cb7c1faa..44d6144200504 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php @@ -68,6 +68,9 @@ public function testValidateAllowspecificTrue($storeId, $country, $allowspecific $this->assertSame($this->resultMock, $this->model->validate($validationSubject)); } + /** + * @return array + */ public function validateAllowspecificTrueDataProvider() { return [ @@ -96,6 +99,9 @@ public function testValidateAllowspecificFalse($storeId, $allowspecific, $isVali $this->assertSame($this->resultMock, $this->model->validate($validationSubject)); } + /** + * @return array + */ public function validateAllowspecificFalseDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php index fb81137dea42b..562835e3199f1 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php @@ -29,6 +29,9 @@ public function testResult($isValid, $failsDescription, $expectedIsValid, $expec $this->assertEquals($expectedFailsDescription, $this->model->getFailsDescription()); } + /** + * @return array + */ public function resultDataProvider() { $phraseMock = $this->getMockBuilder(\Magento\Framework\Phrase::class)->disableOriginalConstructor()->getMock(); diff --git a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php index 931c2b5fd93d5..3752e82fd1e5b 100644 --- a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php @@ -253,6 +253,9 @@ public function testGetInfoBlockHtml() $this->assertEquals($blockHtml, $this->helper->getInfoBlockHtml($infoMock, $storeId)); } + /** + * @return array + */ public function getSortMethodsDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php index c49f3da315908..64069ff4a1941 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php @@ -40,6 +40,9 @@ public function testCreate($salesModelClass, $expectedType) $this->assertEquals('some value', $this->_model->create($salesModel)); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php index 7594d9ce501ac..3e3c4226d4fbe 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php @@ -19,6 +19,9 @@ protected function setUp() $this->_model = new \Magento\Payment\Model\Cart\SalesModel\Order($this->_orderMock); } + /** + * @return array + */ public function gettersDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php index 95271569e994e..bdcc89840ac19 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php @@ -84,6 +84,9 @@ public function testGetAllItems($pItem, $name, $qty, $price) $this->assertEquals($expected, $this->_model->getAllItems()); } + /** + * @return array + */ public function getAllItemsDataProvider() { return [ @@ -135,6 +138,9 @@ public function testGetter($isVirtual, $getterMethod) $this->assertEquals($getterMethod, $model->{$getterMethod}()); } + /** + * @return array + */ public function getterDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php b/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php index cd215e870462c..0e57777368fb7 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php @@ -144,6 +144,9 @@ public function testGetActiveMethods($isActive) static::assertEquals($isActive ? ['active_method' => $adapter] : [], $this->config->getActiveMethods()); } + /** + * @return array + */ public function getActiveMethodsDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php index 39fc0c2dae5eb..d8487e63c6eca 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php @@ -114,6 +114,9 @@ public function testRender($requestCountry, $requestDefaultCountry, $canUseDefau $this->_model->render($this->_element); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php index baf944dc44041..527aa4b9439ce 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php @@ -93,6 +93,9 @@ public function testIsCollapseState($expanded, $expected) ); } + /** + * @return array + */ public function isCollapseStateDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php index d9ddd277a7df1..df9638ef47135 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php @@ -85,6 +85,9 @@ public function testIsPaymentEnabled($groupConfig, $expected) $this->assertContains($expected, $html); } + /** + * @return array + */ public function isPaymentEnabledDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php index 9a7a87b366fcf..27ed799a4adb7 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php @@ -84,6 +84,9 @@ public function testGetViewFileUrl($isSecure) $this->assertEquals('result url', $this->model->getViewFileUrl('some file')); } + /** + * @return array + */ public function getViewFileUrlDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php index 54d5acfce9f5f..f915dca23735d 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php @@ -36,6 +36,9 @@ protected function _expectRedirect($path = '*/*/review') ->with($this->anything(), $path, []); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; @@ -79,6 +82,9 @@ public function testExecuteProcessableException($code, $paymentAction = null) $this->model->execute(); } + /** + * @return array + */ public function executeProcessableExceptionDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php index fd0182bb88c06..65250ccce08bd 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php @@ -34,6 +34,9 @@ public function testExecuteAuthorizationRetrial() $this->model->execute(); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php index 5ca7156b6f01f..36a9ae3bd5cf9 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php @@ -37,6 +37,9 @@ public function testStartAction($buttonParam) $this->model->execute(); } + /** + * @return array + */ public function startActionDataProvider() { return [['1'], [null]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php b/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php index fd8a8a3c41f11..ffa1bf027ab57 100644 --- a/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php @@ -92,6 +92,9 @@ public function testGetConfigurationCountryCodeFromConfig($request) $this->configurationCountryCodeAssertResult('GB'); } + /** + * @return array + */ public function getConfigurationCountryCodeFromConfigDataProvider() { return [ @@ -116,6 +119,9 @@ public function testGetConfigurationCountryCodeFromDefault($request, $config, $d $this->configurationCountryCodeAssertResult($default); } + /** + * @return array + */ public function getConfigurationCountryCodeFromDefaultDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php b/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php index bb25bea63a8bc..9ec9318212614 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php @@ -273,6 +273,9 @@ public function testIsMethodAvailable($methodCode, $expectedFlag) $this->config->isMethodAvailable($methodCode); } + /** + * @return array + */ public function isMethodAvailableDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php index c0b2bb4fc1dca..56fe0cc9e5824 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php @@ -138,6 +138,9 @@ public function testCall($response, $processableErrors, $exception, $exceptionMe $this->model->call('some method', ['data' => 'some data']); } + /** + * @return array + */ public function callDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php b/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php index f9bb74dba5b53..0f787f0f513a1 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php @@ -85,6 +85,9 @@ public function testInvalidGetAllItems($items) $this->assertEquals(0.3, $this->_model->getDiscount()); } + /** + * @return array + */ public function invalidGetAllItemsDataProvider() { return [ @@ -150,6 +153,9 @@ public function testInvalidTotalsGetAllItems($values, $transferDiscount) $this->assertEquals($transferDiscount ? 0.0 : $values['base_discount_amount'], $this->_model->getDiscount()); } + /** + * @return array + */ public function invalidTotalsGetAllItemsDataProvider() { return [ @@ -222,6 +228,9 @@ public function testInvalidGetAmounts($values, $transferDiscount, $transferShipp $this->assertEquals([Cart::AMOUNT_SUBTOTAL => $expectedSubtotal], $result); } + /** + * @return array + */ public function invalidGetAmountsDataProvider() { $data = []; diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php index 6a5b2676014cb..57534345f2541 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php @@ -175,6 +175,9 @@ private function fetchAllAvailableGroups($structure) return $availableGroups; } + /** + * @return mixed + */ public function caseProvider() { return include __DIR__ . '/_files/payment_section_structure_variations.php'; diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php index 2a3ac1adbc07a..ed834ae2b9c01 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php @@ -371,6 +371,9 @@ public function amountWithoutTaxDataProvider() ]; } + /** + * @return array + */ public function amountWithoutTaxZeroSubtotalDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php b/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php index c9689c8601a02..3e8af6b2ee766 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php @@ -179,6 +179,9 @@ public function testSetTransStatus($response, $paymentExpected) $this->assertEquals($paymentExpected->getData(), $payment->getData()); } + /** + * @return array + */ public function setTransStatusDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php b/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php index c1947c522b118..8e18b680ce9cd 100644 --- a/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php @@ -166,6 +166,9 @@ public function testAddBillingAgreementToSession($isValid) $this->_model->execute($this->_observer); } + /** + * @return array + */ public function addBillingAgreementToSessionDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php b/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php index abad48e49f261..381a8d971052c 100644 --- a/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php @@ -48,6 +48,9 @@ protected function setUp() $this->_model = new \Magento\Paypal\Observer\RestrictAdminBillingAgreementUsageObserver($this->_authorization); } + /** + * @return array + */ public function restrictAdminBillingAgreementUsageDataProvider() { return [ diff --git a/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php b/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php index da60f8a3162ac..ca415a8fab5b3 100644 --- a/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php +++ b/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php @@ -80,6 +80,9 @@ public function testBeforeStart($result, $callCount) $this->observer->execute($observerMock); } + /** + * @return array + */ public function beforeStartDataProvider() { return [ diff --git a/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php b/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php index 13bcc2273d93b..815c4f941e683 100644 --- a/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php +++ b/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php @@ -55,6 +55,9 @@ public function testGetFilteredContent($contentToFilter, $contentFiltered) $this->assertEquals($contentFiltered, $this->_block->getFilteredContent($contentToFilter)); } + /** + * @return array + */ public function getFilteredContentDataProvider() { return [ diff --git a/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php b/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php index 886ed6eb3fe27..b9f28bde15d07 100644 --- a/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php +++ b/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php @@ -126,6 +126,9 @@ public function testSetTemplateStockUrlNotAllowed($stockAlertAllowed, $productAv $this->assertNull($this->_block->getSignupUrl()); } + /** + * @return array + */ public function setTemplateStockUrlNotAllowedDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php index 287d2b3c8d4f0..d6338eb428657 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php @@ -92,6 +92,9 @@ public function testCollectTotalsNoShipping($shippingCarrierCode, $shippingMetho ); } + /** + * @return array + */ public function collectTotalsShippingData() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php index b1cec90e61e01..1e999cb5e523e 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php @@ -163,6 +163,9 @@ public function testGet($isVirtual, $getAddressType) $this->assertEquals($totalsMock, $this->model->get($cartId)); } + /** + * @return array + */ public function getDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php b/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php index 38f303dd23582..cd7a54455a994 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php @@ -49,6 +49,9 @@ public function testAfterUpdate($originalPrice, $newPrice, $callMethod, $tierPri $this->assertEquals($result, $productResourceMock); } + /** + * @return array + */ public function aroundUpdateDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php index 78a87b59d9f62..c4a8081fbb8fa 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php @@ -49,6 +49,9 @@ protected function setUp() ); } + /** + * @return array + */ public function collectDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php index f884981424d65..e1971fa9833a3 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php @@ -49,6 +49,9 @@ public function testSetTotalAmount($code, $amount, $storedCode) $this->assertSame($this->model, $result); } + /** + * @return array + */ public function setTotalAmountDataProvider() { return [ @@ -80,6 +83,9 @@ public function testSetBaseTotalAmount($code, $amount, $storedCode) $this->assertSame($this->model, $result); } + /** + * @return array + */ public function setBaseTotalAmountDataProvider() { return [ @@ -111,6 +117,9 @@ public function testAddTotalAmount($initialAmount, $delta, $updatedAmount) $this->assertEquals($updatedAmount, $this->model->getTotalAmount($code)); } + /** + * @return array + */ public function addTotalAmountDataProvider() { return [ @@ -142,6 +151,9 @@ public function testAddBaseTotalAmount($initialAmount, $delta, $updatedAmount) $this->assertEquals($updatedAmount, $this->model->getBaseTotalAmount($code)); } + /** + * @return array + */ public function addBaseTotalAmountDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php index a73a241922a9c..8be4479598907 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php @@ -61,6 +61,9 @@ public function testGetRelatedProductIds($optionValue, $productId, $expectedResu * * @return array */ + /** + * @return array + */ public function getRelatedProductIdsDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php index 03c3e32c20cb9..af47f6276705b 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php @@ -130,6 +130,9 @@ public function testUpdateNotQtyDecimal($qty, $expectedQty) $this->assertEquals($result, $this->object); } + /** + * @return array + */ public function qtyProvider() { return [ @@ -142,6 +145,9 @@ public function qtyProvider() ]; } + /** + * @return array + */ public function qtyProviderDecimal() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php index 1da659f6b59b7..abc56d194456d 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php @@ -846,6 +846,12 @@ public function testSetOptionsWithNull() $this->assertEquals($this->model, $this->model->setOptions(null)); } + /** + * @param $optionCode + * @param array $optionData + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function createOptionMock($optionCode, $optionData = []) { $optionMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Item\Option::class) diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php index c0056e2c8338f..6f5e5937a32c8 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php @@ -615,6 +615,9 @@ public function testGetAddressById($addressId, $expected) $this->assertEquals((bool)$expected, (bool)$result); } + /** + * @return array + */ public static function dataProviderGetAddress() { return [ @@ -656,6 +659,9 @@ public function testGetAddressByCustomerAddressId($isDeleted, $customerAddressId $this->assertEquals((bool)$expected, (bool)$result); } + /** + * @return array + */ public static function dataProviderGetAddressByCustomer() { return [ @@ -702,6 +708,9 @@ public function testGetShippingAddressByCustomerAddressId($isDeleted, $addressTy $this->assertEquals($expected, (bool)$result); } + /** + * @return array + */ public static function dataProviderShippingAddress() { return [ @@ -1204,6 +1213,9 @@ public function testReserveOrderId($isReservedOrderIdExist, $reservedOrderId) $this->assertEquals($reservedOrderId, $this->quote->getReservedOrderId()); } + /** + * @return array + */ public function reservedOrderIdDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php b/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php index d10e1531d4ec3..7bbf24c2b6ef3 100644 --- a/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php +++ b/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php @@ -160,6 +160,9 @@ public function testDispatch($isWebsiteScope, $websites) $this->customerQuote->execute($this->observerMock); } + /** + * @return array + */ public function dispatchDataProvider() { return [ diff --git a/app/code/Magento/ReleaseNotification/Controller/Adminhtml/Notification/MarkUserNotified.php b/app/code/Magento/ReleaseNotification/Controller/Adminhtml/Notification/MarkUserNotified.php index 572fb7695b20f..56f836fff9522 100644 --- a/app/code/Magento/ReleaseNotification/Controller/Adminhtml/Notification/MarkUserNotified.php +++ b/app/code/Magento/ReleaseNotification/Controller/Adminhtml/Notification/MarkUserNotified.php @@ -85,6 +85,9 @@ public function execute() return $resultJson->setData($responseContent); } + /** + * @return bool + */ protected function _isAllowed() { return parent::_isAllowed(); diff --git a/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php b/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php index 3ec00697507c1..813c5f28bf4d9 100644 --- a/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php +++ b/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php @@ -113,6 +113,9 @@ public function testIsVisible($expected, $version, $lastViewVersion) $this->assertEquals($expected, $this->canViewNotification->isVisible([])); } + /** + * @return array + */ public function isVisibleProvider() { return [ diff --git a/app/code/Magento/Review/Test/Unit/Block/FormTest.php b/app/code/Magento/Review/Test/Unit/Block/FormTest.php index 2184385035c8d..1fd38551702ab 100644 --- a/app/code/Magento/Review/Test/Unit/Block/FormTest.php +++ b/app/code/Magento/Review/Test/Unit/Block/FormTest.php @@ -136,6 +136,9 @@ public function testGetAction($isSecure, $actionUrl, $productId) $this->assertEquals($actionUrl . '/id/' . $productId, $this->object->getAction()); } + /** + * @return array + */ public function getActionDataProvider() { return [ diff --git a/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php b/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php index 243b4e8389923..01868242d0e0c 100644 --- a/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php +++ b/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php @@ -204,6 +204,9 @@ public function testGetProductReviewUrl($isSecure, $actionUrl, $productId) $this->assertEquals($actionUrl . '/id/' . $productId, $this->block->getProductReviewUrl()); } + /** + * @return array + */ public function getProductReviewUrlDataProvider() { return [ diff --git a/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php b/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php index b3d2cec648dc6..36cbe455fa890 100644 --- a/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php +++ b/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php @@ -147,6 +147,9 @@ public function testAddEntityFilter( $this->model->addEntityFilter($entity, $pkValue); } + /** + * @return array + */ public function addEntityFilterDataProvider() { return [ diff --git a/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php b/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php index 1201ba92464d9..52653197e3981 100644 --- a/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php +++ b/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php @@ -40,6 +40,9 @@ public function testGetMappedSqlField() $this->assertEquals('category_ids', $this->_condition->getMappedSqlField()); } + /** + * @return array + */ public function validateAttributeDataProvider() { return [ @@ -146,6 +149,9 @@ public function testValidate($existingValue, $operator, $valueForValidate, $expe ); } + /** + * @return array + */ public function validateAttributeArrayInputTypeDataProvider() { return [ diff --git a/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php b/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php index 644d10ad75fe6..c4e7a591212c5 100644 --- a/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php +++ b/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php @@ -91,6 +91,9 @@ protected function setUp() ); } + /** + * @return array + */ public function addWebsitesToResultDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php index e07fecf4cb116..805cdb045584c 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php @@ -258,6 +258,9 @@ public function testGetItems() $this->assertEquals(true, $this->block->getQuote()->getIsSuperMode()); } + /** + * @return \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid + */ protected function getGrid() { /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid $grid */ diff --git a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php index a52d8e1b7f9f9..7b94e769eff9a 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php @@ -39,6 +39,9 @@ public function testGetItemQty($itemQty, $qty, $expectedValue) $this->assertEquals($expectedValue, $this->abstractSidebar->getItemQty($this->itemMock)); } + /** + * @return array + */ public function getItemQtyDataProvider() { return ['whenQtyIsset' => [2, 10, 10], 'whenQtyNotIsset' => [1, false, 1]]; diff --git a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php index 773694897291c..8f94ea8982ddf 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php @@ -54,6 +54,9 @@ public function testIsPaymentReview($canReviewPayment, $canFetchUpdate, $expecte $this->assertEquals($expectedResult, $testMethod->invoke($block)); } + /** + * @return array + */ public function isPaymentReviewDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php b/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php index 7ad21f26a8bea..be0ae41347ba8 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php @@ -51,6 +51,10 @@ public function testApplySortOrder() ); } + /** + * @param array $expected + * @param array $actual + */ private function assertEqualsSorted(array $expected, array $actual) { $this->assertEquals($expected, $actual, 'Array contents should be equal.'); diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php index 2b6436395a0cf..ab4bf5fbbe491 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php @@ -235,6 +235,9 @@ public function testExecute($noDiscount, $couponCode, $errorMessage, $actualCoup $this->assertInstanceOf(\Magento\Backend\Model\View\Result\Forward::class, $this->processData->execute()); } + /** + * @return array + */ public function isApplyDiscountDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php index 19cbec9d1a06b..d0d7e7efa97f7 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php @@ -216,6 +216,9 @@ public function testExecute($itemOptionValues, $productOptionValues, $noRouteOcc $this->objectMock->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php b/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php index fd20e0cb7d94a..e424cae85f223 100644 --- a/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php +++ b/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php @@ -70,6 +70,9 @@ public function testExecute($lifetimes, $additionalFilterFields) $this->observer->execute(); } + /** + * @return array + */ public function cleanExpiredQuotesDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php b/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php index 4304bf00981e1..e14da1ac1b5ab 100644 --- a/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php +++ b/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php @@ -176,6 +176,9 @@ public function testGetSectionData() $this->assertEquals(['items' => [$expectedItem1, $expectedItem2]], $this->section->getSectionData()); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getLastOrderMock() { $customerId = 1; diff --git a/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php b/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php index 180cfca0bc3cb..389064b7274a7 100644 --- a/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php +++ b/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php @@ -198,6 +198,9 @@ public function testDisplayPriceAttribute( ); } + /** + * @return array + */ public function displayPricesDataProvider() { return [ @@ -310,6 +313,9 @@ public function testApplySalableProductTypesFilter($itemKey, $type, $calledTimes $this->adminHelper->applySalableProductTypesFilter($collectionMock); } + /** + * @return array + */ public function applySalableProductTypesFilterDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php index 014e0e28b49ee..02f855929d9d6 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php @@ -428,6 +428,9 @@ public function testCouldNotInvoiceException() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php index 73838379490fd..93eb56a07955c 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php @@ -78,6 +78,9 @@ public function testGetRegionCodeRegionIsSet() $this->assertEquals('region', $this->address->getRegionCode()); } + /** + * @return array + */ public function regionProvider() { return [ [1, null], [null, 1]]; diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php index c911af3044e5d..24a64c37a5e13 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php @@ -97,6 +97,9 @@ public function testValidateCreditMemoProductItems($orderItemId, $expectedResult $this->assertEquals($expectedResult, $this->createQuantityValidator->validate($this->entity)); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php index f917d69e69f79..9172a6f45bbcd 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php @@ -364,6 +364,9 @@ public function baseAmountsDataProvider() ]; } + /** + * @param $amounts + */ private function setBaseAmounts($amounts) { foreach ($amounts as $amountName => $summands) { @@ -403,6 +406,9 @@ private function registerItems() ->willReturn([$item1, $item2, $item3]); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCreditmemoItemMock() { return $this->getMockBuilder(\Magento\Sales\Api\Data\CreditmemoItemInterface::class) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php index 97dc973e63437..afb76c982d7c2 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php @@ -120,6 +120,10 @@ public function stepMockSetup() $this->loggerMock = $this->createMock(\Psr\Log\LoggerInterface::class); } + /** + * @param $billingAddress + * @param bool $isVirtual + */ public function stepAddressFormat($billingAddress, $isVirtual = false) { $this->orderMock->expects($this->any()) @@ -145,6 +149,9 @@ public function stepSendWithCallSendCopyTo() $this->stepSend($this->never(), $this->once()); } + /** + * @param $identityMockClassName + */ public function stepIdentityContainerInit($identityMockClassName) { $this->identityContainerMock = $this->createPartialMock( @@ -156,6 +163,10 @@ public function stepIdentityContainerInit($identityMockClassName) ->will($this->returnValue($this->storeMock)); } + /** + * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendExpects + * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects + */ protected function stepSend( \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendExpects, \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php index 5d3e9ae22e78b..5a0478dd2e36f 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php @@ -156,6 +156,12 @@ public function testValidateNoInvoiceItems() ); } + /** + * @param $orderItemId + * @param $qty + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getInvoiceItemMock($orderItemId, $qty) { $invoiceItemMock = $this->getMockBuilder(\Magento\Sales\Api\Data\InvoiceItemInterface::class) @@ -167,6 +173,13 @@ private function getInvoiceItemMock($orderItemId, $qty) return $invoiceItemMock; } + /** + * @param $id + * @param $qtyToInvoice + * @param $isDummy + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getOrderItemMock($id, $qtyToInvoice, $isDummy) { $orderItemMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderItemInterface::class) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php index 0517da8b85cf0..8c972801c5520 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php @@ -138,6 +138,9 @@ public function testDefaultCanVoid($canVoid) $this->assertEquals($canVoid, $this->model->canVoid()); } + /** + * @return array + */ public function canVoidDataProvider() { return [[true], [false]]; @@ -382,6 +385,9 @@ public function testPay( self::assertEquals($expectedTotal, $this->order->getTotalPaid()); } + /** + * @return array + */ public function payDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php index 03a388410f335..aea234959cea0 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php @@ -140,6 +140,9 @@ public function testGetStatusId( $this->assertEquals($expectedStatus, $this->model->getStatusId()); } + /** + * @return array + */ public function getStatusIdDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php index 66ac821006266..8a40fbd20ef48 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php @@ -149,6 +149,11 @@ public function testGetList() $this->assertSame($this->collection, $this->repository->getList($this->searchCriteria)); } + /** + * @param bool $id + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function mockPayment($id = false) { $payment = $this->createMock(\Magento\Sales\Model\Order\Payment::class); diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php index 1ea3aeedea51c..ea11604c53c45 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php @@ -257,6 +257,9 @@ protected function expectsIsPaymentTransactionClosed($isPaymentTransactionClosed ->willReturn($isPaymentTransactionClosed); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php index 34b874c073a5a..13f6b9c607586 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php @@ -155,6 +155,9 @@ public function generateTransactionIdDataProvider() ]; } + /** + * @return array + */ public function isTransactionExistsDataProvider() { return [ @@ -165,6 +168,9 @@ public function isTransactionExistsDataProvider() ]; } + /** + * @return array + */ public function getAuthorizationDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php index ee7e07873da51..52762b0dbf315 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php @@ -600,6 +600,9 @@ public function testAcceptApprovePaymentTrue() self::assertEquals($baseGrandTotal, $this->payment->getBaseAmountPaidOnline()); } + /** + * @return array + */ public function acceptPaymentFalseProvider() { return [ @@ -1532,6 +1535,9 @@ public function testRefund() static::assertEquals($amount, $this->payment->getData('base_amount_refunded')); } + /** + * @return array + */ public function boolProvider() { return [ @@ -1570,6 +1576,9 @@ public function testGetShouldCloseParentTransaction() static::assertFalse($this->payment->getShouldCloseParentTransaction()); } + /** + * @return object + */ protected function initPayment() { return (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))->getObject( @@ -1589,6 +1598,12 @@ protected function initPayment() ); } + /** + * @param $state + * @param null $status + * @param null $message + * @param null $isCustomerNotified + */ protected function assertOrderUpdated( $state, $status = null, @@ -1617,6 +1632,11 @@ protected function assertOrderUpdated( ->willReturn($statusHistory); } + /** + * @param $state + * @param $status + * @param array $allStatuses + */ protected function mockGetDefaultStatus($state, $status, $allStatuses = []) { /** @var \Magento\Sales\Model\Order\Config | \PHPUnit_Framework_MockObject_MockObject $orderConfigMock */ @@ -1642,6 +1662,11 @@ protected function mockGetDefaultStatus($state, $status, $allStatuses = []) ->will($this->returnValue($orderConfigMock)); } + /** + * @param $transactionId + * + * @return MockObject + */ protected function getTransactionMock($transactionId) { $transaction = $this->createPartialMock(\Magento\Sales\Model\Order\Payment\Transaction::class, [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php index 28c29cd7a3bdf..57a4d5f40aa36 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php @@ -27,6 +27,9 @@ public function testGetOrderStatusByState($order, $expectedReturn) self::assertEquals($expectedReturn, $actualReturn); } + /** + * @return array + */ public function statesDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php index fb1970638753f..7f6363346872c 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php @@ -845,6 +845,9 @@ protected function prepareItemMock($qtyInvoiced) ->will($this->returnValue($itemCollectionMock)); } + /** + * @return array + */ public function canVoidPaymentDataProvider() { $data = []; @@ -856,6 +859,9 @@ public function canVoidPaymentDataProvider() return $data; } + /** + * @return array + */ public function dataProviderActionFlag() { return [ @@ -1076,6 +1082,9 @@ public function testGetCreatedAtFormattedUsesCorrectLocale() $this->order->getCreatedAtFormatted(\IntlDateFormatter::SHORT); } + /** + * @return array + */ public function notInvoicingStatesProvider() { return [ @@ -1085,6 +1094,9 @@ public function notInvoicingStatesProvider() ]; } + /** + * @return array + */ public function canNotCreditMemoStatesProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php index 5a8c1032cd4fc..5148752e9831a 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php @@ -463,6 +463,9 @@ public function testCouldNotCreditmemoException() ); } + /** + * @return array + */ public function dataProvider() { $creditmemoItemCreationMock = $this->getMockBuilder(CreditmemoItemCreationInterface::class) diff --git a/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php index 8bc3288af04cf..c95b56d81d6f4 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php @@ -407,6 +407,9 @@ public function testCouldNotCreditmemoException() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php index 395b653b0be8d..45cbea7307f4d 100644 --- a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php @@ -84,6 +84,9 @@ public function testAddVatRequestParamsOrderComment( $this->assertNull($this->observer->execute($observer)); } + /** + * @return array + */ public function addVatRequestParamsOrderCommentDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php index f0738fbcf3129..f0845c67f1a4a 100644 --- a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php +++ b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php @@ -72,6 +72,9 @@ public function testExecute($configAddressType) $this->quote->execute($observer); } + /** + * @return array + */ public function restoreCustomerGroupIdDataProvider() { return [ diff --git a/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php b/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php index 3d811363156d7..32eb810c7a16a 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php @@ -121,6 +121,9 @@ public function testValidationWithWrongOrderItems() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php b/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php index 2ee8f81a2aa88..0fea8f4210f8a 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php @@ -140,6 +140,9 @@ public function testAfterValidation($erroMessage) ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php b/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php index c2e2d4710f96c..759320106ea1b 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php @@ -173,6 +173,11 @@ public function testRefundOrderInventory() $this->observer->execute($this->eventObserver); } + /** + * @param $productId + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCreditMemoItem($productId) { $backToStock = true; diff --git a/app/code/Magento/SalesRule/Plugin/CouponUsagesDecrement.php b/app/code/Magento/SalesRule/Plugin/CouponUsagesDecrement.php index 88108154b5e71..f62e2e0be4d0c 100644 --- a/app/code/Magento/SalesRule/Plugin/CouponUsagesDecrement.php +++ b/app/code/Magento/SalesRule/Plugin/CouponUsagesDecrement.php @@ -16,6 +16,11 @@ class CouponUsagesDecrement */ private $updateCouponUsages; + /** + * CouponUsagesDecrement constructor. + * + * @param UpdateCouponUsages $updateCouponUsages + */ public function __construct( UpdateCouponUsages $updateCouponUsages ) { diff --git a/app/code/Magento/SalesRule/Plugin/CouponUsagesIncrement.php b/app/code/Magento/SalesRule/Plugin/CouponUsagesIncrement.php index 54ebef2bdf248..8810b4630f51a 100644 --- a/app/code/Magento/SalesRule/Plugin/CouponUsagesIncrement.php +++ b/app/code/Magento/SalesRule/Plugin/CouponUsagesIncrement.php @@ -16,6 +16,11 @@ class CouponUsagesIncrement */ private $updateCouponUsages; + /** + * CouponUsagesIncrement constructor. + * + * @param UpdateCouponUsages $updateCouponUsages + */ public function __construct( UpdateCouponUsages $updateCouponUsages ) { diff --git a/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php b/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php index cd00562bc4f7a..bd14773ea4923 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php @@ -195,6 +195,9 @@ public function testIsAllowed($isAllowed) $this->assertEquals($isAllowed, $this->block->isAllowed()); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php index 82868b3723c75..1016d14066afc 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php @@ -115,6 +115,9 @@ protected function setUp() ); } + /** + * @return array + */ private function getArrayData() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php index 98e1d7cddee57..5dd67424418b7 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php @@ -273,6 +273,9 @@ public function testFormattingDate($data) $this->model->toModel($dataModel); } + /** + * @return array + */ public function expectedDatesProvider() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php index 31536e1be3d2e..e516f817a59d1 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php @@ -155,6 +155,9 @@ public function testSaveWithExceptions($exceptionObject, $exceptionName, $except $this->model->save($coupon); } + /** + * @return array + */ public function saveExceptionsDataProvider() { $msg = 'kiwis'; diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php index 671f20a27a460..090dbd7fe5d6d 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php @@ -225,6 +225,9 @@ public function testCollectItemHasChildren($childItemData, $parentData, $expecte } } + /** + * @return array + */ public function collectItemHasChildrenDataProvider() { $data = [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php index 89f4e93901c1b..be9e25eb20302 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php @@ -113,6 +113,9 @@ public function testBeforeSaveResetConditionToNull() $this->model->getActions(); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupProdConditionMock() { $prodConditionMock = $this->getMockBuilder(\Magento\SalesRule\Model\Rule\Condition\Product\Combine::class) @@ -133,6 +136,9 @@ protected function setupProdConditionMock() return $prodConditionMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupConditionMock() { $conditionMock = $this->getMockBuilder(\Magento\SalesRule\Model\Rule\Condition\Combine::class) diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php index 21df8e587667e..ec4e775f1f6b3 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php @@ -140,6 +140,9 @@ public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed($isChildren, $this->assertEquals($appliedRuleIds, $result); } + /** + * @return array + */ public function dataProviderChildren() { return [ @@ -179,6 +182,10 @@ protected function getPreparedItem() return $item; } + /** + * @param $item + * @param $rule + */ protected function applyRule($item, $rule) { $qty = 2; diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php index 5e48f3110a395..4ce0f2a0564f3 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php @@ -362,6 +362,9 @@ public function testMergeIds($a1, $a2, $isSting, $expected) $this->assertEquals($expected, $this->utility->mergeIds($a1, $a2, $isSting)); } + /** + * @return array + */ public function mergeIdsDataProvider() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php index 2e6a3c3c38af0..42448565791c5 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php @@ -495,6 +495,9 @@ public function testProcessShippingAmountActions($action) ); } + /** + * @return array + */ public static function dataProviderActions() { return [ diff --git a/app/code/Magento/Search/Test/Unit/Helper/DataTest.php b/app/code/Magento/Search/Test/Unit/Helper/DataTest.php index 291362734feff..1f9aad8d4316d 100644 --- a/app/code/Magento/Search/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Search/Test/Unit/Helper/DataTest.php @@ -127,6 +127,9 @@ public function testGetEscapedQueryText($queryText, $maxQueryLength, $expected) $this->assertEquals($expected, $this->model->getEscapedQueryText()); } + /** + * @return array + */ public function queryTextDataProvider() { return [ diff --git a/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php b/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php index 525693631e86f..89bc5c2b85d50 100644 --- a/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php +++ b/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php @@ -86,6 +86,9 @@ public function testCreate( $this->model->create($securityEventType, $accountReference, $longIp); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php b/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php index 6dbab3a5573a8..2718e1fa44f6e 100644 --- a/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php +++ b/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php @@ -52,6 +52,9 @@ public function testAfterCanEmailToFriend($result, $callSendfriend) $this->assertTrue($this->view->afterCanEmailToFriend($this->productView, $result)); } + /** + * @return array + */ public function afterCanEmailToFriendDataSet() { return [ diff --git a/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php b/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php index 65460d1a13eea..2db8eabffae61 100644 --- a/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php +++ b/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php @@ -204,6 +204,14 @@ public function testExecuteNoShipment() $this->assertEquals($this->resultForwardMock, $this->controller->execute()); } + /** + * @param $orderId + * @param $shipmentId + * @param $shipment + * @param $tracking + * @param $comeFrom + * @param $returnShipment + */ protected function loadShipment($orderId, $shipmentId, $shipment, $tracking, $comeFrom, $returnShipment) { $valueMap = [ diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php index 7ba3ab3eef4f6..6b7a6112a932e 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php @@ -198,6 +198,9 @@ public function testIsAvailableWithCanceledOrder($state) $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId)); } + /** + * @return array + */ public function isAvailableWithCanceledOrderDataProvider() { return [ diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php index a22bfe12222a6..f80a9a83e7117 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php @@ -203,6 +203,12 @@ public function testCreateForOrderWithCaseUpdate() ); } + /** + * @param $orderId + * @param array $caseData + * + * @return MockObject + */ private function withCaseEntityExistsForOrderId($orderId, array $caseData = []) { $this->createGuaranteeAbility->expects(self::once()) @@ -226,6 +232,9 @@ private function withCaseEntityExistsForOrderId($orderId, array $caseData = []) return $dummyCaseEntity; } + /** + * @param $failureMessage + */ private function withGatewayFailure($failureMessage) { $this->gateway @@ -233,6 +242,9 @@ private function withGatewayFailure($failureMessage) ->willThrowException(new GatewayException($failureMessage)); } + /** + * @param $gatewayResult + */ private function withGatewaySuccess($gatewayResult) { $this->gateway diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php index bf0c6ee238d5f..1ee55d7ad150c 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php @@ -92,6 +92,9 @@ public function testHandleFailureMessage($code, $message) } } + /** + * @return array + */ public function errorsProvider() { return [ diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php index 0039b271a4b0b..ce97a7baaeace 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php @@ -393,6 +393,9 @@ public function testCancelGuaranteeWithUnexpectedDisposition() $this->assertEquals(Gateway::GUARANTEE_CANCELED, $result); } + /** + * @return array + */ public function supportedGuaranteeDispositionsProvider() { return [ diff --git a/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php b/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php index 3b0b932e31d46..2e5a3b6a65db9 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php @@ -253,6 +253,9 @@ public function testRun() $this->model->run($data); } + /** + * @return array + */ private function getData() { return [ diff --git a/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php b/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php index 702f4eee8db99..72ee0c196b090 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php @@ -55,6 +55,11 @@ protected function setUp() ); } + /** + * @param array $storeConfig + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getStoreMock(array $storeConfig) { $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) @@ -88,6 +93,9 @@ protected function getStoreMock(array $storeConfig) return $storeMock; } + /** + * @return \Magento\Store\Model\Data\StoreConfig + */ protected function createStoreConfigDataObject() { /** @var \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactoryMock */ diff --git a/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php b/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php index ad3b927258717..a48804f02adc0 100644 --- a/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php @@ -97,6 +97,9 @@ public function testGetStores($storesList, $withDefault, $codeKey, $expectedStor $this->assertEquals($expectedStores, $this->model->getStores($withDefault, $codeKey)); } + /** + * @return array + */ public function getStoresDataProvider() { $defaultStoreMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class) diff --git a/app/code/Magento/Store/Test/Unit/Model/StoreTest.php b/app/code/Magento/Store/Test/Unit/Model/StoreTest.php index c05584c2d8bcb..d371f16458c74 100644 --- a/app/code/Magento/Store/Test/Unit/Model/StoreTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/StoreTest.php @@ -93,6 +93,9 @@ public function testLoad($key, $field) $model->load($key); } + /** + * @return array + */ public function loadDataProvider() { return [ @@ -264,6 +267,9 @@ function ($path, $scope, $scopeCode) use ($secure, $expectedPath) { $this->assertEquals($expectedBaseUrl, $model->getBaseUrl($type, $secure)); } + /** + * @return array + */ public function getBaseUrlDataProvider() { return [ @@ -602,6 +608,9 @@ public function testIsCurrentlySecure( } } + /** + * @return array + */ public function isCurrentlySecureDataProvider() { return [ diff --git a/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php b/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php index d70da2ee1ddc6..9cc4bb6ac8e5b 100644 --- a/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php @@ -104,6 +104,9 @@ public function testGetStoresStructure( ); } + /** + * @return array + */ public function getStoresStructureDataProvider() { $websiteName = 'website'; @@ -207,6 +210,9 @@ public function testGetStoreValuesForForm( ); } + /** + * @return array + */ public function getStoreValuesForFormDataProvider() { $websiteName = 'website'; diff --git a/app/code/Magento/Store/Test/Unit/Setup/UpgradeDataTest.php b/app/code/Magento/Store/Test/Unit/Setup/UpgradeDataTest.php index 0dc7de4224c43..210e187b78b47 100644 --- a/app/code/Magento/Store/Test/Unit/Setup/UpgradeDataTest.php +++ b/app/code/Magento/Store/Test/Unit/Setup/UpgradeDataTest.php @@ -102,6 +102,9 @@ public function testUpgradeToVersion210(array $groupList, array $expectedCodes) $this->model->upgrade($this->setupMock, $this->contextMock); } + /** + * @return array + */ public function upgradeDataProvider() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php index a86c745c7c810..0d0444ddda38b 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php @@ -160,6 +160,9 @@ public function testGetStoreOptionValues($values) $this->assertEquals($result, $values); } + /** + * @return array + */ public function dataForGetStoreOptionValues() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php index aad8741735813..168a682961bc6 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php @@ -21,6 +21,9 @@ public function testAddValues($values) $this->assertEquals($block, $result); } + /** + * @return array + */ public function dataForAddValues() { $additionalData = [ diff --git a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php index 19a05dad151c4..a28f3db8fb392 100644 --- a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php @@ -130,6 +130,9 @@ public function testExecute($fileResult, $expectedResult) $this->controller->execute(); } + /** + * @return array + */ public function dataForExecute() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php index 66f0d484c9e83..c9c826b3a7831 100644 --- a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php @@ -39,6 +39,9 @@ public function testBeforeDispatch($dataRequest, $runTimes) $controller->beforeDispatch($subject, $request); } + /** + * @return array + */ public function dataRequest() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php index 751375813a83a..5732018f7615f 100644 --- a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php @@ -141,6 +141,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataForAdditionalData() { $additionalData = [ @@ -192,6 +195,9 @@ public function testAssembleAdditionalDataEavAttribute($dataFromDb, $attributeDa $this->swatchHelperObject->assembleAdditionalDataEavAttribute($this->attributeMock); } + /** + * @return array + */ public function dataForAssembleEavAttribute() { $additionalData = [ @@ -236,6 +242,9 @@ public function testLoadFirstVariationWithSwatchImage($imageTypes, $expected, $r } } + /** + * @return array + */ public function dataForVariationWithSwatchImage() { return [ @@ -299,6 +308,9 @@ public function testLoadFirstVariationWithImage($imageTypes, $expected, $require } } + /** + * @return array + */ public function dataForVariationWithImage() { return [ @@ -405,6 +417,9 @@ public function testGetProductMediaGallery($mediaGallery, $image) } } + /** + * @return array + */ public function dataForMediaGallery() { return [ @@ -442,6 +457,10 @@ protected function getSwatchAttributes() ->willReturn($returnFromProvideMethod); } + /** + * @param array $attributes + * @param array $imageTypes + */ protected function getUsedProducts(array $attributes, array $imageTypes) { $this->productMock @@ -535,6 +554,9 @@ protected function addfilterByParent() $zendDbSelectMock->method('where')->willReturn($zendDbSelectMock); } + /** + * @return array + */ public function dataForCreateSwatchProduct() { $productMock = $this->createMock(\Magento\Catalog\Model\Product::class); @@ -571,6 +593,9 @@ public function dataForCreateSwatchProduct() ]; } + /** + * @return array + */ public function dataForCreateSwatchProductByFallback() { $productMock = $this->createMock(\Magento\Catalog\Model\Product::class); @@ -612,6 +637,9 @@ public function testGetSwatchAttributesAsArray($optionsArray, $attributeData, $e $this->assertEquals($result, $expected); } + /** + * @return array + */ public function dataForGettingSwatchAsArray() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php index ca267278291e3..aed9c1da41289 100644 --- a/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php @@ -114,6 +114,9 @@ public function testGetSwatchAttributeImage($swatchType, $expectedResult) $this->assertEquals($result, $expectedResult); } + /** + * @return array + */ public function dataForFullPath() { return [ @@ -202,6 +205,9 @@ public function testGetFolderNameSize($swatchType, $imageConfig, $expectedResult $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function dataForFolderName() { return [ @@ -293,6 +299,9 @@ public function testGetSwatchCachePath($swatchType, $expectedResult) $this->assertEquals($expectedResult, $this->mediaHelperObject->getSwatchCachePath($swatchType)); } + /** + * @return array + */ public function getSwatchTypes() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php index 31a45ddb2847c..317ea77107222 100644 --- a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php @@ -310,6 +310,9 @@ public function testBeforeSaveNotSwatch() $this->eavAttribute->beforeBeforeSave($this->attribute); } + /** + * @return array + */ public function visualSwatchProvider() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php index abec4569c81dc..3f98519ac1806 100644 --- a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php @@ -98,6 +98,9 @@ public function testBeforeGetImage($expected) $this->assertEquals([$this->productMock, $expected['page_handle'], []], $result); } + /** + * @param $expected + */ protected function canReplaceImageWithSwatch($expected) { $this->swatchesHelperMock diff --git a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php index 791ba83b374c6..d7422786aec67 100644 --- a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php @@ -39,6 +39,9 @@ public function testAfterGetMediaAttributes($productType, $hasKey) } } + /** + * @return array + */ public function dataRoles() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php b/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php index 8292e0c2ed1bb..45c680366264b 100644 --- a/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php @@ -73,6 +73,9 @@ public function testAddFields($expected) $this->observerMock->execute($this->eventObserverMock); } + /** + * @return array + */ public function dataAddFields() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php b/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php index c24dd820e0144..f78797d93cb0d 100644 --- a/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php @@ -66,6 +66,9 @@ public function testAddSwatchAttributeType($exp) $this->observerMock->execute($this->eventObserverMock); } + /** + * @return array + */ public function dataAddSwatch() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php b/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php index c1aa2b0c9900d..e7a11ec45ad3f 100644 --- a/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php +++ b/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php @@ -44,6 +44,9 @@ public function testDisplayShipping($shippingMethod, $expectedResult) $this->assertEquals($expectedResult, $this->model->displayShipping()); } + /** + * @return array + */ public function displayShippingDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php b/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php index 1a16e69724479..90f0f09215889 100644 --- a/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php +++ b/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php @@ -96,6 +96,9 @@ public function testDisplayPriceInclTax($zone, $methodName) $this->assertEquals($flag, $this->renderer->displayPriceInclTax()); } + /** + * @return array + */ public function displayPriceInclTaxDataProvider() { $data = [ @@ -143,6 +146,9 @@ public function testDisplayPriceExclTax($zone, $methodName) $this->assertEquals($flag, $this->renderer->displayPriceExclTax()); } + /** + * @return array + */ public function displayPriceExclTaxDataProvider() { $data = [ @@ -190,6 +196,9 @@ public function testDisplayBothPrices($zone, $methodName) $this->assertEquals($flag, $this->renderer->displayBothPrices()); } + /** + * @return array + */ public function displayBothPricesDataProvider() { $data = [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php index e6a29177301dd..47ec0d8732d81 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php @@ -312,6 +312,9 @@ public function testSaveThrowsExceptionIfCannotSaveTitles($expectedException, $e $this->model->save($rateMock); } + /** + * @return array + */ public function saveThrowsExceptionIfCannotSaveTitlesDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php b/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php index 912f42af0d3cd..82a473b42a82e 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php @@ -63,6 +63,9 @@ protected function setUp() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupOrderMock() { $orderMock = $this->getMockBuilder(\Magento\Sales\Model\Order::class) @@ -80,6 +83,9 @@ protected function setupOrderMock() return $orderMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupExtensionAttributeMock() { $orderExtensionAttributeMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderExtensionInterface::class) @@ -95,6 +101,9 @@ protected function setupExtensionAttributeMock() return $orderExtensionAttributeMock; } + /** + * @param $expectedTaxes + */ protected function verifyOrderTaxes($expectedTaxes) { $index = 0; @@ -125,6 +134,9 @@ protected function verifyOrderTaxes($expectedTaxes) } } + /** + * @param $expectedItemTaxes + */ public function verifyItemTaxes($expectedItemTaxes) { $index = 0; diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php index e5bd728e180f6..5e806bf36fc53 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php @@ -108,6 +108,11 @@ function ($value) { ); } + /** + * @param array $data + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupTaxTotal(array $data) { $taxTotalMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\Total::class) @@ -121,6 +126,11 @@ protected function setupTaxTotal(array $data) return $taxTotalMock; } + /** + * @param array $taxRate + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupTaxRateFactoryMock(array $taxRate) { $taxRateMock = $this->getMockBuilder(\Magento\Tax\Api\Data\GrandTotalRatesInterface::class) @@ -142,6 +152,11 @@ protected function setupTaxRateFactoryMock(array $taxRate) return $taxRateMock; } + /** + * @param array $taxDetails + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupTaxDetails(array $taxDetails) { $taxDetailsMock = $this->getMockBuilder(\Magento\Tax\Api\Data\GrandTotalDetailsInterface::class) diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php index 23ce032764a8f..09f82b32137b3 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php @@ -64,6 +64,9 @@ protected function setUp() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupOrderExtensionAttributeMock() { $orderExtensionAttributeMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderExtensionInterface::class) diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php index 6440751961796..9b963434e321d 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php @@ -183,6 +183,9 @@ public function testGetShippingDataObject( } } + /** + * @return array + */ public function getShippingDataObjectDataProvider() { $data = [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php index feee41c342069..3523d2828948c 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php @@ -552,6 +552,9 @@ public function testMapQuoteExtraTaxables($itemData, $addressData) /* * @return array */ + /** + * @return array + */ public function dataProviderMapQuoteExtraTaxablesArray() { $data = [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php b/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php index f8cd3fce693a6..6902a59a2dab4 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php @@ -95,6 +95,9 @@ public function testIsDisplayed( $this->assertEquals($expectedResult, $this->applyDiscountOnPricesNotification->isDisplayed()); } + /** + * @return array + */ public function dataProviderIsDisplayed() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php b/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php index 3cf1421ebcf37..3fda67669fe86 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php @@ -73,6 +73,9 @@ public function testIsDisplayed( $this->assertEquals($expectedResult, $this->notifications->isDisplayed()); } + /** + * @return array + */ public function dataProviderIsDisplayed() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php index ec640b74f8985..493eebf9e1123 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php @@ -109,6 +109,9 @@ public function testSetDefaultAddressAfterSave( $this->manager->setDefaultAddressAfterSave($address); } + /** + * @return array + */ public function setAddressCustomerSessionAddressSaveDataProvider() { return [ @@ -151,6 +154,9 @@ public function testSetDefaultAddressAfterLogIn( $this->manager->setDefaultAddressAfterLogIn([$address]); } + /** + * @return array + */ public function setAddressCustomerSessionLogInDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php index eb107c248880b..d46c9996c390c 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php @@ -39,6 +39,9 @@ public function testCreate($classType, $className, $classTypeMock) $this->assertEquals($classTypeMock, $taxClassFactory->create($classMock)); } + /** + * @return array + */ public function createDataProvider() { $customerClassMock = $this->createMock(\Magento\Tax\Model\TaxClass\Type\Customer::class); diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php index f4151cd18ba66..3fddd5da47611 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php @@ -168,6 +168,9 @@ public function testSaveWithExceptions($exceptionObject, $exceptionName, $except $this->model->save($rule); } + /** + * @return array + */ public function saveExceptionsDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php b/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php index 14d678d02366b..96b4b81ae2817 100644 --- a/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php +++ b/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php @@ -138,6 +138,9 @@ public function testExecute( $this->session->execute($this->observerMock); } + /** + * @return array + */ public function getExecuteDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php b/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php index a92aa6a0d05eb..e7557e2164ca0 100644 --- a/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php +++ b/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php @@ -56,6 +56,9 @@ public function testIsIncludedInBasePrice($expectedResult) $this->assertEquals($expectedResult, $this->adjustment->isIncludedInBasePrice()); } + /** + * @return array + */ public function isIncludedInBasePriceDataProvider() { return [[true], [false]]; @@ -113,6 +116,9 @@ public function testExtractAdjustment($isPriceIncludesTax, $amount, $price, $exp $this->assertEquals($expectedResult, $this->adjustment->extractAdjustment($amount, $object)); } + /** + * @return array + */ public function extractAdjustmentDataProvider() { return [ @@ -164,6 +170,9 @@ public function testIsExcludedWith($adjustmentCode, $expectedResult) $this->assertEquals($expectedResult, $this->adjustment->isExcludedWith($adjustmentCode)); } + /** + * @return array + */ public function isExcludedWithDataProvider() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php b/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php index 49066e79cb798..91c3ce47fc8b8 100644 --- a/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php +++ b/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php @@ -109,6 +109,9 @@ protected function setUp() ); } + /** + * @return Topmenu + */ protected function getTopmenu() { return new Topmenu($this->context, $this->nodeFactory, $this->treeFactory); diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php index d959b95dcb0ca..1725fe158c16c 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php @@ -123,6 +123,9 @@ public function testGetValue($value, $expectedResult) $this->assertEquals($expectedResult, $this->model->getValue()); } + /** + * @return array + */ public function getValueDataProvider() { return [ @@ -131,6 +134,9 @@ public function getValueDataProvider() ]; } + /** + * @return array + */ public function afterSaveDataProvider() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php b/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php index 5d1c9f8cf7c3c..e302762c1c783 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php @@ -31,6 +31,9 @@ public function testValidate(array $data, $result, array $messages) $this->assertEquals($messages, $validator->getErrorMessages()); } + /** + * @return array + */ public function dataProviderValidate() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php b/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php index 4ff64e6f694e8..b191a64ac2c21 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php @@ -481,6 +481,9 @@ public function testToArray(array $themeData, array $expected) $this->assertEquals($expected, $this->_model->toArray()); } + /** + * @return array + */ public function toArrayDataProvider() { $parentTheme = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) @@ -555,6 +558,9 @@ public function testPopulateFromArray(array $value, array $expected, $expectedCa $this->assertEquals($expected, $this->_model->getData()); } + /** + * @return array + */ public function populateFromArrayDataProvider() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php index 62b644042b68d..913561590607a 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php @@ -172,6 +172,9 @@ public function testUploadInvalidFile() $this->_storageModel->uploadFile($this->_storageRoot); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function _prepareUploader() { $uploader = $this->createMock(\Magento\MediaStorage\Model\File\Uploader::class); @@ -538,6 +541,9 @@ public function testDeleteRootDirectory() $this->_storageModel->deleteDirectory($directoryPath); } + /** + * @return array + */ public function booleanCasesDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php b/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php index 068738f17c967..2ac959d0a9881 100644 --- a/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php +++ b/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php @@ -82,6 +82,9 @@ public function testPrepareDataSource($dataSourceItem, $scope, $scopeId) $this->assertEquals($expectedDataSource, $dataSource); } + /** + * @return array + */ public function getPrepareDataSourceDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php index 54bf0c9e8b37e..d9afe8f16a1a7 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php @@ -46,6 +46,9 @@ protected function setUp() */ abstract protected function getModelName(); + /** + * @return mixed + */ abstract public function testGetComponentName(); /** diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/ActionDeleteTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/ActionDeleteTest.php index 6f45c192d6c4c..890737965d559 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/ActionDeleteTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/ActionDeleteTest.php @@ -20,6 +20,9 @@ protected function getModelName() return ActionDelete::class; } + /** + * @return mixed|void + */ public function testGetComponentName() { $this->assertSame(ActionDelete::NAME, $this->getModel()->getComponentName()); diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/CheckboxSetTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/CheckboxSetTest.php index 025f4a1582458..968155b92a3b9 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/CheckboxSetTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/CheckboxSetTest.php @@ -22,6 +22,9 @@ protected function getModelName() return CheckboxSet::class; } + /** + * @return mixed|void + */ public function testGetComponentName() { $this->assertSame(CheckboxSet::NAME, $this->getModel()->getComponentName()); diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/MultiSelectTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/MultiSelectTest.php index cb91fbb945bb5..723d6402fe865 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/MultiSelectTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/MultiSelectTest.php @@ -22,6 +22,9 @@ protected function getModelName() return MultiSelect::class; } + /** + * @return mixed|void + */ public function testGetComponentName() { $this->contextMock->expects($this->never())->method('getProcessor'); diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/RadioSetTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/RadioSetTest.php index 0e0fef60df60b..ea4f0f9f94a00 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/RadioSetTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/RadioSetTest.php @@ -22,6 +22,9 @@ protected function getModelName() return RadioSet::class; } + /** + * @return mixed|void + */ public function testGetComponentName() { $this->assertSame(RadioSet::NAME, $this->getModel()->getComponentName()); diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/SelectTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/SelectTest.php index c695262681063..6432f8404eaff 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/SelectTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/SelectTest.php @@ -22,6 +22,9 @@ protected function getModelName() return Select::class; } + /** + * @return mixed|void + */ public function testGetComponentName() { $this->assertSame(Select::NAME, $this->getModel()->getComponentName()); diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php index d0e0542a19480..2304883666b74 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php @@ -62,6 +62,9 @@ protected function setUp() ->method('getElementHtml'); } + /** + * @return \Magento\Ui\Component\Form\Element\AbstractElement|object + */ protected function getModel() { return $this->objectManager->getObject(Wysiwyg::class, [ @@ -82,6 +85,9 @@ protected function getModelName() return Wysiwyg::class; } + /** + * @return mixed|void + */ public function testGetComponentName() { $this->assertSame(Wysiwyg::NAME, $this->getModel()->getComponentName()); diff --git a/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php b/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php index 123b4cacf71a7..b2f494351597f 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php @@ -93,6 +93,9 @@ public function testPrepare($componentName, $componentData) $this->assertEquals(['actions' => [$action->getConfiguration()]], $massAction->getConfiguration()); } + /** + * @return array + */ public function getPrepareDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php b/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php index 8228026dff3d1..d146a18a710c6 100644 --- a/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php +++ b/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php @@ -61,6 +61,9 @@ public function testConvert(array $expectedResult, $xpath) $this->assertEquals($expectedResult, $this->converter->convert($actions)); } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php b/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php index 058e3651bde5c..8f5ab55f7a914 100644 --- a/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php +++ b/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php @@ -41,6 +41,9 @@ public function testConvert(array $expectedResult, $xpath) $this->assertEquals($expectedResult, $res); } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php b/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php index 96468b63314b4..fde743390816d 100644 --- a/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php +++ b/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php @@ -193,6 +193,9 @@ public function testPrepareGetData($componentName, $componentData, $isCached, $r ); } + /** + * @return array + */ public function getComponentData() { $cachedData = new \ArrayObject( @@ -293,6 +296,9 @@ public function testCreateRawComponentData($componentName, $configData, $compone $this->assertEquals($componentData, $this->manager->createRawComponentData($componentName, $needEvaluate)); } + /** + * @return array + */ public function getComponentDataProvider() { return [ diff --git a/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php b/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php index e41a06cb0c9f0..b99c5c48c3de0 100644 --- a/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php +++ b/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php @@ -55,6 +55,9 @@ public function testValidateSuffixException($suffix) $this->_helper->validateSuffix($suffix); } + /** + * @return array + */ public function requestPathDataProvider() { return [ @@ -63,6 +66,9 @@ public function requestPathDataProvider() ]; } + /** + * @return array + */ public function requestPathExceptionDataProvider() { return [ diff --git a/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php b/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php index 54ceffff665ea..0f70753e01fbf 100644 --- a/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php +++ b/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php @@ -111,6 +111,9 @@ public function testValidate($variableArray, $objectId, $expectedResult) $this->assertEquals($expectedResult, $this->model->validate($variableArray)); } + /** + * @return array + */ public function validateDataProvider() { $variable = [ @@ -123,6 +126,9 @@ public function validateDataProvider() ]; } + /** + * @return array + */ public function validateMissingInfoDataProvider() { return [ diff --git a/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php b/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php index efbe2e9745ef1..09c17d1e58d98 100644 --- a/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php +++ b/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php @@ -160,6 +160,9 @@ public function testPositiveCase($customerId, $createdAt, $token, $isActive, $me static::assertEquals($createdAt, $paymentToken->getCreatedAt()); } + /** + * @return array + */ public function positiveCaseDataProvider() { return [ diff --git a/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php b/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php index 7f3fe558a98eb..c213c72b5185a 100644 --- a/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php @@ -51,6 +51,9 @@ public function testAllStoreCode($storeCodeInPath, $storeCodeSet, $setCurrentSto $this->assertSame($this->endpointPath, $result); } + /** + * @return array + */ public function processPathDataProvider() { return [ diff --git a/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php b/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php index c7272e3e5a2b2..86ef45e95618a 100644 --- a/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php @@ -297,6 +297,9 @@ public function testValidToken($userType, $userId, $expectedUserType, $expectedU $this->assertEquals($expectedUserId, $this->tokenUserContext->getUserId()); } + /** + * @return array + */ public function getValidTokenData() { return [ diff --git a/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php b/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php index 611517df51657..8976ea6845dad 100644 --- a/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php @@ -295,6 +295,9 @@ public function testGetObjectSchema($typeName, $description, $result) $this->assertSame(json_encode($result), json_encode($actual)); } + /** + * @return array + */ public function getObjectSchemaDataProvider() { return [ @@ -354,6 +357,9 @@ public function testGenerateDefinition($typeData, $expected) $this->assertSame(json_encode($expected), json_encode($actual)); } + /** + * @return array + */ public function generateDefinitionDataProvider() { return [ diff --git a/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php b/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php index b49150fc6fac0..8b770ea763cdd 100644 --- a/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php +++ b/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php @@ -122,6 +122,9 @@ public function testDisplayPriceWithWeeeDetails( $this->assertEquals($expectedValue, $this->renderer->displayPriceWithWeeeDetails()); } + /** + * @return array + */ public function displayPriceWithWeeeDetailsDataProvider() { $data = [ @@ -472,6 +475,9 @@ public function testGetBaseRowDisplayPriceInclTax( $this->assertEquals($expectedValue, $this->renderer->getBaseRowDisplayPriceInclTax()); } + /** + * @return array + */ public function getDisplayPriceDataProvider() { $data = [ @@ -739,6 +745,9 @@ public function testGetBaseFinalRowDisplayPriceInclTax( $this->assertEquals($expectedValue, $this->renderer->getBaseFinalRowDisplayPriceInclTax()); } + /** + * @return array + */ public function getFinalDisplayPriceDataProvider() { $data = [ diff --git a/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php b/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php index 975580945bb3a..22d673e0c8b26 100644 --- a/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php +++ b/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php @@ -78,6 +78,9 @@ protected function setUp() $this->invoice->expects($this->atLeastOnce())->method('getOrder')->will($this->returnValue($this->order)); } + /** + * @param $orderData + */ private function setupOrder($orderData) { //Set up order mock diff --git a/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php b/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php index 19f55550bac65..6d363847bf9e6 100644 --- a/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php +++ b/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php @@ -130,6 +130,9 @@ public function testExecute( $this->session->execute($this->observerMock); } + /** + * @return array + */ public function getExecuteDataProvider() { return [ diff --git a/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php b/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php index e0eba358bc892..4c65011c1f69a 100644 --- a/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php +++ b/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php @@ -134,6 +134,9 @@ public function testIsExcludedWith($adjustmentCode, $expectedResult) $this->assertEquals($expectedResult, $this->adjustment->isExcludedWith($adjustmentCode)); } + /** + * @return array + */ public function isExcludedWithDataProvider() { return [ @@ -157,6 +160,9 @@ public function testGetSortOrder($isTaxable, $expectedResult) $this->assertEquals($expectedResult, $this->adjustment->getSortOrder()); } + /** + * @return array + */ public function getSortOrderProvider() { return [ diff --git a/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php b/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php index 4b3ff8b8dd23e..36c51547c5a42 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php @@ -114,6 +114,9 @@ public function testGetConfiguredOptions($options, $callNum, $expected) $this->assertEquals($expected, $this->block->getConfiguredOptions()); } + /** + * @return array + */ public function getConfiguredOptionsDataProvider() { return [ diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php index d7195086850e4..2df44a912a09c 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php @@ -136,6 +136,9 @@ protected function prepareContext() ->willReturn($this->resultFactoryMock); } + /** + * @return \Magento\Wishlist\Controller\Index\Allcart + */ public function getController() { $this->prepareContext(); diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php index 136d0f7f36c3e..7c6ba740aa18d 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php @@ -123,6 +123,9 @@ protected function prepareContext() ->willReturn($this->resultFactoryMock); } + /** + * @return \Magento\Wishlist\Controller\Index\Index + */ public function getController() { $this->prepareContext(); diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php index 82a58df1e579e..79186d29e666d 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php @@ -67,6 +67,9 @@ protected function tearDown() ); } + /** + * @return \Magento\Wishlist\Controller\Index\Plugin + */ protected function getPlugin() { return new \Magento\Wishlist\Controller\Index\Plugin( diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php index 2a36d3beb8558..6260a1292bee9 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php @@ -139,6 +139,9 @@ protected function prepareContext() ->willReturn($this->resultFactoryMock); } + /** + * @return \Magento\Wishlist\Controller\Index\Remove + */ public function getController() { $this->prepareContext(); diff --git a/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php b/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php index 0b1057683de86..9876b3f6bb75e 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php @@ -172,6 +172,9 @@ public function testRemoveOptionByCode($code, $option) $this->assertTrue($actualOption->isDeleted()); } + /** + * @return array + */ public function getOptionsDataProvider() { $optionMock = $this->getMockBuilder(\Magento\Wishlist\Model\Item\Option::class) diff --git a/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php b/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php index 145d282554634..6cac17aa8c3da 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php @@ -60,6 +60,9 @@ public function testProcess($qtyResult, $expectedResult) $this->assertEquals($expectedResult, $this->processor->process($qty)); } + /** + * @return array + */ public function processDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php b/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php index 9f7269455555c..d15624637b597 100644 --- a/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php +++ b/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php @@ -20,6 +20,13 @@ protected function setUp() $this->model = new Registry(); } + /** + * @param $roleId + * @param $parentRoleId + * + * @return array + * @throws \Zend_Acl_Role_Registry_Exception + */ protected function initRoles($roleId, $parentRoleId) { $parentRole = $this->createMock(\Zend_Acl_Role_Interface::class); diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php index 47f520d4ee28a..c1ab91e3ccaa6 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php +++ b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php @@ -31,12 +31,24 @@ abstract class EntityChildTestAbstract extends \PHPUnit\Framework\TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Code\Generator\DefinedClasses */ protected $definedClassesMock; + /** + * @return mixed + */ abstract protected function getSourceClassName(); + /** + * @return mixed + */ abstract protected function getResultClassName(); + /** + * @return mixed + */ abstract protected function getGeneratorClassName(); + /** + * @return mixed + */ abstract protected function getOutputFileName(); protected function setUp() diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php index 4946f083004ba..f4855a6f69066 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php +++ b/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php @@ -367,6 +367,9 @@ public function testMergeDataObjects($data1, $data2) $this->assertSame($firstAddressDataObject->getRegion(), $secondAddressDataObject->getRegion()); } + /** + * @return array + */ public function dataProviderForTestMergeDataObjects() { return [ diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php index 05ecc0bdbcc61..c2ecf51e8afc4 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php +++ b/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php @@ -37,6 +37,9 @@ public function testItReturnsTheCorrectValuesIfSortOrderIsSet($sortOrder) $this->assertSame($sortOrder, $this->sortOrder->getDirection()); } + /** + * @return array + */ public function sortOrderDirectionProvider() { return [[SortOrder::SORT_ASC], [SortOrder::SORT_DESC]]; @@ -52,6 +55,9 @@ public function testItThrowsAnExceptionIfAnInvalidSortOrderIsSet($invalidDirecti $this->sortOrder->setDirection($invalidDirection); } + /** + * @return array + */ public function invalidSortDirectionProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php index ee45842013f64..c157f818242ef 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php @@ -8,6 +8,9 @@ class ActionStub extends \Magento\Framework\App\Action\Action { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php b/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php index 678bb7a85272f..1813ff147190c 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php @@ -276,6 +276,9 @@ public function testDetectDesignByRequest($value, $callNum, $callNum2) $this->object->detectDesign($requestMock); } + /** + * @return array + */ public function detectDesignByRequestDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php index 1e2947084ee6b..bfa96a1702879 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php @@ -189,6 +189,9 @@ public function testIsDeveloperMode($modeFromEnvironment, $modeFromDeployment, $ $this->assertEquals($isDeveloper, $bootstrap->isDeveloperMode()); } + /** + * @return array + */ public function testIsDeveloperModeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php index fdb962d7d295e..bfa37311884ba 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php @@ -105,6 +105,9 @@ public function testInitializationParams( $model->current(); } + /** + * @return array + */ public function initializationParamsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php index 74a92d54f1934..380c45e383128 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php @@ -157,6 +157,9 @@ public function testCleanModeMatchingAnyTag($fixtureResultOne, $fixtureResultTwo $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function cleanModeMatchingAnyTagDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php index e8c0217b40b2c..bcae099815c98 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php @@ -89,6 +89,9 @@ public function testGet($fixtureConfigData, $inputCacheType, $expectedFrontendId $this->assertSame($accessProxy, $this->_model->get($inputCacheType)); } + /** + * @return array + */ public function getDataProvider() { $configData1 = [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php b/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php index 236a65611422d..bb5748e0759a0 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php @@ -147,6 +147,9 @@ public function testSave($inputData, $inputId, $inputTags, $expectedData, $expec $this->_model->save($inputData, $inputId, $inputTags); } + /** + * @return array + */ public function saveDataProvider() { $configTag = \Magento\Framework\App\Config::CACHE_TAG; @@ -190,6 +193,9 @@ public function testRemove($result) $this->assertEquals($result, $this->_model->remove('test_id')); } + /** + * @return array + */ public function successFailureDataProvider() { return ['success' => [true], 'failure' => [false]]; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php index 3cf552ae115a5..3adc4bada0665 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php @@ -55,6 +55,9 @@ public function testResolve($path, $scope, $scopeCode, $type, $expected) $this->assertSame($expected, $this->model->resolve($path, $scope, $scopeCode, $type)); } + /** + * @return array + */ public function resolveDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php index f106ba6e151fd..6f137ede742ff 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php @@ -35,6 +35,9 @@ public function testSetValue($path, $value) $this->assertEquals($value, $this->_model->getValue($path)); } + /** + * @return array + */ public function setValueDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php index 3d1cdf0023cc9..29ccd33d73d3b 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php @@ -65,6 +65,9 @@ public function testGetData($scope, $expected) $this->assertEquals($expected, $this->config->getData($scope)); } + /** + * @return array + */ public function getDataDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php index ef2b342936cd9..6159e5cac45e8 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php @@ -184,6 +184,9 @@ public function testAfterSave($callNumber, $oldValue) $this->assertInstanceOf(get_class($this->model), $this->model->afterSave()); } + /** + * @return array + */ public function afterSaveDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php index f94c30b4fa3c8..da9826bfe8c95 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php @@ -73,6 +73,9 @@ public function testGetValue($scope, $scopeCode = null) $this->assertTrue($this->appConfig->getValue($path, $scope, $scopeCode ?: $this->scope)); } + /** + * @return array + */ public function getValueDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php index ebd47c0dc8936..784cb8136c3ab 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php @@ -88,6 +88,9 @@ public function testFailedTaskWithRestoredModeOnFailure(bool $maintenanceModeEna } } + /** + * @return array + */ public function initialAppStateProvider() { return [ @@ -96,6 +99,11 @@ public function initialAppStateProvider() ]; } + /** + * @param bool $isOn + * + * @return MaintenanceMode + */ private function createMaintenanceMode(bool $isOn): MaintenanceMode { $maintenanceMode = $this->getMockBuilder(MaintenanceMode::class) @@ -113,6 +121,9 @@ private function createMaintenanceMode(bool $isOn): MaintenanceMode return $maintenanceMode; } + /** + * @return OutputInterface + */ private function createOutput(): OutputInterface { $output = $this->getMockBuilder(OutputInterface::class) diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php index ec678d21a581b..18de140af8428 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php @@ -34,6 +34,9 @@ public function testSetCode($code, $expectedCode) $this->assertEquals($expectedCode, $result); } + /** + * @return array + */ public static function setCodeProvider() { $largeCode = 256; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php b/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php index e2c77864d8e82..ce1f1661ad827 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php @@ -56,6 +56,9 @@ protected function setUp() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function prepareAreaListMock() { $areaMock = $this->createMock(\Magento\Framework\App\Area::class); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php index fa41d717cc521..80ab2302dc91c 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php @@ -127,6 +127,9 @@ public function testKeyCollision(array $data) $object->get(); } + /** + * @return array + */ public function keyCollisionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php index 7fda8de6d3216..23afbbc73d2b9 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php @@ -29,6 +29,9 @@ public function testIsPub($path, $isExist, $result) $this->assertSame($result, $model->isPub()); } + /** + * @return array + */ public function isPubDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php index daf3a4bdfab0c..4b904cc2b55bd 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php @@ -32,6 +32,9 @@ public function testHandler($errorNo, $errorStr, $errorFile, $expectedResult) $this->assertEquals($expectedResult, $this->object->handler($errorNo, $errorStr, $errorFile, 11)); } + /** + * @return array + */ public function handlerProvider() { return [ @@ -60,6 +63,9 @@ public function testHandlerException($errorNo, $errorPhrase) $this->object->handler($errorNo, $errorStr, $errorFile, $errorLine); } + /** + * @return array + */ public function handlerProviderException() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php index 15f6bed1ac0d3..23906486634ec 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php @@ -144,6 +144,9 @@ public function testVaryStringSource($cookieExists) $this->model->getValue(); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php index 20ea5d1a3e86f..db200f962f5b5 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php @@ -241,6 +241,9 @@ function ($value) { $this->kernel->process($this->responseMock); } + /** + * @return array + */ public function testProcessSaveCacheDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php index 74e673c8bfc26..8e1acc89437e2 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php @@ -45,6 +45,9 @@ public function testGetVersion($packageList, $expectedVersion) $this->assertEquals($expectedVersion, $productVersion); } + /** + * @return array + */ public function testGetVersionGitInstallationDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php index 66eee671e17d3..62445d4244fb7 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php @@ -259,6 +259,9 @@ public function testGetDistroBaseUrlPath($scriptName, $expected) $this->assertEquals($expected, Http::getDistroBaseUrlPath(['SCRIPT_NAME' => $scriptName])); } + /** + * @return array + */ public function getDistroBaseUrlPathDataProvider() { return [ @@ -273,6 +276,9 @@ public function getDistroBaseUrlPathDataProvider() ]; } + /** + * @return array + */ public function serverVariablesProvider() { $returnValue = []; @@ -378,6 +384,9 @@ public function testIsSafeMethodFalse($httpMethod) $this->assertEquals(false, $this->_model->isSafeMethod()); } + /** + * @return array + */ public function httpSafeMethodProvider() { return [ @@ -388,6 +397,9 @@ public function httpSafeMethodProvider() ]; } + /** + * @return array + */ public function httpNotSafeMethodProvider() { return [ @@ -400,6 +412,9 @@ public function httpNotSafeMethodProvider() ]; } + /** + * @return array + */ public function isSecureDataProvider() { /** @@ -442,6 +457,9 @@ public function testSetPathInfo($requestUri, $basePath, $expected) $this->assertEquals($expected, $this->_model->getPathInfo()); } + /** + * @return array + */ public function setPathInfoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php index 0bdbcccc40b35..e1a2171d2111a 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php @@ -93,6 +93,9 @@ public function testGet($module, $area, $namespace, $action, $data, $expected) $this->assertEquals($expected, $this->actionList->get($module, $area, $namespace, $action)); } + /** + * @return array + */ public function getDataProvider() { $mockClassName = 'Mock_Action_Class'; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php index 7a54cf17a87e4..0b7e0e00a2df8 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php @@ -49,6 +49,9 @@ public function testGetException($scope) $scopeResolver->get($scope); } + /** + * @return array + */ public function testGetExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php b/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php index 3db75f7ec7fb2..ae8a76f7bbc1f 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php @@ -29,6 +29,9 @@ public function testConstructorExceptions($server, $expectedError) new SetupInfo($server); } + /** + * @return array + */ public function constructorExceptionsDataProvider() { $docRootErr = 'DOCUMENT_ROOT variable is unavailable.'; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php b/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php index 46eec1e692424..a87322b6e90d9 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php @@ -87,6 +87,10 @@ public function testEmulateAreaCode() $this->assertEquals($this->model->getAreaCode(), $areaCode); } + /** + * @return string + * @throws \Magento\Framework\Exception\LocalizedException + */ public function emulateAreaCodeCallback() { return $this->model->getAreaCode(); diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php index 172d0e486dc64..cbb7ed9e5ba6a 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php @@ -129,12 +129,23 @@ public function testSaveLoad() $this->assertEquals($this->_testString, $loadedValue); } + /** + * @param $data + * @param $cacheId + * + * @return bool + */ public static function mockSave($data, $cacheId) { self::$_cacheStorage[$cacheId] = $data; return true; } + /** + * @param $cacheId + * + * @return bool|mixed + */ public static function mockLoad($cacheId) { return array_key_exists($cacheId, self::$_cacheStorage) ? self::$_cacheStorage[$cacheId] : false; diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php index 7a3aec7b66488..ba75b7eed52ca 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php @@ -63,6 +63,9 @@ public function testConstructorException($options) $this->getMockForAbstractClass(\Magento\Framework\Cache\Backend\Decorator\AbstractDecorator::class, [$options]); } + /** + * @return array + */ public function constructorExceptionDataProvider() { return [ @@ -86,6 +89,9 @@ public function testAllMethods($methodName) call_user_func([$decorator, $methodName], null, null); } + /** + * @return array + */ public function allMethodsDataProvider() { $return = []; diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php index daa3081a07c35..435fc6535c1a2 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php @@ -45,6 +45,9 @@ public function testGetIds(array $ids, array $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getIdsDataProvider() { return [ @@ -64,6 +67,9 @@ public function testGetTags(array $tags) $this->assertEquals($tags, $actual); } + /** + * @return array + */ public function getTagsDataProvider() { return ['no tags' => [[]], 'multiple tags' => [['tag1', 'tag2']]]; @@ -92,6 +98,9 @@ public function testGetIdsMatchingTags($method, $tags, $expectedInput) $this->assertEquals($expectedIds, $actualIds); } + /** + * @return array + */ public function getIdsMatchingTagsDataProvider() { return [ @@ -170,6 +179,9 @@ public function testGetMetadatas($cacheId, $expectedInput, $mongoOutput, $expect $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getMetadatasDataProvider() { $time = time(); @@ -237,6 +249,9 @@ public function testLoad($doNotTestValidity) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function loadDataProvider() { return ['test validity' => [false], 'do not test validity' => [true]]; @@ -322,6 +337,9 @@ public function testClean($mode, $tags, $expectedQuery) $this->_model->clean($mode, $tags); } + /** + * @return array + */ public function cleanDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php index 616c55f600e9e..4b634ae18c7af 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php @@ -61,6 +61,9 @@ public function testSetBackendException($decorators) $core->setBackend($this->_mockBackend); } + /** + * @return array + */ public function setBackendExceptionProvider() { return [ diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php index cf16c93cd499a..fb646c7f87622 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php @@ -93,6 +93,9 @@ public function testCleanException($cleaningMode, $expectedErrorMessage) $object->clean($cleaningMode); } + /** + * @return array + */ public function cleanExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php index 12774f182d6cd..33105ab52150c 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php @@ -128,6 +128,9 @@ public function testCleanModeMatchingAnyTag($fixtureResultOne, $fixtureResultTwo $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function cleanModeMatchingAnyTagDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php index 658b42e4b972d..eeecc6805ee28 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php @@ -8,6 +8,11 @@ namespace Magento\Framework\Code\Generator { use Magento\Framework\Code\Test\Unit\Generator\DefinedClassesTest; + /** + * @param $className + * + * @return bool + */ function class_exists($className) { return DefinedClassesTest::$definedClassesTestActive diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php index 0f3daa46e1ec3..6462b3806647a 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php @@ -114,6 +114,9 @@ public function testGeneratePredefinedContentNotSet() $this->assertEquals($expectedContent, $generatedContent, "Generated content is invalid."); } + /** + * @return array + */ public function generateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php index 9c63de1258d15..bc2ba24a2f9fe 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php @@ -111,6 +111,9 @@ public function testWriteResultFileAlreadyExists($resultFileName, $fileExists, $ $this->assertSame($success, $this->_object->writeResultFile($resultFileName, self::FILE_CONTENT)); } + /** + * @return array + */ public function testWriteResultFileAlreadyExistsDataProvider() { return [ @@ -202,6 +205,9 @@ public function testFileExists($fileName, $exists) $this->assertSame($exists, $this->_object->fileExists($fileName)); } + /** + * @return array + */ public function fileExistsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php index 3052f682d82cb..c175c0fe9be85 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php @@ -129,6 +129,9 @@ public function testGenerateClassWithExistName($fileExists) ); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php index 588cdfa1d4f7f..b8d49f64569f9 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php @@ -29,6 +29,9 @@ public function testBuildClassName($parts, $expected) $this->assertEquals($expected, $this->nameBuilder->buildClassName($parts)); } + /** + * @return array + */ public function buildClassNameDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php index 64bcb8970612e..e465e01916690 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php @@ -263,6 +263,9 @@ public function testIsCompatibleType($requiredType, $actualType, $expectedResult $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function testIsCompatibleTypeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php index a82c88e3e18b1..b17b10106f8a9 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php @@ -34,6 +34,9 @@ public function testValidClasses($className) $this->assertTrue($this->_validator->validate($className)); } + /** + * @return array + */ public function validClassesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php index 98de5aefba7ef..947ff0b435418 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php @@ -40,6 +40,16 @@ class ParentClass protected $parentOptionalScalar; + /** + * ParentClass constructor. + * + * @param ContextObject $contextObject + * @param ParentRequiredObject $parentRequiredObject + * @param array $parentRequiredScalar + * @param ParentOptionalObject|null $parentOptionalObject + * @param array $data + * @param array $parentOptionalScalar + */ public function __construct( ContextObject $contextObject, ParentRequiredObject $parentRequiredObject, diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php index 3912a3e1cc5dd..6773d599f7fc7 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php @@ -57,6 +57,15 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface */ protected $_implOfBInterface; + /** + * Context constructor. + * + * @param ClassA $exA + * @param ClassB $exB + * @param ClassC $exC + * @param FirstInterface $interfaceA + * @param ImplementationOfSecondInterface $implOfBInterface + */ public function __construct( \ClassA $exA, \ClassB $exB, diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php index 8a9d9866126bf..0aa100fda0caf 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php @@ -14,6 +14,11 @@ class Test extends \Magento\SomeModule\Model\Three\Test */ protected $_proxy; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Model\Proxy $proxy + */ public function __construct(\Magento\SomeModule\Model\Proxy $proxy) { parent::__construct($proxy); diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php index 4701e76f08c59..85133aa4ad851 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php @@ -15,6 +15,12 @@ class Test extends \Magento\SomeModule\Model\One\Test */ protected $_factory; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param \Magento\SomeModule\Model\ElementFactory $factory + */ public function __construct( \Magento\SomeModule\Model\Proxy $proxy, \Magento\SomeModule\Model\ElementFactory $factory diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php index 90f5d40ab726d..eeeb557a99a12 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php @@ -13,6 +13,11 @@ class Test */ protected $_proxy; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Model\Proxy $proxy + */ public function __construct(\Magento\SomeModule\Model\Proxy $proxy) { $this->_proxy = $proxy; diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php index 1d7ffa5127f56..efedcb840e973 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php @@ -45,6 +45,9 @@ public static function testMethod1(array &$data = array()); */ public function testMethod2($data = 'test_default', $flag = true); + /** + * @return mixed + */ public function testMethod3(); diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php index 0c736710f5c4e..a58d9a0d628bc 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php @@ -15,6 +15,12 @@ class Test extends \Magento\SomeModule\Model\One\Test */ protected $_factory; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param \Magento\SomeModule\Model\ElementFactory $factory + */ public function __construct( \Magento\SomeModule\Model\Proxy $proxy, \Magento\SomeModule\Model\ElementFactory $factory diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php index d080034ef978e..5c0013508d00a 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php @@ -20,6 +20,12 @@ class Test extends \Magento\SomeModule\Model\Two\Test */ protected $_proxy; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param \Magento\SomeModule\Model\ElementFactory $factory + */ public function __construct( \Magento\SomeModule\Model\Proxy $proxy, \Magento\SomeModule\Model\ElementFactory $factory diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php index dee0b216b7641..9cec10a1cd36f 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php @@ -14,6 +14,12 @@ class Test extends \Magento\SomeModule\Model\One\Test */ protected $_proxy; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param array $data + */ public function __construct(\Magento\SomeModule\Model\Proxy $proxy, $data = []) { $this->_proxy = $proxy; diff --git a/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php b/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php index 4ca43591c96ff..74f8c1dcdb875 100644 --- a/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php +++ b/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php @@ -92,6 +92,9 @@ public function testIsMagentoRoot($packageName, $expected) $this->assertEquals($expected, $this->composerInformation->isMagentoRoot()); } + /** + * @return array + */ public function isMagentoRootDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php index 09366c91a73a3..2ef915dc836df 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php @@ -24,6 +24,9 @@ public function testConvert($sourceFile, $resultFile) $this->assertEquals($resultFile, $converterDom->convert($dom)); } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php index 619135f9c7038..747560b29dfc1 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php @@ -47,6 +47,9 @@ public function testSetWrongKey($key, $expectedException) $configData->set($key, 'value'); } + /** + * @return array + */ public function setWrongKeyDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php index 380d095d85e64..f8c518d35add7 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php @@ -81,6 +81,9 @@ public function testGetConfigByPath($path, $expectedValue, $default) $this->assertEquals($expectedValue, $this->_model->get($path, $default)); } + /** + * @return array + */ public function getConfigByPathDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php index 94197fe737918..a2fbdce771f94 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php @@ -32,6 +32,9 @@ public function testMatch($pathPattern, $xpathSubject, $expectedResult) $this->assertSame($expectedResult, $actualResult); } + /** + * @return array + */ public function getNodeInfoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php index 77a7f869fb941..27290e1f67e6d 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php @@ -30,6 +30,14 @@ class GenericSchemaLocatorTest extends \PHPUnit\Framework\TestCase */ private $moduleReaderMock; + /** + * @param ModuleDirReader $reader + * @param $moduleName + * @param $mergeSchema + * @param $perFileSchema + * + * @return GenericSchemaLocator + */ private function createNewSchemaLocatorInstance(ModuleDirReader $reader, $moduleName, $mergeSchema, $perFileSchema) { return new GenericSchemaLocator($reader, $moduleName, $mergeSchema, $perFileSchema); diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php index 65e7ee489e84c..881166b3e2218 100644 --- a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php +++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php @@ -75,6 +75,9 @@ public function testSetPath() ); } + /** + * @return array + */ public function httpRedirectResponseStatusCodes() { return [ diff --git a/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php b/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php index 5af254fcdd4dc..4102ece70a1ce 100644 --- a/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php +++ b/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php @@ -31,6 +31,9 @@ public function testXmlToAssoc() ); } + /** + * @return string + */ protected function getXml() { return <<<XML diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php index 561d7b66f0483..a95c8fc21f99e 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php @@ -508,6 +508,9 @@ public function testGetIndexName($name, $fields, $indexType, $expectedName) ); } + /** + * @return array + */ public function getIndexNameDataProvider() { // 65 characters long - will be compressed diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php index 6410d4258491d..5309a3fd2a426 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php @@ -38,6 +38,9 @@ public function testDropSequence() ); } + /** + * @return array + */ public function createSequenceDdlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php index 0915abd98d495..19d6ddfb8e527 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php @@ -22,6 +22,9 @@ public function testShortenEntityName($in, $prefix, $expectedOut) ); } + /** + * @return array + */ public function shortenEntityNameDataProvider() { $length64 = '________________________________________________________________'; diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php index 713f6471ded3c..05ec032e76113 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php @@ -64,6 +64,9 @@ public function testMatch($isCondition) $this->assertEquals($select, $result); } + /** + * @return array + */ public function matchProvider() { return [[true], [false]]; diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php index 143ee42ebfa51..889ca58f9229d 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php @@ -77,6 +77,9 @@ public function testRender($columns, $sql, $expectedResult) $this->assertEquals($expectedResult, $this->model->render($this->selectMock, $sql)); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php index 20a0b384bad7e..9387ffbfed7a6 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php @@ -38,6 +38,9 @@ public function testEvaluateException($inputData) $this->_model->evaluate($inputData); } + /** + * @return array + */ public function evaluateExceptionDataProvider() { return [ @@ -62,6 +65,9 @@ public function testEvaluate(array $input, array $expected) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function evaluateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php index bca8bb0d9347f..37d840b40ca47 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php @@ -60,6 +60,9 @@ public function testEvaluateWrongDiscriminator($input, $expectedExceptionMessage $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateWrongDiscriminatorDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php index bec2a37545e65..8981f5adb2e1a 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php @@ -30,6 +30,9 @@ public function testEvaluateException($input) $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateExceptionDataProvider() { return ['no value' => [[]], 'non-numeric value' => [['value' => 'non-numeric']]]; @@ -47,6 +50,9 @@ public function testEvaluate($input, $expected) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function evaluateDataProvider() { return [ 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 5eea3f8790711..63eccb098bf0d 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php @@ -296,6 +296,9 @@ public function testPrintLogQueryPrinting($printQuery, $printFlag, $query, $expe $this->collection->printLogQuery($printQuery, false, $query); } + /** + * @return array + */ public function printLogQueryPrintingDataProvider() { return [ @@ -319,6 +322,9 @@ public function testPrintLogQueryLogging($logQuery, $logFlag, $expectedCalls) $this->collection->printLogQuery(false, $logQuery, 'some_query'); } + /** + * @return array + */ public function printLogQueryLoggingDataProvider() { return [ @@ -527,6 +533,9 @@ public function testDistinct($flag, $expectedFlag) $this->collection->distinct($flag); } + /** + * @return array + */ public function distinctDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php index a34fdf21f7ab4..793161dfc5cbb 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php @@ -80,6 +80,9 @@ public function testGetElementHtmlDateFormat($fieldName) $this->model->getElementHtml(); } + /** + * @return array + */ public function providerGetElementHtmlDateFormat() { return [ @@ -88,6 +91,11 @@ public function providerGetElementHtmlDateFormat() ]; } + /** + * @param $exactly + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getFormMock($exactly) { $functions = ['getFieldNameSuffix', 'getHtmlIdPrefix', 'getHtmlIdSuffix']; diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php index 9e23610b97668..8b9de2c63953f 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php @@ -50,6 +50,9 @@ public function testValidate($formKey, $expected) $this->assertEquals($expected, $this->_model->validate($this->_requestMock)); } + /** + * @return array + */ public function validateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php index 6dc0d4a1d4628..6a65124b15f4c 100644 --- a/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php +++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php @@ -30,6 +30,11 @@ protected function setUp() $this->_key = substr(__CLASS__, -32, 32); } + /** + * @param $length + * + * @return bool|string + */ protected function _getRandomString($length) { $result = ''; @@ -64,18 +69,33 @@ protected function _requireCipherInfo() } } + /** + * @param $cipherName + * @param $modeName + * + * @return mixed + */ protected function _getKeySize($cipherName, $modeName) { $this->_requireCipherInfo(); return self::$_cipherInfo[$cipherName][$modeName]['key_size']; } + /** + * @param $cipherName + * @param $modeName + * + * @return mixed + */ protected function _getInitVectorSize($cipherName, $modeName) { $this->_requireCipherInfo(); return self::$_cipherInfo[$cipherName][$modeName]['iv_size']; } + /** + * @return array + */ public function getCipherModeCombinations() { $result = []; @@ -102,6 +122,9 @@ public function testConstructor($cipher, $mode) $this->assertEquals($initVector, $crypt->getInitVector()); } + /** + * @return array + */ public function getConstructorExceptionData() { $result = []; @@ -137,6 +160,9 @@ public function testConstructorDefaults() $this->assertEquals($cryptExpected->getInitVector(), $cryptActual->getInitVector()); } + /** + * @return mixed + */ public function getCryptData() { $fixturesFilename = __DIR__ . '/Crypt/_files/_crypt_fixtures.php'; diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php index 52a7a98eac312..f4381a42775d7 100644 --- a/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php +++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php @@ -86,6 +86,9 @@ public function testValidateHash($password, $hash, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateHashDataProvider() { return [ @@ -112,6 +115,9 @@ public function testEncryptWithEmptyKey($key) $this->assertEquals($value, $model->encrypt($value)); } + /** + * @return array + */ public function encryptWithEmptyKeyDataProvider() { return [[null], [0], [''], ['0']]; @@ -134,6 +140,9 @@ public function testDecryptWithEmptyKey($key) $this->assertEquals('', $model->decrypt($value)); } + /** + * @return array + */ public function decryptWithEmptyKeyDataProvider() { return [[null], [0], [''], ['0']]; @@ -208,6 +217,9 @@ public function testValidateKey() $this->assertEquals($crypt->decrypt($expectedEncryptedData), $actual->decrypt($actualEncryptedData)); } + /** + * @return array + */ public function testUseSpecifiedHashingAlgoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php index a0406cd0ec84b..fc241834c7ecf 100644 --- a/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php +++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php @@ -31,6 +31,9 @@ public function testCompareStrings($expected, $actual, $result) $this->assertEquals($result, Security::compareStrings($expected, $actual)); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php index 91c8afaef5d07..136dd8cc80eef 100644 --- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php +++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php @@ -81,6 +81,9 @@ public function testGetObserverByName($name) $this->assertEquals($observer, $this->observerCollection->getObserverByName($name)); } + /** + * @return array + */ public function observerNameProvider() { return [ diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php index 511d547ebed44..1380cc0decf39 100644 --- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php +++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php @@ -37,6 +37,9 @@ public function testGetNumeric($value, $expectedResult) $this->assertEquals($expectedResult, $this->cron->getNumeric($value)); } + /** + * @return array + */ public function numericValueProvider() { return [ @@ -78,6 +81,9 @@ public function testMatchCronExpression($expression, $number, $expectedResult) $this->assertEquals($expectedResult, $this->cron->matchCronExpression($expression, $number)); } + /** + * @return array + */ public function matchCronExpressionProvider() { return [ @@ -107,6 +113,9 @@ public function testIsValidFor($time, $expression, $expectedResult) $this->assertEquals($expectedResult, $this->cron->isValidFor($eventMock)); } + /** + * @return array + */ public function isValidForProvider() { return [ diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php index cfd3602fb030d..80d828930d118 100644 --- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php +++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php @@ -44,6 +44,9 @@ public function testIsValidFor($pattern, $name, $expectedResult) $this->assertEquals($expectedResult, $this->regex->isValidFor($eventMock)); } + /** + * @return array + */ public function isValidForProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php index 97a3b8f498491..5d1f9664bde61 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php @@ -31,6 +31,9 @@ public function testGetAbsolutePath($basePath, $path, $expected) $this->assertEquals($expected, $file->getAbsolutePath($basePath, $path)); } + /** + * @return array + */ public function dataProviderForTestGetAbsolutePath() { return [ @@ -50,6 +53,9 @@ public function testGetRelativePath($basePath, $path, $expected) $this->assertEquals($expected, $file->getRelativePath($basePath, $path)); } + /** + * @return array + */ public function dataProviderForTestGetRelativePath() { return [ diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php index 51a994dc73ff5..dabbae8974905 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php @@ -40,6 +40,9 @@ public function testIsExists($status, $result) $this->assertEquals($result, (new Http())->isExists('')); } + /** + * @return array + */ public function dataProviderForTestIsExists() { return [['200 OK', true], ['404 Not Found', false]]; @@ -54,6 +57,9 @@ public function testStat($headers, $result) $this->assertEquals($result, (new Http())->stat('')); } + /** + * @return array + */ public function dataProviderForTestStat() { $headers1 = [ diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php index 07524f9c3595f..8dcb4befa6cac 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php @@ -39,6 +39,9 @@ public function testExclusion() $this->assertTrue(!in_array(BP . '/var/session/', $result), 'Filtered path should not be in array'); } + /** + * @return \Generator + */ private function getFilesIterator() { $files = [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php index a8cf48eef433f..7c1ae92b10fc2 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php @@ -33,6 +33,9 @@ public function testFilter($input, $expectedOutput) ); } + /** + * @return array + */ public function filterDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php index 126d3f9f2f691..fdce369ba2946 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php @@ -41,6 +41,9 @@ public function testGetValue($string, $expectedValue) $this->assertEquals($expectedValue, $this->_filter->getValue()); } + /** + * @return array + */ public function sampleTokenizeStringProvider() { return [ @@ -51,6 +54,9 @@ public function sampleTokenizeStringProvider() ]; } + /** + * @return array + */ public function sampleGetValueStringProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php index 793637203bb0d..4dad75a6bcb5b 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php @@ -30,6 +30,9 @@ public function testTokenize($string, $expectedValue) $this->assertEquals($expectedValue, $this->_filter->tokenize()); } + /** + * @return array + */ public function sampleTokenizeStringProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php index 14d84707fb0b4..e7376d9b7d264 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php @@ -138,6 +138,9 @@ public function testVarDirective($construction, $variables, $expectedResult) $this->assertEquals($expectedResult, $this->templateFilter->filter($construction)); } + /** + * @return array + */ public function varDirectiveDataProvider() { /* @var $dataObjectVariable \Magento\Framework\DataObject|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php index 8fd28e8513d0b..852badb16d219 100644 --- a/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php +++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php @@ -38,6 +38,9 @@ public function testRead($response) $this->assertEquals(file_get_contents(__DIR__ . '/_files/curl_response_expected.txt'), $this->model->read()); } + /** + * @return array + */ public function readDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php index a746b61ad0038..88cc505fbea8e 100644 --- a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php +++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php @@ -50,6 +50,11 @@ public function tearDown() $_SERVER = $this->serverArray; } + /** + * @param null $uri + * + * @return Request + */ private function getModel($uri = null) { return new Request($this->cookieReader, $this->converter, $uri); diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php index d8e48f278f782..838d85c5fbf20 100644 --- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php +++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php @@ -109,6 +109,9 @@ public function testPrepareDestination($destination, $newName, $expectedResult) $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function prepareDestinationDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php index fe0847f7f69b4..41281c96e1bb4 100644 --- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php +++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php @@ -73,6 +73,9 @@ public function testOpen($fileData, $exception, $limit) $this->adapter->open('file'); } + /** + * @return array + */ public function filesProvider() { $smallFile = [ diff --git a/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php b/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php index c68af718473a4..984b09f9a27ab 100644 --- a/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php +++ b/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php @@ -186,6 +186,13 @@ private function createDimensionMock($name, $value) return $dimension; } + /** + * @param $callNumber + * @param $tableName + * @param $isTableExist + * + * @return mixed + */ private function mockDropTable($callNumber, $tableName, $isTableExist) { $this->connectionInterface->expects($this->at($callNumber++)) @@ -201,6 +208,12 @@ private function mockDropTable($callNumber, $tableName, $isTableExist) return $callNumber; } + /** + * @param $callNumber + * @param $tableName + * + * @return mixed + */ private function mockFlatTable($callNumber, $tableName) { $table = $this->getMockBuilder(\Magento\Framework\DB\Ddl\Table::class) @@ -223,6 +236,12 @@ private function mockFlatTable($callNumber, $tableName) return $callNumber; } + /** + * @param $callNumber + * @param $tableName + * + * @return mixed + */ private function mockFulltextTable($callNumber, $tableName) { $table = $this->getMockBuilder(\Magento\Framework\DB\Ddl\Table::class) diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php index 46d9bee5844a7..107f83ad6f378 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php @@ -14,6 +14,9 @@ public function getValue() return $this->attribute; } + /** + * @param $value + */ public function setValue($value) { $this->attribute = $value; diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php index f751424e59103..5827c1a1b9e13 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php @@ -9,11 +9,17 @@ class TSample { private $value; + /** + * @return string + */ public function getValue() : string { return $this->value; } + /** + * @param string $value + */ public function setValue(string $value) { $this->value = $value; diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php index 54dfa8a03b28c..fe8d29bd0d51d 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php @@ -209,6 +209,9 @@ public function testHasPluginsWhenDataIsCached($expectedResult, $type) $this->assertEquals($expectedResult, $model->hasPlugins($type)); } + /** + * @return array + */ public function hasPluginsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Lock/Backend/Database.php b/lib/internal/Magento/Framework/Lock/Backend/Database.php index 6d1bf07b5b331..61857685a7bb4 100644 --- a/lib/internal/Magento/Framework/Lock/Backend/Database.php +++ b/lib/internal/Magento/Framework/Lock/Backend/Database.php @@ -28,6 +28,13 @@ class Database implements \Magento\Framework\Lock\LockManagerInterface /** @var string|false Holds current lock name if set, otherwise false */ private $currentLock = false; + /** + * Database constructor. + * + * @param ResourceConnection $resource + * @param DeploymentConfig $deploymentConfig + * @param string|null $prefix + */ public function __construct( ResourceConnection $resource, DeploymentConfig $deploymentConfig, diff --git a/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php b/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php index cd7f52f95a850..1dcdb0e9ae65d 100644 --- a/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php +++ b/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php @@ -26,6 +26,9 @@ public function testGetRandomString($length, $chars = null) } } + /** + * @return array + */ public function getRandomStringDataProvider() { return [ @@ -77,6 +80,9 @@ public function testGetRandomNumber($min, $max) $this->assertGreaterThanOrEqual($min, $number); } + /** + * @return array + */ public function testGetRandomNumberProvider() { return [ diff --git a/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php b/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php index f2b496b157c54..ea86985f057bf 100644 --- a/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php +++ b/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php @@ -308,6 +308,9 @@ public function testAddMessage($type, $methodName) $this->assertTrue($this->model->hasMessages()); } + /** + * @return array + */ public function addMessageDataProvider() { return [ @@ -338,6 +341,9 @@ public function testAddUniqueMessagesWhenMessagesImplementMessageInterface($mess $this->model->addUniqueMessages([$messages]); } + /** + * @return array + */ public function addUniqueMessagesWhenMessagesImplementMessageInterfaceDataProvider() { return [ @@ -371,6 +377,9 @@ public function testAddUniqueMessages($messages) $this->model->addUniqueMessages($messages); } + /** + * @return array + */ public function addUniqueMessagesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php index 966c8f9590cd7..8cd2646815551 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php @@ -163,6 +163,9 @@ public function testGetMainTable($tableName, $expectedResult) $this->assertEquals($expectedResult, $this->_model->getMainTable()); } + /** + * @return array + */ public function getTableDataProvider() { return [ @@ -217,6 +220,9 @@ public function testGetChecksum($checksum, $expected) $this->assertEquals($expected, $this->_model->getChecksum($checksum)); } + /** + * @return array + */ public function getChecksumProvider() { return [ @@ -399,6 +405,9 @@ public function testGetDataChanged($getOriginData, $expected) $this->assertEquals($expected, $this->_model->hasDataChanged($abstractModelMock)); } + /** + * @return array + */ public function hasDataChangedDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php index bfd9b5a63d21b..147cac47d3829 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php @@ -95,6 +95,9 @@ protected function tearDown() \Magento\Framework\App\ObjectManager::setInstance($objectManagerMock); } + /** + * @return object + */ protected function getUut() { return $this->objectManagerHelper->getObject( @@ -220,6 +223,9 @@ public function testGetSelect($idFieldNameRet, $getPartRet, $expected) $this->assertTrue($this->uut->getSelect() instanceof Select); } + /** + * @return array + */ public function getSelectDataProvider() { $columnMock = $this->createPartialMock(\Zend_Db_Expr::class, ['__toString']); @@ -246,6 +252,9 @@ public function testAddFieldToSelect($field, $alias, $expectedFieldsToSelect) $this->assertTrue($this->uut->wereFieldsToSelectChanged()); } + /** + * @return array + */ public function addFieldToSelectDataProvider() { return [ @@ -265,6 +274,9 @@ public function testAddExpressionFieldToSelect($alias, $expression, $fields, $ex $this->assertTrue($this->uut->addExpressionFieldToSelect($alias, $expression, $fields) instanceof Uut); } + /** + * @return array + */ public function addExpressionFieldToSelectDataProvider() { return [ @@ -289,6 +301,9 @@ public function testRemoveFieldFromSelect( $this->assertEquals($expectedWereFieldsToSelectChanged, $this->uut->wereFieldsToSelectChanged()); } + /** + * @return array + */ public function removeFieldFromSelectDataProvider() { return [ @@ -376,6 +391,9 @@ public function testJoin($table, $cond, $cols, $expected) $this->assertEquals($expected, $this->uut->getJoinedTables()); } + /** + * @return array + */ public function joinDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php index e55dbb3c9c3da..b224dccc83d03 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php @@ -13,26 +13,41 @@ */ class Uut extends AbstractCollection { + /** + * @return bool + */ public function wereFieldsToSelectChanged() { return $this->_fieldsToSelectChanged; } + /** + * @return array|null + */ public function getFieldsToSelect() { return $this->_fieldsToSelect; } + /** + * @param array $fields + */ public function setFieldsToSelect(array $fields) { $this->_fieldsToSelect = $fields; } + /** + * @param $resource + */ public function setResource($resource) { $this->_resource = $resource; } + /** + * @return array + */ public function getJoinedTables() { return $this->_joinedTables; diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php index ec9b41ff1b957..930b1a21cfd26 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php @@ -42,6 +42,9 @@ public function testConvertWithInvalidDom($xmlString) } } + /** + * @return array + */ public function convertWithInvalidDomDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php index f7a20252826ae..eb849fc457ddb 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php @@ -54,6 +54,9 @@ public function testGetModuleName($path, $expectedResult) $this->assertSame($expectedResult, $this->_model->getModuleName($path)); } + /** + * @return array + */ public function getModuleNameDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php index 44185b52b19a4..12ddfea8c83d1 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php @@ -83,6 +83,9 @@ public function testIsOutputEnabledGenericConfigPath($configValue, $expectedResu $this->assertEquals($expectedResult, $this->_model->isOutputEnabled('Module_One')); } + /** + * @return array + */ public function isOutputEnabledGenericConfigPathDataProvider() { return ['output disabled' => [true, false], 'output enabled' => [false, true]]; @@ -103,6 +106,9 @@ public function testIsOutputEnabledCustomConfigPath($configValue, $expectedResul $this->assertEquals($expectedResult, $this->_model->isOutputEnabled('Module_Two')); } + /** + * @return array + */ public function isOutputEnabledCustomConfigPathDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php index c91b56560eb75..a7742700acc83 100644 --- a/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php +++ b/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php @@ -259,6 +259,10 @@ protected function mockGetTableName() $this->resourceMock->expects($this->once())->method('getTableName')->will($this->returnArgument(0)); } + /** + * @param $changelogTableName + * @param $result + */ protected function mockIsTableExists($changelogTableName, $result) { $this->connectionMock->expects( diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php index 3fd8ea93c9bbe..3f806b319ef48 100644 --- a/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php +++ b/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php @@ -464,6 +464,9 @@ public function testResumeNotSuspended($status) $this->model->resume(); } + /** + * @return array + */ public function dataProviderResumeNotSuspended() { return [ @@ -520,6 +523,9 @@ public function testIsEnabled($mode, $result) $this->assertEquals($result, $this->model->isEnabled()); } + /** + * @return array + */ public function dataProviderIsEnabled() { return [ @@ -541,6 +547,9 @@ public function testIsIdle($status, $result) $this->assertEquals($result, $this->model->isIdle()); } + /** + * @return array + */ public function dataProviderIsIdle() { return [ @@ -563,6 +572,9 @@ public function testIsWorking($status, $result) $this->assertEquals($result, $this->model->isWorking()); } + /** + * @return array + */ public function dataProviderIsWorking() { return [ @@ -585,6 +597,9 @@ public function testIsSuspended($status, $result) $this->assertEquals($result, $this->model->isSuspended()); } + /** + * @return array + */ public function dataProviderIsSuspended() { return [ @@ -617,6 +632,9 @@ protected function loadView() $this->model->load($viewId); } + /** + * @return array + */ protected function getViewData() { return [ diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php index 1bba19cb16a5a..27ecdff1dcb82 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php @@ -13,21 +13,33 @@ */ class RepositoryTest extends EntityChildTestAbstract { + /** + * @return mixed|string + */ protected function getSourceClassName() { return '\\' . \Magento\Framework\ObjectManager\Code\Generator\Sample::class; } + /** + * @return mixed|string + */ protected function getResultClassName() { return '\\' . \Magento\Framework\ObjectManager\Code\Generator\Sample\Repository::class; } + /** + * @return mixed|string + */ protected function getGeneratorClassName() { return '\\' . \Magento\Framework\ObjectManager\Code\Generator\Repository::class; } + /** + * @return mixed|string + */ protected function getOutputFileName() { return 'SampleConverter.php'; diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php index 0bc899f580071..58e334f0022a7 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php @@ -7,11 +7,31 @@ interface SampleRepositoryInterface { + /** + * @param SampleInterface $entity + * + * @return mixed + */ public function save(\Magento\Framework\ObjectManager\Code\Generator\SampleInterface $entity); + /** + * @param $id + * + * @return mixed + */ public function get($id); + /** + * @param $id + * + * @return mixed + */ public function deleteById($id); + /** + * @param SampleInterface $entity + * + * @return mixed + */ public function delete(\Magento\Framework\ObjectManager\Code\Generator\SampleInterface $entity); } diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php index 99ab4ecadcd41..b916ab18e2e70 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php @@ -7,10 +7,25 @@ interface TSampleRepositoryInterface { + /** + * @param int $id + * + * @return TSampleInterface + */ public function get(int $id) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface; + /** + * @param TSampleInterface $entity + * + * @return bool + */ public function delete(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) : bool; + /** + * @param TSampleInterface $entity + * + * @return TSampleInterface + */ public function save(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface; } diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php index 6be8d7ffde874..e885c07b7c298 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php @@ -32,6 +32,9 @@ public function validate($schemaFile, $errors) return true; } + /** + * @return string + */ public function getDom() { return 'reader dom result'; diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php index 1c88ab65021c4..0beeeb5e69738 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php @@ -30,6 +30,9 @@ public function testGetParents($type, $parents) $this->assertEquals($parents, $this->model->getParents($type)); } + /** + * @return array + */ public function getParentsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php index 3c494b6abbb94..bee2a7eb6ad98 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php @@ -17,6 +17,15 @@ class AggregateParent implements \Magento\Test\Di\Aggregate\AggregateInterface public $optionalScalar; + /** + * AggregateParent constructor. + * + * @param \Magento\Test\Di\DiInterface $interface + * @param \Magento\Test\Di\DiParent $parent + * @param \Magento\Test\Di\Child $child + * @param $scalar + * @param int $optionalScalar + */ public function __construct( \Magento\Test\Di\DiInterface $interface, \Magento\Test\Di\DiParent $parent, diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php index b84375e3b5436..3577141ef0284 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php @@ -11,6 +11,17 @@ class Child extends \Magento\Test\Di\Aggregate\AggregateParent public $secondOptionalScalar; + /** + * Child constructor. + * + * @param \Magento\Test\Di\DiInterface $interface + * @param \Magento\Test\Di\DiParent $parent + * @param \Magento\Test\Di\Child $child + * @param $scalar + * @param $secondScalar + * @param int $optionalScalar + * @param string $secondOptionalScalar + */ public function __construct( \Magento\Test\Di\DiInterface $interface, \Magento\Test\Di\DiParent $parent, diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php index 1c5ac56e2735c..a68eb2c0fc64f 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php @@ -11,6 +11,12 @@ class WithOptional public $child; + /** + * WithOptional constructor. + * + * @param \Magento\Test\Di\DiParent|null $parent + * @param \Magento\Test\Di\Child|null $child + */ public function __construct(\Magento\Test\Di\DiParent $parent = null, \Magento\Test\Di\Child $child = null) { $this->parent = $parent; diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php index 9c23b38182f91..edcc4a7e56717 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php @@ -79,6 +79,9 @@ public function testGetItems($adjustments, $expectedResult) $this->assertEmpty(array_diff($expectedResult, array_keys($result))); } + /** + * @return array + */ public function getItemsDataProvider() { return [ @@ -104,6 +107,9 @@ public function testGetItemByCode($adjustments, $code, $expectedResult) $this->assertEquals($expectedResult, $item->getAdjustmentCode()); } + /** + * @return array + */ public function getItemByCodeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php index 6fca39b2082fb..adf9ffae16390 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php @@ -65,6 +65,9 @@ public function testGetAdjustmentByCode($code, $expectedResult) $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function getAdjustmentByCodeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php index 2abf26601fbea..42af3268e559b 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php @@ -50,6 +50,9 @@ public function testCurrency($amount, $format, $includeContainer, $result) $this->assertEquals($result, $helper->currency($amount, $format, $includeContainer)); } + /** + * @return array + */ public function currencyDataProvider() { return [ @@ -84,6 +87,9 @@ public function testCurrencyByStore($amount, $store, $format, $includeContainer, $this->assertEquals($result, $helper->currencyByStore($amount, $store, $format, $includeContainer)); } + /** + * @return array + */ public function currencyByStoreDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php index 5d1ab67e09587..ebe2fb453ca83 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php @@ -80,6 +80,9 @@ protected function setUp() $this->factory = new Factory($this->types, $this->objectManagerMock); } + /** + * @return array + */ public function createPriceInfoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php index 009fb8236c4dc..70eef212c6878 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php @@ -277,6 +277,13 @@ public function testAdjustmentsHtml() $this->assertEquals($adjustmentHtml1 . $adjustmentHtml2, $this->model->getAdjustmentsHtml()); } + /** + * @param array $data + * @param string $html + * @param string $code + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getAdjustmentRenderMock($data = [], $html = '', $code = 'adjustment_code') { $adjustmentRender = $this->getMockForAbstractClass( diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php index 905569936d036..f4588f7d25672 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php @@ -122,6 +122,9 @@ public function testToHtml($data, $priceCode, $cssClasses) $this->assertEquals($cssClasses, $priceBox->getData('css_classes')); } + /** + * @return array + */ public function toHtmlDataProvider() { return [ @@ -225,6 +228,9 @@ public function testGetPriceId($prefix, $suffix, $defaultPrefix, $defaultSuffix) $this->assertEquals($expectedPriceId, $this->model->getPriceId($defaultPrefix, $defaultSuffix)); } + /** + * @return array + */ public function getPriceIdProvider() { return [ diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php index ed26efb5bff64..1977ed3f46456 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php @@ -86,6 +86,9 @@ public function testBuildOutputDataArray($extensionAttributes, $expectedOutputDa $this->assertEquals($expectedOutputDataArray, $outputData); } + /** + * @return array + */ public function buildOutputDataArrayDataProvider() { $expectedOutputDataArray = [ diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php index 130c285bd3b08..6aebd99deabb0 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php @@ -154,6 +154,9 @@ public function testBuildOutputDataArrayWithPermission($isPermissionAllowed, $ex ); } + /** + * @return array + */ public function buildOutputDataArrayWithPermissionProvider() { return [ diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php index 4e40fe6860586..8cc173d6dee2d 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php @@ -9,31 +9,51 @@ class TestDataObject implements TestDataInterface { private $extensionAttributes; + /** + * TestDataObject constructor. + * + * @param null $extensionAttributes + */ public function __construct($extensionAttributes = null) { $this->extensionAttributes = $extensionAttributes; } + /** + * @return string + */ public function getId() { return '1'; } + /** + * @return string + */ public function getAddress() { return 'someAddress'; } + /** + * @return string + */ public function isDefaultShipping() { return 'true'; } + /** + * @return string + */ public function isRequiredBilling() { return 'false'; } + /** + * @return \Magento\Framework\Api\ExtensionAttributesInterface|null + */ public function getExtensionAttributes() { return $this->extensionAttributes; diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php index 75a31ddcad6fe..999bca8ad3fc4 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php @@ -220,6 +220,9 @@ public function testProcessSimpleTypeException($value, $type) $this->typeProcessor->processSimpleAndAnyType($value, $type); } + /** + * @return array + */ public static function processSimpleTypeExceptionProvider() { return [ diff --git a/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php b/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php index c5e18423eab07..2a3e46b8887a6 100644 --- a/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php +++ b/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php @@ -852,6 +852,9 @@ public function testGetFilterException() $this->assertEquals($this->queryBool, $mapper->getRootQuery()); } + /** + * @return array + */ public function getQueryMatchProvider() { return [ @@ -879,6 +882,9 @@ public function getQueryMatchProvider() ]; } + /** + * @return array + */ public function getQueryFilterQueryReferenceProvider() { return [ @@ -926,6 +932,9 @@ public function getQueryFilterQueryReferenceProvider() ]; } + /** + * @return array + */ public function getQueryBoolProvider() { return [ diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php index 8cad058f88466..e93164537f927 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php @@ -30,6 +30,9 @@ public function testSerialize($value, $expected) $this->assertEquals($expected, $this->base64json->serialize($value)); } + /** + * @return array + */ public function serializeDataProvider() { $dataObject = new \Magento\Framework\DataObject(['something']); @@ -55,6 +58,9 @@ public function testUnserialize($value, $expected) $this->assertEquals($expected, $this->base64json->unserialize($value)); } + /** + * @return array + */ public function unserializeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php index d1fddbbdf2778..235567103edf7 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php @@ -34,6 +34,9 @@ public function testSerialize($value, $expected) ); } + /** + * @return array + */ public function serializeDataProvider() { $dataObject = new DataObject(['something']); @@ -62,6 +65,9 @@ public function testUnserialize($value, $expected) ); } + /** + * @return array + */ public function unserializeDataProvider() { return [ @@ -95,6 +101,9 @@ public function testUnserializeException($value) $this->json->unserialize($value); } + /** + * @return array + */ public function unserializeExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php index e74de735c1c1e..1f8e7cf9d0bc3 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php @@ -33,6 +33,9 @@ public function testSerialize($value, $serializedValue) $this->assertEquals($serializedValue, $this->serialize->serialize($value)); } + /** + * @return array + */ public function serializeDataProvider() { return [ @@ -56,6 +59,9 @@ public function testUnserialize($serializedValue, $value) $this->assertEquals($value, $this->serialize->unserialize($serializedValue)); } + /** + * @return array + */ public function unserializeDataProvider() { return [ @@ -88,6 +94,9 @@ public function testUnserializeException($value) $this->serialize->unserialize($value); } + /** + * @return array + */ public function unserializeExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php index 12e28cdb3970d..3df8f182fe37e 100644 --- a/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php @@ -82,6 +82,9 @@ public function testSetOptions($option, $getter, $value) $this->assertSame($value, $this->config->{$getter}()); } + /** + * @return array + */ public function optionsProvider() { return [ @@ -343,6 +346,9 @@ public function testConstructor($isValidSame, $isValid, $expected) $this->assertEquals($expected, $this->config->getOptions()); } + /** + * @return array + */ public function constructorDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php index 18050da435c32..4594a471e008d 100644 --- a/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php +++ b/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php @@ -70,6 +70,9 @@ public function testLog($logLevel, $method) $this->logger->log($message, $logLevel); } + /** + * @return array + */ public function logDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php b/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php index 213e2afa2c655..01964bdced655 100644 --- a/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php +++ b/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php @@ -24,6 +24,9 @@ public function testRender($expectedCommand, $actualCommand, $testArguments) ); } + /** + * @return array + */ public function commandsDataProvider() { $testArgument = 'argument'; diff --git a/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php b/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php index 2455b8f3cb500..ea2149e6f9e34 100644 --- a/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php +++ b/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php @@ -108,6 +108,9 @@ public function testSetAttribute($name, $value) $this->assertEquals($xml->getAttribute($name), $value); } + /** + * @return array + */ public function setAttributeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php index 26dcbc81262a2..64eb1e9c4bf39 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php @@ -38,6 +38,9 @@ public function testToBoolean($input, $expected) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function toBooleanDataProvider() { return [ @@ -64,6 +67,9 @@ public function testToBooleanException($input) $this->object->toBoolean($input); } + /** + * @return array + */ public function toBooleanExceptionDataProvider() { return [ 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 f6f6a19c170c8..29e54157ebb22 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php @@ -274,6 +274,9 @@ public function testSetSensitiveCookieNoMetadata($cookieName, $secure) $this->assertTrue(self::$isSetCookieInvoked); } + /** + * @return array + */ public function isCurrentlySecureDataProvider() { return [ @@ -898,6 +901,11 @@ private static function assertZeroDuration( self::assertEquals('', $path); } + /** + * @param $get + * @param $default + * @param $return + */ protected function stubGetCookie($get, $default, $return) { $this->readerMock->expects($this->atLeastOnce()) diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php index 9015968cee85c..d409a89c2cc91 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php @@ -59,6 +59,9 @@ public function testConstructorAndGetHttpOnly($metadata, $httpOnly) $this->assertEquals('path', $object->getPath()); } + /** + * @return array + */ public function constructorAndGetHttpOnlyTestDataProvider() { return [ @@ -104,6 +107,9 @@ public function testGetSecure($isSecure, $metadata, $expected, $callNum = 1) $this->assertEquals($expected, $object->getSecure()); } + /** + * @return array + */ public function getSecureDataProvider() { return [ @@ -160,6 +166,9 @@ public function testToArray($isSecure, $metadata, $expected, $callNum = 1) $this->assertEquals($expected, $object->__toArray()); } + /** + * @return array + */ public function toArrayDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php b/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php index 68be50810d44f..d4a19428c61a0 100644 --- a/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php @@ -64,6 +64,9 @@ public function testIsArchive($file, $isArchive) $this->assertEquals($isArchive, $this->archive->isArchive($file)); } + /** + * @return array + */ public function isArchiveProvider() { return [ @@ -98,6 +101,9 @@ public function testIsTar($file, $isArchive) $this->assertEquals($isArchive, $this->archive->isTar($file)); } + /** + * @return array + */ public function isTarProvider() { return [ @@ -143,6 +149,9 @@ public function testPackUnpackGzBz($destinationFile, $extensionRequired) $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } + /** + * @return array + */ public function destinationProvider() { return [ @@ -200,6 +209,9 @@ public function testExtract($destinationFile, $extensionRequired) $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } + /** + * @return array + */ public function tarProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php b/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php index 0fc537fbe832a..b57cb7ac8f0b2 100644 --- a/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php @@ -45,6 +45,9 @@ public function testGetElementHtml($value) } } + /** + * @return array + */ public function getElementHtmlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php b/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php index d937dc10e4d4c..67a689b714e24 100644 --- a/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php @@ -380,6 +380,9 @@ public function testUnderscore($input, $expectedOutput) $this->assertEquals($expectedOutput, $output); } + /** + * @return array + */ public function underscoreDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php index c728fdecfeaab..ec05478b90db9 100644 --- a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php @@ -103,6 +103,9 @@ public function testEscapeJs($data, $expected) $this->assertEquals($expected, $this->escaper->escapeJs($data)); } + /** + * @return array + */ public function escapeJsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php b/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php index 955f16d4241c2..ea6ddf56414ff 100644 --- a/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php @@ -112,6 +112,9 @@ public function testDeleteFlag($isFlagExist) ); } + /** + * @param $flagCode + */ private function setupFlagObject($flagCode) { $this->flagFactoryMock->expects($this->once()) diff --git a/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php b/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php index d5243cacb1616..805bd8fe4510a 100644 --- a/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php @@ -33,6 +33,9 @@ public function testCreate($mainMessage, $subMessages, $separator, $expectedResu $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function dataProvider() { $subMessage1 = new Error('go jogging'); diff --git a/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php b/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php index 1516f65479771..c41918e051452 100644 --- a/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php @@ -119,6 +119,9 @@ public function testBeforeDispatchOutOfDateWithErrors(array $errors, string $exp $this->plugin->beforeDispatch($this->frontControllerMock, $this->requestMock); } + /** + * @return array + */ public static function beforeDispatchOutOfDateWithErrorsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/ShellTest.php b/lib/internal/Magento/Framework/Test/Unit/ShellTest.php index 913fd883eaad2..9f223f916b97a 100644 --- a/lib/internal/Magento/Framework/Test/Unit/ShellTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/ShellTest.php @@ -83,6 +83,9 @@ public function testExecuteLog($command, $commandArgs, $expectedResult, $expecte ); } + /** + * @return array + */ public function executeDataProvider() { // backtick symbol (`) has to be replaced with environment-dependent quote character diff --git a/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php b/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php index cca8d564d3199..5c634a1bca078 100644 --- a/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/TranslateTest.php @@ -139,6 +139,9 @@ public function testLoadDataCachedTranslation($area, $forceReload, $cachedData) $this->assertEquals($cachedData, $this->translate->getData()); } + /** + * @return array + */ public function dataProviderLoadDataCachedTranslation() { $cachedData = ['cached 1' => 'translated 1', 'cached 2' => 'translated 2']; @@ -236,6 +239,9 @@ public function testLoadData($area, $forceReload) $this->assertEquals($expected, $this->translate->getData()); } + /** + * @return array + */ public function dataProviderForTestLoadData() { return [ @@ -263,6 +269,9 @@ public function testGetData($data, $result) $this->assertEquals($result, $this->translate->getData()); } + /** + * @return array + */ public function dataProviderForTestGetData() { $data = ['original 1' => 'translated 1', 'original 2' => 'translated 2']; diff --git a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php index 5c5df5b462b70..3713978d0f74e 100644 --- a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php @@ -163,6 +163,9 @@ public function testGetCurrentUrl($httpHost, $url) $this->assertEquals($url, $model->getCurrentUrl()); } + /** + * @return array + */ public function getCurrentUrlProvider() { return [ @@ -337,6 +340,9 @@ public function testGetUrlRouteUseRewrite() $this->assertEquals('/catalog/product/view/', $model->getUrl('catalog', ['_use_rewrite' => 1])); } + /** + * @return array + */ public function getUrlDataProvider() { return [ @@ -497,6 +503,9 @@ public function testGetRedirectUrlWithSessionId() $this->assertEquals('http://example.com/?foo=bar', $model->getRedirectUrl('http://example.com/')); } + /** + * @return array + */ public function getRebuiltUrlDataProvider() { return [ @@ -558,6 +567,9 @@ public function testIsOwnOriginUrl($result, $referrer) $this->assertEquals($result, $model->isOwnOriginUrl()); } + /** + * @return array + */ public function isOwnOriginUrlDataProvider() { return [ @@ -607,6 +619,9 @@ public function testGetConfigData($urlType, $configPath, $isSecure, $isSecureCal $this->assertEquals('http://localhost/', $model->getConfigData($key)); } + /** + * @return array + */ public function getConfigDataDataProvider() { return [ @@ -712,6 +727,9 @@ public function testSessionUrlVarWithoutMatchedHostsAndBaseUrl() ); } + /** + * @return array + */ public function sessionUrlVarWithMatchedHostsAndBaseUrlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php b/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php index 6e222ba90da8e..b1ef51f010c5b 100644 --- a/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php +++ b/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php @@ -74,6 +74,9 @@ public function testIsAllowed($isEnabled, $isActive, $isDevAllowed, $result) $this->assertEquals($result, $model->isAllowed()); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ @@ -126,6 +129,9 @@ public function testProcessResponseBodyStripInline($body, $expected) $this->assertEquals($body, $expected); } + /** + * @return array + */ public function processResponseBodyStripInlineDataProvider() { return [ @@ -192,6 +198,9 @@ public function testProcessResponseBody($scope, $body, $expected) $this->assertEquals($body, $expected); } + /** + * @return array + */ public function processResponseBodyDataProvider() { return [ @@ -254,6 +263,9 @@ public function testProcessResponseBodyGetInlineScript($scope, $body, $expected) $this->assertEquals($body, $expected); } + /** + * @return array + */ public function processResponseBodyGetInlineScriptDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php b/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php index 4888077104728..f053a9afff74d 100644 --- a/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php +++ b/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php @@ -55,6 +55,9 @@ public function testUnserializeObject($serialized) $this->assertFalse($this->unserialize->unserialize($serialized)); } + /** + * @return array + */ public function unserializeObjectDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php b/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php index 5bb4f54b84a5c..016208d0920aa 100644 --- a/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php +++ b/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php @@ -79,6 +79,9 @@ public function testGetEncodedUrl($url, $callNum) $this->assertEquals($encodedUrl, $helper->getEncodedUrl($url)); } + /** + * @return array + */ public function getEncodedUrlDataProvider() { return [ @@ -98,6 +101,9 @@ public function testAddRequestParam($param, $expected) $this->assertEquals($expected, $helper->addRequestParam('http://example.com', $param)); } + /** + * @return array + */ public function addRequestParamDataProvider() { return [ @@ -145,6 +151,9 @@ public function testRemoveRequestParam($paramKey, $expected) $this->assertEquals($expected, $helper->removeRequestParam($url, $paramKey)); } + /** + * @return array + */ public function removeRequestParamDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php b/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php index fbda5e36c9934..3fc332aa1af52 100644 --- a/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php +++ b/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php @@ -32,6 +32,9 @@ public function testIsSecureChecksIfUrlIsInSecureList($url, $expected) $this->assertEquals($expected, $this->_model->isSecure($url)); } + /** + * @return array + */ public function secureUrlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php b/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php index a06297a382f57..0fd70b5bc5f1d 100644 --- a/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php +++ b/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php @@ -92,6 +92,9 @@ public function testIsValid(array $inputEntityData, array $expectedErrors) } } + /** + * @return array + */ public function validateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php index 68b5f4bf3a20d..2d6ea2efe4958 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php @@ -53,6 +53,9 @@ public function testGetConfigPath( $this->assertEquals($expectedResult, $this->fallbackContext->getConfigPath()); } + /** + * @return array + */ public function getConfigPathDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php index b2953bc24e131..64d0419e070d0 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php @@ -134,6 +134,9 @@ public function testGetContent($content) $this->assertEquals($content, $this->object->getContent()); // no in-memory caching for content } + /** + * @return array + */ public function getContentDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php index c4b7cefcfa7c2..4c17a2c0b35f4 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php @@ -118,6 +118,9 @@ public function testGetMergedAssets(array $assets, $contentType, $appMode, $merg $this->assertSame($mergedAsset, $this->object->getMergedAssets($assets, $contentType)); } + /** + * @return array + */ public static function getMergedAssetsDataProvider() { $jsAssets = [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php b/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php index 923ec2ff322b5..7e672d58d18e0 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php @@ -234,6 +234,9 @@ public function testGetAcceptType($headerAccept, $acceptType) $this->assertEquals($acceptType, $this->context->getAcceptType()); } + /** + * @return array + */ public function getAcceptTypeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php b/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php index 52e055f11b8a2..fbb521d2c21b8 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php @@ -47,6 +47,11 @@ public function testAddWithException() $this->dataSourcePool->add('DataSourcePoolTestBlock', 'NotExistingBlockClass'); } + /** + * @param $blockClass + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function createBlock($blockClass) { $block = $this->createMock(\Magento\Framework\View\Element\BlockInterface::class); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php index 692dcb54d1447..b911a38dbb488 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php @@ -35,6 +35,9 @@ public function testGetLinkAttributes($link, $expected) $this->assertEquals($expected, $link->getLinkAttributes()); } + /** + * @return array + */ public function getLinkAttributesDataProvider() { $objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php index 10e21763ba802..fefbdf0ed5111 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php @@ -83,6 +83,9 @@ public function testGetDomain($domain, $isIp, $expectedResult) $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public static function domainDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php index b2b1db44d6a0b..6ac8355fe7371 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php @@ -51,6 +51,9 @@ public function testToHtml($liParams, $innerText, $expectedHtml) $this->assertEquals($expectedHtml, $this->item->toHtml()); } + /** + * @return array + */ public function toHtmlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php index 785c41c1d6e2f..a16b1ca80c49e 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php @@ -54,6 +54,9 @@ public function testToHtml($liParams, $aParams, $innerText, $afterText, $expecte $this->assertEquals($expectedHtml, $this->link->toHtml()); } + /** + * @return array + */ public function toHtmlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php index ffe3d3a173e47..a76dca703fedb 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php @@ -54,6 +54,9 @@ public function testGetFiles(array $fixtureFiles, array $expectedFiles, $message $this->assertSame($expectedFiles, $this->_model->getFiles($theme, '*.xml'), $message); } + /** + * @return array + */ public function getFilesDataProvider() { $fileOne = new \Magento\Framework\View\File('b.xml', 'Fixture_ModuleB'); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php index 458b23a4b15eb..3d9166fc87f00 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php @@ -53,6 +53,11 @@ public function testEvaluate() $this->assertSame($expected, $actual); } + /** + * @param $input + * + * @return string + */ public function help($input) { $this->assertSame('some text (evaluated)', $input); @@ -73,6 +78,9 @@ public function testEvaluateException($helperMethod, $expectedExceptionMessage) $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateExceptionDataProvider() { $nonExistingHelper = __CLASS__ . '::non_existing'; diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php index 5ae0b0332f28a..c4fff297b4ec1 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php @@ -67,6 +67,9 @@ public function testEvaluateWrongParam($input, $expectedExceptionMessage) $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateWrongParamDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php index d3e91cb7c2b7e..24fd9f98d7112 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php @@ -72,6 +72,9 @@ public function testEvaluateWrongModel($input, $expectedException, $expectedExce $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateWrongModelDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php index 45754d0618d05..427e15d901d6d 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php @@ -65,6 +65,9 @@ public function testCreate($type, $arguments, $layoutBuilderClass) $this->buildFactory->create($type, $arguments); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php index ab5c908cb16af..a663b65561345 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php @@ -20,6 +20,9 @@ public function testGetElementName($xml, $name) $this->assertEquals($name, $model->getElementName()); } + /** + * @return array + */ public function elementNameDataProvider() { return [ @@ -31,6 +34,9 @@ public function elementNameDataProvider() ]; } + /** + * @return array + */ public function cacheableDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php index 1568c381226e2..158718587ad60 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php @@ -158,6 +158,9 @@ public function testInterpret($element) $this->model->interpret($this->context, $element); } + /** + * @return array + */ public function interpretDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/Generator/HeadTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/Generator/HeadTest.php index 4b000f09663b8..30dead438951a 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/Generator/HeadTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/Generator/HeadTest.php @@ -140,6 +140,9 @@ public function testProcess($assets) $this->assertEquals($this->headGenerator, $result); } + /** + * @return array + */ public function testProcessAssetDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php index 400e9cf3d1ed7..935154a75026e 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php @@ -287,6 +287,9 @@ public function testAddPageAsset($file, $properties, $name, $expectedName) ); } + /** + * @return array + */ public function pageAssetDataProvider() { return [ @@ -326,6 +329,9 @@ public function testAddRemotePageAsset($url, $contentType, $properties, $name, $ ); } + /** + * @return array + */ public function remotePageAssetDataProvider() { return [ @@ -382,6 +388,9 @@ public function testElementAttribute($elementType, $attribute, $value) $this->assertEquals($value, $this->model->getElementAttribute($elementType, $attribute)); } + /** + * @return array + */ public function elementAttributeDataProvider() { return [ @@ -419,6 +428,9 @@ public function testElementAttributeException($elementType, $attribute, $value) $this->model->setElementAttribute($elementType, $attribute, $value); } + /** + * @return array + */ public function elementAttributeExceptionDataProvider() { return [ @@ -454,6 +466,9 @@ public function testElementAttributes($elementType, $attributes) $this->assertEquals($attributes, $this->model->getElementAttributes($elementType)); } + /** + * @return array + */ public function elementAttributesDataProvider() { return [ @@ -478,6 +493,9 @@ public function testPageLayout($handle) $this->assertEquals($handle, $this->model->getPageLayout()); } + /** + * @return array + */ public function pageLayoutDataProvider() { return [ @@ -538,6 +556,9 @@ public function testGetIncludes($isAvailable, $result) $this->assertEquals($result, $model->getIncludes()); } + /** + * @return array + */ public function getIncludesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php index d30df5d76b75b..1fc6e92f87aa8 100644 --- a/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php @@ -38,6 +38,9 @@ public function testGetRequestedServicesSuccess($requestParamServices, $expected $this->assertEquals($expectedResult, $this->request->getRequestedServices()); } + /** + * @return array + */ public function providerTestGetRequestedServicesSuccess() { $testModuleA = 'testModule1AllSoapAndRestV1'; diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php index fe85e59221847..fd470f9d0c9c8 100644 --- a/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php @@ -533,6 +533,9 @@ public function testCustomAttributesExceptions($inputData) ); } + /** + * @return array + */ public function invalidCustomAttributesDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Console/Command/GenerateFixturesCommand.php b/setup/src/Magento/Setup/Console/Command/GenerateFixturesCommand.php index e084cd8ff6cad..03b74f637a7da 100644 --- a/setup/src/Magento/Setup/Console/Command/GenerateFixturesCommand.php +++ b/setup/src/Magento/Setup/Console/Command/GenerateFixturesCommand.php @@ -157,6 +157,10 @@ private function clearChangelog() } } + /** + * @param \Magento\Setup\Fixtures\Fixture $fixture + * @param OutputInterface $output + */ private function executeFixture(\Magento\Setup\Fixtures\Fixture $fixture, OutputInterface $output) { $output->write('<info>' . $fixture->getActionTitle() . '... </info>'); diff --git a/setup/src/Magento/Setup/Console/Style/MagentoStyle.php b/setup/src/Magento/Setup/Console/Style/MagentoStyle.php index 4dec01f9497e1..614014a233657 100755 --- a/setup/src/Magento/Setup/Console/Style/MagentoStyle.php +++ b/setup/src/Magento/Setup/Console/Style/MagentoStyle.php @@ -518,6 +518,11 @@ private function autoPrependText() } } + /** + * @param $messages + * + * @return array + */ private function reduceBuffer($messages) { // We need to know if the two last chars are PHP_EOL diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php index 9c28c2be04262..2824b043a2743 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php @@ -85,6 +85,9 @@ public function testExecute(array $outdatedInfo, $expectedMessage, $expectedCode $this->assertSame($expectedCode, $tester->getStatusCode()); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php index a5dc0d24feb7c..c3f79d92ec560 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php @@ -111,6 +111,9 @@ public function testExecute($input) $tester->execute($input); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php index 8bcee84d049b3..1ef3830636657 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php @@ -51,6 +51,9 @@ public function testExecuteInteractionNo() $this->checkInteraction(false); } + /** + * @param $answer + */ public function checkInteraction($answer) { $question = $this->createMock(\Symfony\Component\Console\Helper\QuestionHelper::class); diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php b/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php index 1407e5ed183e4..183f659c42f23 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php @@ -20,6 +20,10 @@ public function clear() $this->output = ''; } + /** + * @param string $message + * @param bool $newline + */ protected function doWrite($message, $newline) { $this->output .= $message . ($newline ? "\n" : ''); diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php index d37c07e715482..3893181d0c7f7 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php @@ -262,6 +262,9 @@ public function testValidationWithInvalidOptions($option, $invalidInput, $errorM $this->assertSame($errorMessage, $errors[0]); } + /** + * @return array + */ public function redisOptionProvider() { return [ @@ -286,6 +289,9 @@ public function redisOptionProvider() ]; } + /** + * @return array + */ public function invalidOptionsProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php index 1bb60517d5e67..f342a11493498 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php @@ -178,6 +178,9 @@ public function testValidateCacheHosts($hosts, $expectedError) } } + /** + * @return array + */ public function validateCacheHostsDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php index b3e88272d13e8..59210df4f7bcf 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php @@ -264,6 +264,9 @@ public function testExecuteWrongFormat(array $params) $this->job->execute(); } + /** + * @return array + */ public function executeWrongFormatDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php index f96882c30136a..1f8a3fea16da2 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php @@ -206,16 +206,25 @@ public function testMaintenanceModeDisable() // functions to override native php functions namespace Magento\Setup\Model\Cron; +/** + * @return string + */ function fopen() { return 'filestream'; } +/** + * @return bool + */ function is_resource() { return true; } +/** + * @return string + */ function get_resource_type() { return 'stream'; diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php index f8f1d8542c38c..4a4ff2cb81e8d 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php @@ -201,6 +201,9 @@ public function testRunReadinessCheckLastTimestamp() namespace Magento\Setup\Model\Cron; +/** + * @return int + */ function time() { return 100; diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php index e6c7b420b661d..dfa001f44bc66 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php @@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult) $this->assertEquals($expectedResult, $this->mixin->apply($subject)); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php index 48280e9c6f543..bf915fecf4701 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php @@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult) $this->assertEquals($expectedResult, $this->mixin->apply($subject)); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php index b21c687a30960..c24fa49fcac24 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php @@ -34,6 +34,9 @@ public function testRandomSelector($fixtureSource, $fixtureCount) } } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php index 58e07df7391fc..7d3cbcdd00c71 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php @@ -30,6 +30,9 @@ public function testWrapping($inputData, $expectedResult) ); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php index a522963d212ef..4fdb3090992bb 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php @@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult) $this->assertEquals($expectedResult, $this->mixin->apply($subject)); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php index 90c26b5632d21..11dca34763a05 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php @@ -39,6 +39,9 @@ public function testMap($packageType, $expected) ); } + /** + * @return array + */ public function mapDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php index 9f59479ef0f0d..9d40b053e394e 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php @@ -83,6 +83,9 @@ public function testGet() $this->assertInstanceOf(ObjectManagerInterface::class, $this->model->get()); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCommandListMock() { $commandMock = $this->getMockBuilder(Command::class)->disableOriginalConstructor()->getMock(); diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php index 192717e1d319b..2d7685c2021cc 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php @@ -38,6 +38,9 @@ public function testValidatePayLoad($type, $has, $moduleExists) $this->assertEquals('', $this->model->validatePayload($type)); } + /** + * @return array + */ public function validatePayLoadDataProvider() { return [ @@ -61,6 +64,9 @@ public function testValidatePayLoadNegativeCases($type, $has, $moduleExists, $er $this->assertStringStartsWith($errorMessage, $this->model->validatePayload($type)); } + /** + * @return array + */ public function validatePayLoadNegativeCasesDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index f543e77787f9d..13f5b6940d846 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -411,6 +411,11 @@ protected function isPhp7OrHhvm() namespace Magento\Setup\Model; +/** + * @param $param + * + * @return int|string + */ function ini_get($param) { if ($param === 'xdebug.max_nesting_level') { diff --git a/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php b/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php index b3ac6ad286e44..a55c50eeaa736 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php @@ -184,6 +184,9 @@ public function testClearNotExist() $this->webLogger->clear(); } + /** + * @return string + */ public static function readLog() { return self::$log; @@ -202,6 +205,9 @@ public static function deleteLog() self::$log = ''; } + /** + * @return bool + */ public static function isExist() { return self::$log != ''; diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php index 7d8ce3ac564b3..ebb6560f9337d 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php @@ -46,6 +46,9 @@ public function testGetConstructor($expectation, $className, $willReturn) ); } + /** + * @return array + */ public function getConstructorDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php index 68d76980e1057..dcb9a287f787b 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php @@ -25,6 +25,13 @@ class Test */ protected $_newElementFactory; + /** + * Test constructor. + * + * @param \Magento\SomeModule\Module\Factory $factory + * @param \Magento\SomeModule\Element\Factory $elementFactory + * @param \Magento\SomeModule\ElementFactory $rightElementFactory + */ public function __construct( \Magento\SomeModule\Module\Factory $factory, \Magento\SomeModule\Element\Factory $elementFactory, diff --git a/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php b/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php index 3c744bb44d32a..c698d4c344df8 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php @@ -39,6 +39,9 @@ public function testValidateOptions($options, $message) $this->_parserMock->parse($options); } + /** + * @return array + */ public function dataProviderForValidateOptions() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php index 15a55bd23b164..573c8b132ca41 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php @@ -88,6 +88,9 @@ public function testHas($table, $parentId, $rowId, $field, $expected) $this->assertSame($expected, $this->object->has($table, $parentId, $rowId, $field)); } + /** + * @return array + */ public function hasDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php index a35007189a9ca..f0a9d5316b3a6 100644 --- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php @@ -144,6 +144,9 @@ public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray) $this->assertEquals($expectedArray, $listener->createService($serviceLocator)); } + /** + * @return array + */ public function createServiceDataProvider() { return [ From 594203c52e82ac26fa86c09d5f3f9ab36ec20492 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@magento.com> Date: Tue, 19 Jun 2018 10:56:46 +0300 Subject: [PATCH 11/20] Fixed according to Backward compatible development guide --- app/code/Magento/Sales/Model/Order.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index 4693e0dd74df4..6de0fe4459fa6 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -1008,8 +1008,24 @@ public function addStatusToHistory($status, $comment = '', $isCustomerNotified = * @param string $comment * @param bool|string $status * @return OrderStatusHistoryInterface + * @deprecated + * @see addCommentToStatusHistory */ - public function addStatusHistoryComment($comment, $status = false, $isVisibleOnFront = false) + public function addStatusHistoryComment($comment, $status = false) + { + return $this->addCommentToStatusHistory($comment, $status, false); + } + + /** + * Add a comment to order status history + * Different or default status may be specified + * + * @param string $comment + * @param bool|string $status + * @param bool $isVisibleOnFront + * @return OrderStatusHistoryInterface + */ + public function addCommentToStatusHistory($comment, $status = false, $isVisibleOnFront = false) { if (false === $status) { $status = $this->getStatus(); From eb3a6d25689e9de5b30503f19a6ce9783494ce69 Mon Sep 17 00:00:00 2001 From: NamrataChangani <namratavora301@gmail.com> Date: Tue, 19 Jun 2018 17:29:03 +0530 Subject: [PATCH 12/20] Removed double occurrence of 'it' from sentences. --- lib/web/tiny_mce/classes/ControlManager.js | 2 +- lib/web/tiny_mce/classes/html/Styles.js | 2 +- lib/web/tiny_mce/tiny_mce_jquery_src.js | 2 +- lib/web/tiny_mce/tiny_mce_prototype_src.js | 2 +- lib/web/tiny_mce/tiny_mce_src.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/web/tiny_mce/classes/ControlManager.js b/lib/web/tiny_mce/classes/ControlManager.js index 51fa311525862..784042988c0ef 100644 --- a/lib/web/tiny_mce/classes/ControlManager.js +++ b/lib/web/tiny_mce/classes/ControlManager.js @@ -45,7 +45,7 @@ }, /** - * Returns a control by id or undefined it it wasn't found. + * Returns a control by id or undefined it wasn't found. * * @method get * @param {String} id Control instance name. diff --git a/lib/web/tiny_mce/classes/html/Styles.js b/lib/web/tiny_mce/classes/html/Styles.js index edf1e13a4e3bc..60c5565d72a99 100644 --- a/lib/web/tiny_mce/classes/html/Styles.js +++ b/lib/web/tiny_mce/classes/html/Styles.js @@ -79,7 +79,7 @@ tinymce.html.Styles = function(settings, schema) { function compress(prefix, suffix) { var top, right, bottom, left; - // Get values and check it it needs compressing + // Get values and check it needs compressing top = styles[prefix + '-top' + suffix]; if (!top) return; diff --git a/lib/web/tiny_mce/tiny_mce_jquery_src.js b/lib/web/tiny_mce/tiny_mce_jquery_src.js index b16d0e3ffdbb4..20c0bbd33e5bb 100644 --- a/lib/web/tiny_mce/tiny_mce_jquery_src.js +++ b/lib/web/tiny_mce/tiny_mce_jquery_src.js @@ -1731,7 +1731,7 @@ tinymce.html.Styles = function(settings, schema) { function compress(prefix, suffix) { var top, right, bottom, left; - // Get values and check it it needs compressing + // Get values and check it needs compressing top = styles[prefix + '-top' + suffix]; if (!top) return; diff --git a/lib/web/tiny_mce/tiny_mce_prototype_src.js b/lib/web/tiny_mce/tiny_mce_prototype_src.js index 1c7b76cf75c8b..62ff4b362c18a 100644 --- a/lib/web/tiny_mce/tiny_mce_prototype_src.js +++ b/lib/web/tiny_mce/tiny_mce_prototype_src.js @@ -1483,7 +1483,7 @@ tinymce.html.Styles = function(settings, schema) { function compress(prefix, suffix) { var top, right, bottom, left; - // Get values and check it it needs compressing + // Get values and check it needs compressing top = styles[prefix + '-top' + suffix]; if (!top) return; diff --git a/lib/web/tiny_mce/tiny_mce_src.js b/lib/web/tiny_mce/tiny_mce_src.js index a1ce5c5d8c32f..7deeee9de6a26 100644 --- a/lib/web/tiny_mce/tiny_mce_src.js +++ b/lib/web/tiny_mce/tiny_mce_src.js @@ -1456,7 +1456,7 @@ tinymce.html.Styles = function(settings, schema) { function compress(prefix, suffix) { var top, right, bottom, left; - // Get values and check it it needs compressing + // Get values and check it needs compressing top = styles[prefix + '-top' + suffix]; if (!top) return; From 139c0e14a500c596196f8be1a06012c294be11db Mon Sep 17 00:00:00 2001 From: NamrataChangani <namratavora301@gmail.com> Date: Tue, 19 Jun 2018 17:33:49 +0530 Subject: [PATCH 13/20] Correct grammer mistakes in sentences. --- lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js | 4 ++-- setup/src/Magento/Setup/Fixtures/OrdersFixture.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js b/lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js index 31bcb419fb178..2d369e61810f3 100644 --- a/lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js +++ b/lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js @@ -20,14 +20,14 @@ * 1. localStorage - A new feature of HTML 5, localStorage can store megabytes of data per domain * on the client computer. Data stored in the localStorage area has no expiration date, so we must * manage expiring the data ourselves. localStorage is fully supported by IE8, and it is supposed - * to be working in Firefox 3 and Safari 3.2, but in reality is is flaky in those browsers. As + * to be working in Firefox 3 and Safari 3.2, but in reality it is flaky in those browsers. As * HTML 5 gets wider support, the AutoSave plugin will use it automatically. In Windows Vista/7, * localStorage is stored in the following folder: * C:\Users\[username]\AppData\Local\Microsoft\Internet Explorer\DOMStore\[tempFolder] * * 2. sessionStorage - A new feature of HTML 5, sessionStorage works similarly to localStorage, * except it is designed to expire after a certain amount of time. Because the specification - * around expiration date/time is very loosely-described, it is preferrable to use locaStorage and + * around expiration date/time is very loosely-described, it is preferable to use locaStorage and * manage the expiration ourselves. sessionStorage has similar storage characteristics to * localStorage, although it seems to have better support by Firefox 3 at the moment. (That will * certainly change as Firefox continues getting better at HTML 5 adoption.) diff --git a/setup/src/Magento/Setup/Fixtures/OrdersFixture.php b/setup/src/Magento/Setup/Fixtures/OrdersFixture.php index 1acad6dbc1787..9fbec3b3741b2 100644 --- a/setup/src/Magento/Setup/Fixtures/OrdersFixture.php +++ b/setup/src/Magento/Setup/Fixtures/OrdersFixture.php @@ -14,7 +14,7 @@ * Optionally generates inactive quotes for generated orders. * * Support the following format: - * <!-- Is is nescessary to enable quotes for orders --> + * <!-- It is necessary to enable quotes for orders --> * <order_quotes_enable>{bool}</order_quotes_enable> * * <!-- Min number of simple products per each order --> From 2c28ddca8c8fffd62512a371265e79aa5071efc7 Mon Sep 17 00:00:00 2001 From: NamrataChangani <namratavora301@gmail.com> Date: Tue, 19 Jun 2018 17:41:37 +0530 Subject: [PATCH 14/20] Fixed wrong input string into csv of Magento_Paypal module for en_US locale. --- app/code/Magento/Paypal/i18n/en_US.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv index 797edbf8bfa1e..2a1a6bbb48ef2 100644 --- a/app/code/Magento/Paypal/i18n/en_US.csv +++ b/app/code/Magento/Paypal/i18n/en_US.csv @@ -2,7 +2,7 @@ <a href=""https:/financing.paypal.com/ppfinportal/content/whyUseFinancing"" target=""_blank"">Why Advertise Financing?</a><br/> <strong>Give your sales a boost when you advertise financing.</strong><br/>PayPal helps turn browsers into buyers with financing from PayPal Credit®. Your customers have more time to pay, while you get paid up front – at no additional cost to you. - Use PayPal’ s free banner ads that let you advertise PayPal Credit® financing as a payment option when your customers check out with PayPal. + Use PayPal’s free banner ads that let you advertise PayPal Credit® financing as a payment option when your customers check out with PayPal. The PayPal Advertising Program has been shown to generate additional purchases as well as increase consumer's average purchase sizes by 15% or more. <a href=""https:/financing.paypal.com/ppfinportal/content/forrester"" target=""_blank"">See Details</a>. "," From 3ca26ebc4e759ecb49a7faf48d57992b896c59a4 Mon Sep 17 00:00:00 2001 From: vgelani <vishalgelani99@gmail.com> Date: Tue, 19 Jun 2018 19:10:19 +0530 Subject: [PATCH 15/20] Fixed typo error --- app/code/Magento/Paypal/view/frontend/web/order-review.js | 4 ++-- lib/web/modernizr/modernizr.js | 2 +- lib/web/tiny_mce/classes/Formatter.js | 2 +- lib/web/tiny_mce/classes/dom/DOMUtils.js | 2 +- lib/web/tiny_mce/tiny_mce_jquery_src.js | 2 +- lib/web/tiny_mce/tiny_mce_prototype_src.js | 2 +- lib/web/tiny_mce/tiny_mce_src.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Paypal/view/frontend/web/order-review.js b/app/code/Magento/Paypal/view/frontend/web/order-review.js index 566c9c8da06dc..2155b52f4081b 100644 --- a/app/code/Magento/Paypal/view/frontend/web/order-review.js +++ b/app/code/Magento/Paypal/view/frontend/web/order-review.js @@ -108,7 +108,7 @@ define([ }, /** - * trigger change for the update of shippping methods from server + * trigger change for the update of shipping methods from server */ _updateOrderHandler: function () { $(this.options.shippingSelector).trigger('change'); @@ -297,7 +297,7 @@ define([ this._updateOrderSubmit(true); this._toggleButton(this.options.updateOrderSelector, true); - // form data and callBack updated based on the shippping Form element + // form data and callBack updated based on the shipping Form element if (this.isShippingSubmitForm) { formData = $(this.options.shippingSubmitFormSelector).serialize() + '&isAjax=true'; diff --git a/lib/web/modernizr/modernizr.js b/lib/web/modernizr/modernizr.js index 2de01f8a78126..d7ddc86f63cae 100644 --- a/lib/web/modernizr/modernizr.js +++ b/lib/web/modernizr/modernizr.js @@ -910,7 +910,7 @@ window.Modernizr = (function( window, document, undefined ) { bool = inputElem.checkValidity && inputElem.checkValidity() === false; } else { - // If the upgraded input compontent rejects the :) text, we got a winner + // If the upgraded input component rejects the :) text, we got a winner bool = inputElem.value != smile; } } diff --git a/lib/web/tiny_mce/classes/Formatter.js b/lib/web/tiny_mce/classes/Formatter.js index 0cbca75ec504b..5f05d3f3015ad 100644 --- a/lib/web/tiny_mce/classes/Formatter.js +++ b/lib/web/tiny_mce/classes/Formatter.js @@ -445,7 +445,7 @@ childCount = getChildCount(node); // Remove empty nodes but only if there is multiple wrappers and they are not block - // elements so never remove single <h1></h1> since that would remove the currrent empty block element where the caret is at + // elements so never remove single <h1></h1> since that would remove the current empty block element where the caret is at if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { dom.remove(node, 1); return; diff --git a/lib/web/tiny_mce/classes/dom/DOMUtils.js b/lib/web/tiny_mce/classes/dom/DOMUtils.js index 783dbea1cacb9..eb8b4b7ab5d78 100644 --- a/lib/web/tiny_mce/classes/dom/DOMUtils.js +++ b/lib/web/tiny_mce/classes/dom/DOMUtils.js @@ -1106,7 +1106,7 @@ /** * Returns a unique id. This can be useful when generating elements on the fly. - * This method will not check if the element allready exists. + * This method will not check if the element already exists. * * @method uniqueId * @param {String} p Optional prefix to add infront of all ids defaults to "mce_". diff --git a/lib/web/tiny_mce/tiny_mce_jquery_src.js b/lib/web/tiny_mce/tiny_mce_jquery_src.js index b16d0e3ffdbb4..2daf1620a918e 100644 --- a/lib/web/tiny_mce/tiny_mce_jquery_src.js +++ b/lib/web/tiny_mce/tiny_mce_jquery_src.js @@ -14451,7 +14451,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { childCount = getChildCount(node); // Remove empty nodes but only if there is multiple wrappers and they are not block - // elements so never remove single <h1></h1> since that would remove the currrent empty block element where the caret is at + // elements so never remove single <h1></h1> since that would remove the current empty block element where the caret is at if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { dom.remove(node, 1); return; diff --git a/lib/web/tiny_mce/tiny_mce_prototype_src.js b/lib/web/tiny_mce/tiny_mce_prototype_src.js index 1c7b76cf75c8b..44b3010b0adfd 100644 --- a/lib/web/tiny_mce/tiny_mce_prototype_src.js +++ b/lib/web/tiny_mce/tiny_mce_prototype_src.js @@ -15301,7 +15301,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { childCount = getChildCount(node); // Remove empty nodes but only if there is multiple wrappers and they are not block - // elements so never remove single <h1></h1> since that would remove the currrent empty block element where the caret is at + // elements so never remove single <h1></h1> since that would remove the current empty block element where the caret is at if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { dom.remove(node, 1); return; diff --git a/lib/web/tiny_mce/tiny_mce_src.js b/lib/web/tiny_mce/tiny_mce_src.js index a1ce5c5d8c32f..46ba27e60f419 100644 --- a/lib/web/tiny_mce/tiny_mce_src.js +++ b/lib/web/tiny_mce/tiny_mce_src.js @@ -15275,7 +15275,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { childCount = getChildCount(node); // Remove empty nodes but only if there is multiple wrappers and they are not block - // elements so never remove single <h1></h1> since that would remove the currrent empty block element where the caret is at + // elements so never remove single <h1></h1> since that would remove the current empty block element where the caret is at if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { dom.remove(node, 1); return; From 74ab8c33ae890af47e19a1ef499342f484464904 Mon Sep 17 00:00:00 2001 From: IvanPletnyov <ivan.pletnyov@transoftgroup.com> Date: Tue, 19 Jun 2018 16:58:26 +0300 Subject: [PATCH 16/20] ENGCOM-1703: Move breadcrumb json configuration to viewmodel (fix badly json) --- .../Catalog/ViewModel/Product/Breadcrumbs.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php index 2b5665d20f304..3dc1c14f20034 100644 --- a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php +++ b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php @@ -9,6 +9,7 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; +use Magento\Framework\Escaper; use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\View\Element\Block\ArgumentInterface; @@ -33,22 +34,29 @@ class Breadcrumbs extends DataObject implements ArgumentInterface * @var Json */ private $json; + /** + * @var Escaper + */ + private $escaper; /** * @param Data $catalogData * @param ScopeConfigInterface $scopeConfig * @param Json $json + * @param Escaper $escaper */ public function __construct( Data $catalogData, ScopeConfigInterface $scopeConfig, - Json $json = null + Json $json = null, + Escaper $escaper = null ) { parent::__construct(); $this->catalogData = $catalogData; $this->scopeConfig = $scopeConfig; $this->json = $json ?: ObjectManager::getInstance()->get(Json::class); + $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class); } /** @@ -98,9 +106,9 @@ public function getJsonConfiguration() { return $this->json->serialize([ 'breadcrumbs' => [ - 'categoryUrlSuffix' => $this->getCategoryUrlSuffix(), + 'categoryUrlSuffix' => $this->escaper->escapeHtml($this->getCategoryUrlSuffix()), 'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(), - 'product' => $this->getProductName() + 'product' => $this->escaper->escapeHtml($this->getProductName()) ] ]); } From 6345bbd5d625b9c4d73da59256d46fd9dfe41ba3 Mon Sep 17 00:00:00 2001 From: itaymesh <itay@studioraz.co.il> Date: Tue, 19 Jun 2018 19:49:31 +0300 Subject: [PATCH 17/20] Update Israeli ZIP code mask, 7 digits instead of 5 ,according to the Israeli postal office --- app/code/Magento/Directory/etc/zip_codes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Directory/etc/zip_codes.xml b/app/code/Magento/Directory/etc/zip_codes.xml index 59de895927dbe..e45fccd9c3f36 100644 --- a/app/code/Magento/Directory/etc/zip_codes.xml +++ b/app/code/Magento/Directory/etc/zip_codes.xml @@ -196,7 +196,7 @@ </zip> <zip countryCode="IL"> <codes> - <code id="pattern_1" active="true" example="12345">^[0-9]{5}$</code> + <code id="pattern_1" active="true" example="6687865">^[0-9]{7}$</code> </codes> </zip> <zip countryCode="IT"> From 101cd9a75999bd97d1b8bec113d3cc48001bfe2f Mon Sep 17 00:00:00 2001 From: Volodymyr Zaets <vzaets@magento.com> Date: Wed, 20 Jun 2018 15:27:47 +0300 Subject: [PATCH 18/20] Fix Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php test --- .../app/code/Magento/SomeModule/Model/SevenInterface.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php index efedcb840e973..1d7ffa5127f56 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php @@ -45,9 +45,6 @@ public static function testMethod1(array &$data = array()); */ public function testMethod2($data = 'test_default', $flag = true); - /** - * @return mixed - */ public function testMethod3(); From 40e267223e25b64d93e4e2faeec5ce86767eb7bf Mon Sep 17 00:00:00 2001 From: IvanPletnyov <ivan.pletnyov@transoftgroup.com> Date: Wed, 20 Jun 2018 17:58:51 +0300 Subject: [PATCH 19/20] ENGCOM-1703: Move breadcrumb json configuration to viewmode (fix double quotes) --- app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php index 3dc1c14f20034..e897c330b7e0f 100644 --- a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php +++ b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php @@ -104,12 +104,12 @@ public function getProductName() */ public function getJsonConfiguration() { - return $this->json->serialize([ + return $this->escaper->escapeHtml($this->json->serialize([ 'breadcrumbs' => [ 'categoryUrlSuffix' => $this->escaper->escapeHtml($this->getCategoryUrlSuffix()), 'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(), - 'product' => $this->escaper->escapeHtml($this->getProductName()) + 'product' => $this->getProductName() ] - ]); + ])); } } From 54ba40921b653f35dc2c5d4249053c55d7a61199 Mon Sep 17 00:00:00 2001 From: IvanPletnyov <ivan.pletnyov@transoftgroup.com> Date: Thu, 21 Jun 2018 13:31:07 +0300 Subject: [PATCH 20/20] ENGCOM-2073: Update Israeli ZIP code mask: 7 digits instead of 5 #16250 (fix test) --- .../Magento/Directory/Model/Country/Postcode/ValidatorTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php index ce2f3ebae5538..9d0634645a4c3 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php @@ -130,7 +130,7 @@ public function getPostcodesDataProvider() ['countryId' => 'IS', 'postcode' => '123'], ['countryId' => 'IN', 'postcode' => '123456'], ['countryId' => 'ID', 'postcode' => '12345'], - ['countryId' => 'IL', 'postcode' => '12345'], + ['countryId' => 'IL', 'postcode' => '1234567'], ['countryId' => 'IT', 'postcode' => '12345'], ['countryId' => 'JP', 'postcode' => '123-4567'], ['countryId' => 'JP', 'postcode' => '1234567'],