diff --git a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/ConfigTest.php b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/ConfigTest.php index da2b953d843b1..646ad4f195b9d 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/ConfigTest.php +++ b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/ConfigTest.php @@ -81,6 +81,9 @@ public function testGetSolutionIdSandbox($environment, $expectedSolution) $this->assertEquals($expectedSolution, $this->model->getSolutionId(123)); } + /** + * @return array + */ public function configMapProvider() { return [ @@ -97,6 +100,10 @@ public function configMapProvider() ['getTransactionInfoSyncKeys', 'transactionSyncKeys', 'a,b,c', ['a', 'b', 'c']], ]; } + + /** + * @return array + */ public function environmentUrlProvider() { return [ @@ -105,6 +112,9 @@ public function environmentUrlProvider() ]; } + /** + * @return array + */ public function environmentSolutionProvider() { return [ diff --git a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Request/AddressDataBuilderTest.php b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Request/AddressDataBuilderTest.php index 6ddb30a64af96..84c2f19040e16 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Request/AddressDataBuilderTest.php +++ b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Request/AddressDataBuilderTest.php @@ -108,6 +108,10 @@ public function testBuildWithBothAddresses() $this->assertEquals('abc', $result['transactionRequest']['customerIP']); } + /** + * @param $responseData + * @param $addressPrefix + */ private function validateAddressData($responseData, $addressPrefix) { foreach ($this->mockAddressData as $fieldValue => $field) { @@ -115,6 +119,11 @@ private function validateAddressData($responseData, $addressPrefix) } } + /** + * @param $prefix + * + * @return \PHPUnit\Framework\MockObject\MockObject + */ private function createAddressMock($prefix) { $addressAdapterMock = $this->createMock(AddressAdapterInterface::class); diff --git a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Response/PaymentReviewStatusHandlerTest.php b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Response/PaymentReviewStatusHandlerTest.php index a52a1b317fbb7..197dc209ece66 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Response/PaymentReviewStatusHandlerTest.php +++ b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Response/PaymentReviewStatusHandlerTest.php @@ -112,6 +112,9 @@ public function testDoesNothingWhenPending(string $status) $this->handler->handle($subject, $response); } + /** + * @return array + */ public function pendingTransactionStatusesProvider() { return [ @@ -120,6 +123,9 @@ public function pendingTransactionStatusesProvider() ]; } + /** + * @return array + */ public function declinedTransactionStatusesProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml index aef79e651b584..320a322fc5f8e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml @@ -389,7 +389,7 @@ - + Goes to the Admin Products grid. Filters the Product grid by the provided Product SKU. diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/FileInfoTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/FileInfoTest.php index 71f5ca33d1303..6977a9ad1c7cc 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/FileInfoTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/FileInfoTest.php @@ -191,6 +191,9 @@ public function testIsExist($fileName, $fileMediaPath) $this->assertTrue($this->model->isExist($fileName)); } + /** + * @return array + */ public function isExistProvider() { return [ @@ -213,6 +216,9 @@ public function testIsBeginsWithMediaDirectoryPath($fileName, $expected) $this->assertEquals($expected, $this->model->isBeginsWithMediaDirectoryPath($fileName)); } + /** + * @return array + */ public function isBeginsWithMediaDirectoryPathProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php index 5eaf2422e95a9..0d1adfe3891e2 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php @@ -486,6 +486,9 @@ public function testGetStoreSingleSiteModelIds( $this->assertEquals($websiteIDs, $this->model->getStoreIds()); } + /** + * @return array + */ public function getSingleStoreIds() { return [ diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml index 66f8ed541ffd9..e0519a126aa48 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml @@ -222,7 +222,7 @@ - Validates the the provided Product appears in the Storefront Checkout 'Order Summary' section. + Validates the provided Product appears in the Storefront Checkout 'Order Summary' section. diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Cart/RequestQuantityProcessorTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Cart/RequestQuantityProcessorTest.php index daabb080b1c9a..82384fa83ab94 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/Cart/RequestQuantityProcessorTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/Cart/RequestQuantityProcessorTest.php @@ -48,6 +48,9 @@ public function testProcess($cartData, $expected) $this->assertEquals($this->requestProcessor->process($cartData), $expected); } + /** + * @return array + */ public function cartDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminConfigCreateNewAccountActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminConfigCreateNewAccountActionGroup.xml index 10d22b61ecae0..2a3a14293a059 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminConfigCreateNewAccountActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminConfigCreateNewAccountActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - Goes to the 'Configuration' page for 'Customer Configuration'. Sets the 'Group For Valid VAT ID Intra Union' option. Clicks on the Save button. Validates the the Save message is present. + Goes to the 'Configuration' page for 'Customer Configuration'. Sets the 'Group For Valid VAT ID Intra Union' option. Clicks on the Save button. Validates the Save message is present. diff --git a/app/code/Magento/Deploy/Console/DeployStaticOptions.php b/app/code/Magento/Deploy/Console/DeployStaticOptions.php index 1c02d24f7e99c..06887fc0206fc 100644 --- a/app/code/Magento/Deploy/Console/DeployStaticOptions.php +++ b/app/code/Magento/Deploy/Console/DeployStaticOptions.php @@ -78,6 +78,11 @@ class DeployStaticOptions */ const NO_JAVASCRIPT = 'no-javascript'; + /** + * Key for js-bundle option + */ + const NO_JS_BUNDLE = 'no-js-bundle'; + /** * Key for css option */ @@ -122,9 +127,6 @@ class DeployStaticOptions */ const NO_LESS = 'no-less'; - /** - * Default jobs amount - */ const DEFAULT_JOBS_AMOUNT = 0; /** @@ -275,6 +277,12 @@ private function getSkipOptions() InputOption::VALUE_NONE, 'Do not deploy JavaScript files.' ), + new InputOption( + self::NO_JS_BUNDLE, + null, + InputOption::VALUE_NONE, + 'Do not deploy JavaScript bundle files.' + ), new InputOption( self::NO_CSS, null, diff --git a/app/code/Magento/Deploy/Service/DeployStaticContent.php b/app/code/Magento/Deploy/Service/DeployStaticContent.php index 8903997159914..b6333d6fec71e 100644 --- a/app/code/Magento/Deploy/Service/DeployStaticContent.php +++ b/app/code/Magento/Deploy/Service/DeployStaticContent.php @@ -5,9 +5,9 @@ */ namespace Magento\Deploy\Service; -use Magento\Deploy\Strategy\DeployStrategyFactory; -use Magento\Deploy\Process\QueueFactory; use Magento\Deploy\Console\DeployStaticOptions as Options; +use Magento\Deploy\Process\QueueFactory; +use Magento\Deploy\Strategy\DeployStrategyFactory; use Magento\Framework\App\View\Deployment\Version\StorageInterface; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\ObjectManagerInterface; @@ -75,6 +75,9 @@ public function __construct( * @param array $options * @throws LocalizedException * @return void + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function deploy(array $options) { @@ -106,27 +109,35 @@ public function deploy(array $options) $deployStrategy = $this->deployStrategyFactory->create( $options[Options::STRATEGY], - [ - 'queue' => $this->queueFactory->create($queueOptions) - ] + ['queue' => $this->queueFactory->create($queueOptions)] ); $packages = $deployStrategy->deploy($options); if ($options[Options::NO_JAVASCRIPT] !== true) { - $deployRjsConfig = $this->objectManager->create(DeployRequireJsConfig::class, [ - 'logger' => $this->logger - ]); - $deployI18n = $this->objectManager->create(DeployTranslationsDictionary::class, [ - 'logger' => $this->logger - ]); - $deployBundle = $this->objectManager->create(Bundle::class, [ - 'logger' => $this->logger - ]); + $deployRjsConfig = $this->objectManager->create( + DeployRequireJsConfig::class, + ['logger' => $this->logger] + ); + $deployI18n = $this->objectManager->create( + DeployTranslationsDictionary::class, + ['logger' => $this->logger] + ); foreach ($packages as $package) { if (!$package->isVirtual()) { $deployRjsConfig->deploy($package->getArea(), $package->getTheme(), $package->getLocale()); $deployI18n->deploy($package->getArea(), $package->getTheme(), $package->getLocale()); + } + } + } + + if ($options[Options::NO_JAVASCRIPT] !== true && $options[Options::NO_JS_BUNDLE] !== true) { + $deployBundle = $this->objectManager->create( + Bundle::class, + ['logger' => $this->logger] + ); + foreach ($packages as $package) { + if (!$package->isVirtual()) { $deployBundle->deploy($package->getArea(), $package->getTheme(), $package->getLocale()); } } diff --git a/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php b/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php index 396381960e544..fcc02476bb858 100644 --- a/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php +++ b/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php @@ -103,7 +103,7 @@ public function testDeploy($options, $expectedContentVersion) $package->expects($this->never())->method('getTheme'); $package->expects($this->never())->method('getLocale'); } else { - $package->expects($this->exactly(1))->method('isVirtual')->willReturn(false); + $package->expects($this->exactly(2))->method('isVirtual')->willReturn(false); $package->expects($this->exactly(3))->method('getArea')->willReturn('area'); $package->expects($this->exactly(3))->method('getTheme')->willReturn('theme'); $package->expects($this->exactly(3))->method('getLocale')->willReturn('locale'); @@ -198,6 +198,7 @@ public function deployDataProvider() [ 'strategy' => 'compact', 'no-javascript' => false, + 'no-js-bundle' => false, 'no-html-minify' => false, 'refresh-content-version-only' => false, ], @@ -207,6 +208,7 @@ public function deployDataProvider() [ 'strategy' => 'compact', 'no-javascript' => false, + 'no-js-bundle' => false, 'no-html-minify' => false, 'refresh-content-version-only' => false, 'content-version' => '123456', @@ -226,25 +228,28 @@ public function deployDataProvider() public function testMaxExecutionTimeOptionPassed() { $options = [ - DeployStaticOptions::MAX_EXECUTION_TIME => 100, + DeployStaticOptions::MAX_EXECUTION_TIME => 100, DeployStaticOptions::REFRESH_CONTENT_VERSION_ONLY => false, - DeployStaticOptions::JOBS_AMOUNT => 3, - DeployStaticOptions::STRATEGY => 'compact', - DeployStaticOptions::NO_JAVASCRIPT => true, - DeployStaticOptions::NO_HTML_MINIFY => true, + DeployStaticOptions::JOBS_AMOUNT => 3, + DeployStaticOptions::STRATEGY => 'compact', + DeployStaticOptions::NO_JAVASCRIPT => true, + DeployStaticOptions::NO_JS_BUNDLE => true, + DeployStaticOptions::NO_HTML_MINIFY => true, ]; $queueMock = $this->createMock(Queue::class); $strategyMock = $this->createMock(CompactDeploy::class); $this->queueFactory->expects($this->once()) ->method('create') - ->with([ - 'logger' => $this->logger, - 'maxExecTime' => 100, - 'maxProcesses' => 3, - 'options' => $options, - 'deployPackageService' => null - ]) + ->with( + [ + 'logger' => $this->logger, + 'maxExecTime' => 100, + 'maxProcesses' => 3, + 'options' => $options, + 'deployPackageService' => null + ] + ) ->willReturn($queueMock); $this->deployStrategyFactory->expects($this->once()) ->method('create') diff --git a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml index 82b09f1095585..73d80c0ae4d57 100644 --- a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml +++ b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml @@ -13,8 +13,8 @@ use Magento\Framework\App\TemplateTypesInterface; getBlockHtml('formkey') ?>
escapeHtml(__('Load Default Template')) ?>
-
- +
+