Skip to content

Commit ad682b6

Browse files
committed
ACPT-1191: Fix Quote related issues on Application Server
1 parent 9704935 commit ad682b6

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

app/code/Magento/Config/Model/ResourceModel/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ class Config extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb implem
2424
private $pillPut;
2525

2626
/**
27+
*
2728
* Define main table
2829
* @param PoisonPillPutInterface|null $pillPut
2930
* @return void
3031
*/
3132
protected function _construct(
3233
PoisonPillPutInterface $pillPut = null
33-
)
34-
{
34+
) {
3535
$this->_init('core_config_data', 'config_id');
3636
$this->pillPut = $pillPut ?: \Magento\Framework\App\ObjectManager::getInstance()
3737
->get(PoisonPillPutInterface::class);

app/code/Magento/Tax/Model/Calculation.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
/**
2424
* Tax Calculation Model
25+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2526
* @SuppressWarnings(PHPMD.TooManyFields)
2627
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2728
*/
@@ -50,7 +51,7 @@ class Calculation extends \Magento\Framework\Model\AbstractModel implements Rese
5051
/**
5152
* Identifier constant for unit based calculation
5253
*/
53-
const CALC_UNIT_BASE = 'UNIT_BASE_CALCULATION';
54+
public const CALC_UNIT_BASE = 'UNIT_BASE_CALCULATION';
5455

5556
/**
5657
* Identifier constant for row based calculation
@@ -526,11 +527,13 @@ public function getRateRequest(
526527
//fallback to default address for registered customer
527528
try {
528529
$defaultBilling = $this->customerAccountManagement->getDefaultBillingAddress($customerId);
530+
// phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
529531
} catch (NoSuchEntityException $e) {
530532
}
531533

532534
try {
533535
$defaultShipping = $this->customerAccountManagement->getDefaultShippingAddress($customerId);
536+
// phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
534537
} catch (NoSuchEntityException $e) {
535538
}
536539

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingMethodsOnCartTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ private function getQuery(
386386
public function testSetShippingMethodOnAnEmptyCart()
387387
{
388388
$this->expectException(\Exception::class);
389-
$this->expectExceptionMessage('The shipping method can\'t be set for an empty cart. Add an item to cart and try again.');
389+
$this->expectExceptionMessage(
390+
'The shipping method can\'t be set for an empty cart. Add an item to cart and try again.'
391+
);
390392

391393
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
392394
$carrierCode = 'flatrate';

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetShippingMethodsOnCartTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ public function testSetShippingMethodToCustomerCart()
318318
public function testSetShippingMethodOnAnEmptyCart()
319319
{
320320
$this->expectException(\Exception::class);
321-
$this->expectExceptionMessage('The shipping method can\'t be set for an empty cart. Add an item to cart and try again.');
321+
$this->expectExceptionMessage(
322+
'The shipping method can\'t be set for an empty cart. Add an item to cart and try again.'
323+
);
322324

323325
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
324326
$carrierCode = 'flatrate';

0 commit comments

Comments
 (0)