Skip to content

Commit 139214e

Browse files
committed
Fixed code style issues
1 parent c11c476 commit 139214e

File tree

11 files changed

+36
-11
lines changed

11 files changed

+36
-11
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
<element name="FolderName" type="button" selector="input[data-role='promptField']" />
158158
<element name="AcceptFolderName" type="button" selector=".action-primary.action-accept" timeout="30"/>
159159
<element name="StorageRootArrow" type="button" selector="#root > .jstree-icon" />
160+
<element name="FolderContainer" type="button" selector="div[data-role='tree']" />
160161
<element name="checkIfArrowExpand" type="button" selector="//li[@id='root' and contains(@class,'jstree-closed')]" />
161162
<element name="WysiwygArrow" type="button" selector="#d3lzaXd5Zw-- > .jstree-icon" />
162163
<element name="checkIfWysiwygArrowExpand" type="button" selector="//li[@id='d3lzaXd5Zw--' and contains(@class,'jstree-closed')]" />

app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@
7070
<scrollTo selector="{{ProductDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="scrollToTinyMCE4" />
7171
<click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.InsertImageIcon}}" stepKey="clickInsertImageIcon2" />
7272
<click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.Browse}}" stepKey="clickBrowse2" />
73+
<waitForLoadingMaskToDisappear stepKey="waitForLoading13"/>
7374
<waitForElementVisible selector="{{ProductDescriptionWYSIWYGToolbarSection.CancelBtn}}" stepKey="waitForCancelButton2"/>
7475
<see selector="{{ProductShortDescriptionWYSIWYGToolbarSection.CancelBtn}}" userInput="Cancel" stepKey="seeCancelBtn2" />
75-
<waitForLoadingMaskToDisappear stepKey="waitForLoading13"/>
76+
<waitForElementVisible selector="{{ProductDescriptionWYSIWYGToolbarSection.CreateFolder}}" stepKey="waitForCreateFolderBtn2"/>
7677
<see selector="{{ProductShortDescriptionWYSIWYGToolbarSection.CreateFolder}}" userInput="Create Folder" stepKey="seeCreateFolderBtn2" />
77-
<waitForLoadingMaskToDisappear stepKey="waitForLoading14"/>
78+
<see selector="{{ProductDescriptionWYSIWYGToolbarSection.FolderContainer}}" userInput="Storage Root" stepKey="seeFolderContainer" />
7879
<click userInput="Storage Root" stepKey="clickOnRootFolder" />
7980
<waitForLoadingMaskToDisappear stepKey="waitForLoading15"/>
8081
<dontSeeElement selector="{{ProductShortDescriptionWYSIWYGToolbarSection.InsertFile}}" stepKey="dontSeeAddSelectedBtn3" />

app/code/Magento/Wishlist/Controller/Index/Configure.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
use Magento\Framework\Controller\ResultFactory;
1212

1313
/**
14+
* Wishlist Configure Controller
15+
*
1416
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1517
*/
16-
class Configure extends \Magento\Wishlist\Controller\AbstractIndex
18+
class Configure extends \Magento\Wishlist\Controller\AbstractIndex implements Action\HttpGetActionInterface
1719
{
1820
/**
1921
* Core registry

app/code/Magento/Wishlist/Controller/Index/Remove.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
use Magento\Wishlist\Model\Product\AttributeValueProvider;
1515

1616
/**
17+
* Wishlist Remove Controller
18+
*
1719
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1820
*/
19-
class Remove extends \Magento\Wishlist\Controller\AbstractIndex
21+
class Remove extends \Magento\Wishlist\Controller\AbstractIndex implements Action\HttpPostActionInterface
2022
{
2123
/**
2224
* @var WishlistProviderInterface

app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
use Magento\Wishlist\Controller\WishlistProviderInterface;
1515

1616
/**
17+
* Wishlist UpdateItemOptions Controller
18+
*
1719
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1820
*/
19-
class UpdateItemOptions extends \Magento\Wishlist\Controller\AbstractIndex
21+
class UpdateItemOptions extends \Magento\Wishlist\Controller\AbstractIndex implements Action\HttpPostActionInterface
2022
{
2123
/**
2224
* @var WishlistProviderInterface

app/code/Magento/Wishlist/Controller/Shared/Cart.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Checkout\Helper\Cart as CartHelper;
1010
use Magento\Checkout\Model\Cart as CustomerCart;
1111
use Magento\Framework\App\Action\Context as ActionContext;
12+
use Magento\Framework\App\Action\HttpGetActionInterface;
1213
use Magento\Framework\Controller\ResultFactory;
1314
use Magento\Framework\Escaper;
1415
use Magento\Framework\Exception\LocalizedException;
@@ -18,9 +19,11 @@
1819
use Magento\Wishlist\Model\ResourceModel\Item\Option\Collection as OptionCollection;
1920

2021
/**
22+
* Wishlist Cart Controller
23+
*
2124
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2225
*/
23-
class Cart extends \Magento\Framework\App\Action\Action
26+
class Cart extends \Magento\Framework\App\Action\Action implements HttpGetActionInterface
2427
{
2528
/**
2629
* @var CustomerCart

app/code/Magento/Wishlist/Controller/WishlistProvider.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Wishlist\Controller;
87

8+
use Magento\Framework\App\Action\HttpPostActionInterface;
99
use Magento\Framework\App\RequestInterface;
1010

11+
/**
12+
* WishlistProvider Controller
13+
*
14+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
15+
*/
1116
class WishlistProvider implements WishlistProviderInterface
1217
{
1318
/**
@@ -54,7 +59,8 @@ public function __construct(
5459
}
5560

5661
/**
57-
* {@inheritdoc}
62+
* @inheritdoc
63+
*
5864
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5965
*/
6066
public function getWishlist($wishlistId = null)

app/code/Magento/Wishlist/Model/ItemCarrier.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Checkout\Helper\Cart as CartHelper;
1111
use Magento\Checkout\Model\Cart;
1212
use Magento\Customer\Model\Session;
13+
use Magento\Framework\App\Action\HttpPostActionInterface;
1314
use Magento\Framework\App\Response\RedirectInterface;
1415
use Magento\Framework\Exception\LocalizedException;
1516
use Psr\Log\LoggerInterface as Logger;
@@ -18,7 +19,10 @@
1819
use Magento\Wishlist\Helper\Data as WishlistHelper;
1920

2021
/**
22+
* Wishlist ItemCarrier Controller
23+
*
2124
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
25+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2226
*/
2327
class ItemCarrier
2428
{

app/code/Magento/Wishlist/Observer/AddToCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function execute(Observer $observer)
105105
$this->checkoutSession->setWishlistPendingUrls($urls);
106106
$this->checkoutSession->setWishlistPendingMessages($messages);
107107

108-
$this->messageManager->addErrorMessage($message);
108+
$this->messageManager->addError($message);
109109

110110
$observer->getEvent()->getResponse()->setRedirect($url);
111111
$this->checkoutSession->setNoCartRedirect(true);

app/code/Magento/Wishlist/Test/Unit/Observer/AddToCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function testExecute()
167167
->with([])
168168
->willReturnSelf();
169169
$this->messageManager->expects($this->once())
170-
->method('addErrorMessage')
170+
->method('addError')
171171
->with($message)
172172
->willReturnSelf();
173173
$event->expects($this->once())

0 commit comments

Comments
 (0)