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
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);
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 ' ;
Original file line number Diff line number Diff 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 ' ;
You can’t perform that action at this time.
0 commit comments