File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed
Config/Model/ResourceModel
dev/tests/api-functional/testsuite/Magento/GraphQl/Quote Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ class Config extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb implem
24
24
private $ pillPut ;
25
25
26
26
/**
27
+ *
27
28
* Define main table
28
29
* @param PoisonPillPutInterface|null $pillPut
29
30
* @return void
30
31
*/
31
32
protected function _construct (
32
33
PoisonPillPutInterface $ pillPut = null
33
- )
34
- {
34
+ ) {
35
35
$ this ->_init ('core_config_data ' , 'config_id ' );
36
36
$ this ->pillPut = $ pillPut ?: \Magento \Framework \App \ObjectManager::getInstance ()
37
37
->get (PoisonPillPutInterface::class);
Original file line number Diff line number Diff line change 22
22
23
23
/**
24
24
* Tax Calculation Model
25
+ * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
25
26
* @SuppressWarnings(PHPMD.TooManyFields)
26
27
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
27
28
*/
@@ -50,7 +51,7 @@ class Calculation extends \Magento\Framework\Model\AbstractModel implements Rese
50
51
/**
51
52
* Identifier constant for unit based calculation
52
53
*/
53
- const CALC_UNIT_BASE = 'UNIT_BASE_CALCULATION ' ;
54
+ public const CALC_UNIT_BASE = 'UNIT_BASE_CALCULATION ' ;
54
55
55
56
/**
56
57
* Identifier constant for row based calculation
@@ -526,11 +527,13 @@ public function getRateRequest(
526
527
//fallback to default address for registered customer
527
528
try {
528
529
$ defaultBilling = $ this ->customerAccountManagement ->getDefaultBillingAddress ($ customerId );
530
+ // phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
529
531
} catch (NoSuchEntityException $ e ) {
530
532
}
531
533
532
534
try {
533
535
$ defaultShipping = $ this ->customerAccountManagement ->getDefaultShippingAddress ($ customerId );
536
+ // phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
534
537
} catch (NoSuchEntityException $ e ) {
535
538
}
536
539
Original file line number Diff line number Diff line change @@ -386,7 +386,9 @@ private function getQuery(
386
386
public function testSetShippingMethodOnAnEmptyCart ()
387
387
{
388
388
$ 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
+ );
390
392
391
393
$ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ->execute ('test_quote ' );
392
394
$ carrierCode = 'flatrate ' ;
Original file line number Diff line number Diff line change @@ -318,7 +318,9 @@ public function testSetShippingMethodToCustomerCart()
318
318
public function testSetShippingMethodOnAnEmptyCart ()
319
319
{
320
320
$ 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
+ );
322
324
323
325
$ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ->execute ('test_quote ' );
324
326
$ carrierCode = 'flatrate ' ;
You can’t perform that action at this time.
0 commit comments