Skip to content

Commit 9cdc1b7

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #21121: Applied PHP-CS-Fixer: concat_space, no_multiline_whitespace_around_double_arrow, ordered_imports (by @yogeshsuhagiya) - #21210: Correct spelling (by @ravi-chandra3197) - #21178: Fix issue 21177 - Cart page cross-sell product add-to-cart button issue resolved (by @speedy008) - #19505: ISSUE-5021 fixed guest checkout with custom shipping carrier with unde� (by @vovsky) - #21046: Remove unwanted condition check (by @dominicfernando) Fixed GitHub Issues: - #21177: Cart Page cross sell product Add to cart button overlapping (reported by @speedy008) has been fixed in #21178 by @speedy008 in 2.3-develop branch Related commits: 1. e434bb1 2. 5328404 3. f8e7c90 - #5021: "Please specify a shipping method" Exception (reported by @vphat28) has been fixed in #19505 by @vovsky in 2.3-develop branch Related commits: 1. 2360efd 2. 9ab59dc 3. 1238e4d
2 parents d653583 + de0f924 commit 9cdc1b7

File tree

8 files changed

+40
-18
lines changed

8 files changed

+40
-18
lines changed

app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __get($name)
4040
}
4141

4242
/**
43-
* Checks for the existance of a property stored in the private $_attributes property
43+
* Checks for the existence of a property stored in the private $_attributes property
4444
*
4545
* @ignore
4646
* @param string $name

app/code/Magento/Captcha/Observer/CheckUserLoginObserver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Captcha\Observer;
78

89
use Magento\Customer\Model\AuthenticationInterface;
@@ -11,7 +12,10 @@
1112
use Magento\Customer\Api\CustomerRepositoryInterface;
1213

1314
/**
15+
* Check captcha on user login page observer.
16+
*
1417
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1519
*/
1620
class CheckUserLoginObserver implements ObserverInterface
1721
{
@@ -140,7 +144,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
140144
$customer = $this->getCustomerRepository()->get($login);
141145
$this->getAuthentication()->processAuthenticationFailure($customer->getId());
142146
} catch (NoSuchEntityException $e) {
143-
//do nothing as customer existance is validated later in authenticate method
147+
//do nothing as customer existence is validated later in authenticate method
144148
}
145149
$this->messageManager->addError(__('Incorrect CAPTCHA'));
146150
$this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);

app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Magento\Quote\Model\Quote;
1515

1616
/**
17+
* Guest payment information management model.
18+
*
1719
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1820
*/
1921
class GuestPaymentInformationManagement implements \Magento\Checkout\Api\GuestPaymentInformationManagementInterface
@@ -66,7 +68,7 @@ class GuestPaymentInformationManagement implements \Magento\Checkout\Api\GuestPa
6668
* @param \Magento\Checkout\Api\PaymentInformationManagementInterface $paymentInformationManagement
6769
* @param \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory
6870
* @param CartRepositoryInterface $cartRepository
69-
* @param ResourceConnection|null
71+
* @param ResourceConnection $connectionPool
7072
* @codeCoverageIgnore
7173
*/
7274
public function __construct(
@@ -88,7 +90,7 @@ public function __construct(
8890
}
8991

9092
/**
91-
* {@inheritDoc}
93+
* @inheritdoc
9294
*/
9395
public function savePaymentInformationAndPlaceOrder(
9496
$cartId,
@@ -129,7 +131,7 @@ public function savePaymentInformationAndPlaceOrder(
129131
}
130132

131133
/**
132-
* {@inheritDoc}
134+
* @inheritdoc
133135
*/
134136
public function savePaymentInformation(
135137
$cartId,
@@ -156,7 +158,7 @@ public function savePaymentInformation(
156158
}
157159

158160
/**
159-
* {@inheritDoc}
161+
* @inheritdoc
160162
*/
161163
public function getPaymentInformation($cartId)
162164
{
@@ -190,9 +192,8 @@ private function limitShippingCarrier(Quote $quote) : void
190192
{
191193
$shippingAddress = $quote->getShippingAddress();
192194
if ($shippingAddress && $shippingAddress->getShippingMethod()) {
193-
$shippingDataArray = explode('_', $shippingAddress->getShippingMethod());
194-
$shippingCarrier = array_shift($shippingDataArray);
195-
$shippingAddress->setLimitCarrier($shippingCarrier);
195+
$shippingRate = $shippingAddress->getShippingRateByCode($shippingAddress->getShippingMethod());
196+
$shippingAddress->setLimitCarrier($shippingRate->getCarrier());
196197
}
197198
}
198199
}

app/code/Magento/Checkout/Test/Unit/Model/GuestPaymentInformationManagementTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function testSavePaymentInformationAndPlaceOrderWithLocalizedException()
273273
*/
274274
private function getMockForAssignBillingAddress(
275275
int $cartId,
276-
\PHPUnit_Framework_MockObject_MockObject $billingAddressMock
276+
\PHPUnit_Framework_MockObject_MockObject $billingAddressMock
277277
) : void {
278278
$quoteIdMask = $this->createPartialMock(QuoteIdMask::class, ['getQuoteId', 'load']);
279279
$this->quoteIdMaskFactoryMock->method('create')
@@ -287,9 +287,11 @@ private function getMockForAssignBillingAddress(
287287
$billingAddressId = 1;
288288
$quote = $this->createMock(Quote::class);
289289
$quoteBillingAddress = $this->createMock(Address::class);
290+
$shippingRate = $this->createPartialMock(\Magento\Quote\Model\Quote\Address\Rate::class, []);
291+
$shippingRate->setCarrier('flatrate');
290292
$quoteShippingAddress = $this->createPartialMock(
291293
Address::class,
292-
['setLimitCarrier', 'getShippingMethod']
294+
['setLimitCarrier', 'getShippingMethod', 'getShippingRateByCode']
293295
);
294296
$this->cartRepositoryMock->method('getActive')
295297
->with($cartId)
@@ -309,6 +311,9 @@ private function getMockForAssignBillingAddress(
309311
$quote->expects($this->once())
310312
->method('setBillingAddress')
311313
->with($billingAddressMock);
314+
$quoteShippingAddress->expects($this->any())
315+
->method('getShippingRateByCode')
316+
->willReturn($shippingRate);
312317
$quote->expects($this->once())
313318
->method('setDataChanges')
314319
->willReturnSelf();

app/code/Magento/Cms/Helper/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function getPageUrl($pageId = null)
187187
{
188188
/** @var \Magento\Cms\Model\Page $page */
189189
$page = $this->_pageFactory->create();
190-
if ($pageId !== null && $pageId !== $page->getId()) {
190+
if ($pageId !== null) {
191191
$page->setStoreId($this->_storeManager->getStore()->getId());
192192
$page->load($pageId);
193193
}

app/code/Magento/GroupedProduct/Ui/DataProvider/Product/Form/Modifier/Grouped.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,17 +414,17 @@ protected function getButtonSet()
414414
'component' => 'Magento_Ui/js/form/components/button',
415415
'actions' => [
416416
[
417-
'targetName' =>
418-
$this->uiComponentsConfig['form'] . '.' . $this->uiComponentsConfig['form']
417+
'targetName' => $this->uiComponentsConfig['form'] .
418+
'.' . $this->uiComponentsConfig['form']
419419
. '.'
420420
. static::GROUP_GROUPED
421421
. '.'
422422
. $this->uiComponentsConfig['modal'],
423423
'actionName' => 'openModal',
424424
],
425425
[
426-
'targetName' =>
427-
$this->uiComponentsConfig['form'] . '.' . $this->uiComponentsConfig['form']
426+
'targetName' => $this->uiComponentsConfig['form'] .
427+
'.' . $this->uiComponentsConfig['form']
428428
. '.'
429429
. static::GROUP_GROUPED
430430
. '.'

app/code/Magento/Webapi/Model/Config/ClassReflector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ protected function extractMethodDescription(\Zend\Code\Reflection\MethodReflecti
129129
$docBlock = $methodReflection->getDocBlock();
130130
if (!$docBlock) {
131131
throw new \LogicException(
132-
'The docBlock of the method '.
133-
$method->getDeclaringClass()->getName() . '::' . $method->getName() . ' is empty.'
132+
'The docBlock of the method ' .
133+
$method->getDeclaringClass()->getName() . '::' . $method->getName() . ' is empty.'
134134
);
135135
}
136136
return $this->_typeProcessor->getDescription($docBlock);

app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_cart.less

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,18 @@
527527
// Desktop
528528
// _____________________________________________
529529

530+
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
531+
.cart-container {
532+
.block.crosssell {
533+
.products-grid {
534+
.product-item-actions {
535+
margin: 0 0 @indent__s;
536+
}
537+
}
538+
}
539+
}
540+
}
541+
530542
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
531543
.checkout-cart-index {
532544
.page-main {

0 commit comments

Comments
 (0)