Skip to content

Commit ea0e72c

Browse files
committed
PR:37013 fix for static test failures
1 parent 627e166 commit ea0e72c

File tree

12 files changed

+26
-28
lines changed

12 files changed

+26
-28
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ protected function _processActionData($action = null)
343343
$this->messageManager->addSuccessMessage(__('The coupon code has been accepted.'));
344344
}
345345
}
346-
} elseif (isset($data['coupon']['code']) && empty($couponCode)) {
346+
} elseif (isset($data['coupon']['code']) && $couponCode=='') {
347347
$this->messageManager->addSuccessMessage(__('The coupon code has been removed.'));
348348
}
349349

app/code/Magento/Sales/Model/Config/Ordered.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* Configuration class for ordered items
13+
* phpcs:disable Magento2.Classes.AbstractApi
1314
* @api
1415
*
1516
* @since 100.0.2
@@ -143,6 +144,7 @@ protected function _prepareConfigArray($code, $totalConfig)
143144

144145
/**
145146
* Aggregate before/after information from all items and sort totals based on this data
147+
*
146148
* Invoke simple sorting if the first element contains the "sort_order" key
147149
*
148150
* @param array $config
@@ -177,6 +179,7 @@ function ($a, $b) {
177179

178180
/**
179181
* Initialize collectors array.
182+
*
180183
* Collectors array is array of total models ordered based on configuration settings
181184
*
182185
* @return $this

app/code/Magento/Sales/Model/Order/Creditmemo/Total/AbstractTotal.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* Base class for credit memo total
10+
* phpcs:disable Magento2.Classes.AbstractApi
1011
* @api
1112
*
1213
* @since 100.0.2

app/code/Magento/Sales/Model/Order/Invoice/Total/AbstractTotal.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* Base class for invoice total
10+
* phpcs:disable Magento2.Classes.AbstractApi
1011
* @api
1112
* @since 100.0.2
1213
*/

app/code/Magento/Sales/Model/Order/Payment/Transaction.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Transaction extends AbstractModel implements TransactionInterface
2525
/**
2626
* Raw details key in additional info
2727
*/
28-
const RAW_DETAILS = 'raw_details_info';
28+
public const RAW_DETAILS = 'raw_details_info';
2929

3030
/**
3131
* Order instance
@@ -94,8 +94,6 @@ class Transaction extends AbstractModel implements TransactionInterface
9494
protected $_eventObject = 'order_payment_transaction';
9595

9696
/**
97-
* Order website id
98-
*
9997
* @var int
10098
*/
10199
protected $_orderWebsiteId = null;
@@ -408,6 +406,7 @@ public function canVoidAuthorizationCompletely()
408406
return true;
409407
} catch (\Magento\Framework\Exception\LocalizedException $e) {
410408
// jam all logical exceptions, fallback to false
409+
return false;
411410
}
412411
return false;
413412
}

app/code/Magento/Sales/Model/Order/Shipment/Track.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Track extends AbstractModel implements ShipmentTrackInterface
2020
/**
2121
* Code of custom carrier
2222
*/
23-
const CUSTOM_CARRIER_CODE = 'custom';
23+
public const CUSTOM_CARRIER_CODE = 'custom';
2424

2525
/**
2626
* @var \Magento\Sales\Model\Order\Shipment|null
@@ -244,7 +244,7 @@ public function getCreatedAt()
244244
}
245245

246246
/**
247-
* {@inheritdoc}
247+
* @inheritdoc
248248
*/
249249
public function setCreatedAt($createdAt)
250250
{
@@ -322,79 +322,79 @@ public function getWeight()
322322
}
323323

324324
/**
325-
* {@inheritdoc}
325+
* @inheritdoc
326326
*/
327327
public function setUpdatedAt($timestamp)
328328
{
329329
return $this->setData(ShipmentTrackInterface::UPDATED_AT, $timestamp);
330330
}
331331

332332
/**
333-
* {@inheritdoc}
333+
* @inheritdoc
334334
*/
335335
public function setParentId($id)
336336
{
337337
return $this->setData(ShipmentTrackInterface::PARENT_ID, $id);
338338
}
339339

340340
/**
341-
* {@inheritdoc}
341+
* @inheritdoc
342342
*/
343343
public function setWeight($weight)
344344
{
345345
return $this->setData(ShipmentTrackInterface::WEIGHT, $weight);
346346
}
347347

348348
/**
349-
* {@inheritdoc}
349+
* @inheritdoc
350350
*/
351351
public function setQty($qty)
352352
{
353353
return $this->setData(ShipmentTrackInterface::QTY, $qty);
354354
}
355355

356356
/**
357-
* {@inheritdoc}
357+
* @inheritdoc
358358
*/
359359
public function setOrderId($id)
360360
{
361361
return $this->setData(ShipmentTrackInterface::ORDER_ID, $id);
362362
}
363363

364364
/**
365-
* {@inheritdoc}
365+
* @inheritdoc
366366
*/
367367
public function setTrackNumber($trackNumber)
368368
{
369369
return $this->setData(ShipmentTrackInterface::TRACK_NUMBER, $trackNumber);
370370
}
371371

372372
/**
373-
* {@inheritdoc}
373+
* @inheritdoc
374374
*/
375375
public function setDescription($description)
376376
{
377377
return $this->setData(ShipmentTrackInterface::DESCRIPTION, $description);
378378
}
379379

380380
/**
381-
* {@inheritdoc}
381+
* @inheritdoc
382382
*/
383383
public function setTitle($title)
384384
{
385385
return $this->setData(ShipmentTrackInterface::TITLE, $title);
386386
}
387387

388388
/**
389-
* {@inheritdoc}
389+
* @inheritdoc
390390
*/
391391
public function setCarrierCode($code)
392392
{
393393
return $this->setData(ShipmentTrackInterface::CARRIER_CODE, $code);
394394
}
395395

396396
/**
397-
* {@inheritdoc}
397+
* @inheritdoc
398398
*
399399
* @return \Magento\Sales\Api\Data\ShipmentTrackExtensionInterface|null
400400
*/
@@ -404,7 +404,7 @@ public function getExtensionAttributes()
404404
}
405405

406406
/**
407-
* {@inheritdoc}
407+
* @inheritdoc
408408
*
409409
* @param \Magento\Sales\Api\Data\ShipmentTrackExtensionInterface $extensionAttributes
410410
* @return $this

app/code/Magento/Sales/Model/Order/Tax.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
class Tax extends \Magento\Framework\Model\AbstractModel
3131
{
3232
/**
33+
* Constructor
34+
*
3335
* @return void
3436
*/
3537
protected function _construct()

app/code/Magento/Sales/Model/Order/Total/AbstractTotal.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* Base class for configure totals order
10+
* phpcs:disable Magento2.Classes.AbstractApi
1011
* @api
1112
*
1213
* @since 100.0.2
@@ -15,6 +16,7 @@ abstract class AbstractTotal extends \Magento\Framework\DataObject
1516
{
1617
/**
1718
* Process model configuration array.
19+
*
1820
* This method can be used for changing models apply sort order
1921
*
2022
* @param array $config

app/code/Magento/Sales/Model/ResourceModel/Order.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@
2222
class Order extends SalesResource implements OrderResourceInterface
2323
{
2424
/**
25-
* Event prefix
26-
*
2725
* @var string
2826
*/
2927
protected $_eventPrefix = 'sales_order_resource';
3028

3129
/**
32-
* Event object
33-
*
3430
* @var string
3531
*/
3632
protected $_eventObject = 'resource';

app/code/Magento/Sales/Model/ResourceModel/Order/Collection.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@ class Collection extends AbstractCollection implements OrderSearchResultInterfac
2222
protected $_idFieldName = 'entity_id';
2323

2424
/**
25-
* Event prefix
26-
*
2725
* @var string
2826
*/
2927
protected $_eventPrefix = 'sales_order_collection';
3028

3129
/**
32-
* Event object
33-
*
3430
* @var string
3531
*/
3632
protected $_eventObject = 'order_collection';

0 commit comments

Comments
 (0)