Skip to content

Commit c75af03

Browse files
committed
Merge remote-tracking branch 'git-36981/no-author/sales-03' into bluetooth_delivery
2 parents f8f043f + ea0e72c commit c75af03

File tree

32 files changed

+51
-89
lines changed

32 files changed

+51
-89
lines changed

app/code/Magento/Sales/Block/Items/AbstractItems.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
/**
1111
* Abstract block for display sales (quote/order/invoice etc.) items
1212
*
13-
* @author Magento Core Team <core@magentocommerce.com>
1413
* @SuppressWarnings(PHPMD.NumberOfChildren)
1514
*/
1615
class AbstractItems extends \Magento\Framework\View\Element\Template
1716
{
1817
/**
1918
* Block alias fallback
2019
*/
21-
const DEFAULT_TYPE = 'default';
20+
public const DEFAULT_TYPE = 'default';
2221

2322
/**
2423
* Retrieve item renderer block

app/code/Magento/Sales/Block/Order/Creditmemo.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* Sales order view block
1212
*
1313
* @api
14-
* @author Magento Core Team <core@magentocommerce.com>
1514
* @since 100.0.2
1615
*/
1716
class Creditmemo extends \Magento\Sales\Block\Order\Creditmemo\Items
@@ -52,6 +51,8 @@ public function __construct(
5251
}
5352

5453
/**
54+
* Prepare Layout
55+
*
5556
* @return void
5657
*/
5758
protected function _prepareLayout()
@@ -62,6 +63,8 @@ protected function _prepareLayout()
6263
}
6364

6465
/**
66+
* Get payment info html
67+
*
6568
* @return string
6669
*/
6770
public function getPaymentInfoHtml()
@@ -106,6 +109,8 @@ public function getBackTitle()
106109
}
107110

108111
/**
112+
* Invoice URL getter
113+
*
109114
* @param object $order
110115
* @return string
111116
*/
@@ -115,6 +120,8 @@ public function getInvoiceUrl($order)
115120
}
116121

117122
/**
123+
* Shipment URL getter
124+
*
118125
* @param object $order
119126
* @return string
120127
*/
@@ -124,6 +131,8 @@ public function getShipmentUrl($order)
124131
}
125132

126133
/**
134+
* Get order view URL
135+
*
127136
* @param object $order
128137
* @return string
129138
*/
@@ -133,6 +142,8 @@ public function getViewUrl($order)
133142
}
134143

135144
/**
145+
* Get CreditMemo Print Url
146+
*
136147
* @param object $creditmemo
137148
* @return string
138149
*/
@@ -142,6 +153,8 @@ public function getPrintCreditmemoUrl($creditmemo)
142153
}
143154

144155
/**
156+
* Get PrintAll CreditMemos Url
157+
*
145158
* @param object $order
146159
* @return string
147160
*/

app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* Sales Order Email creditmemo items
1717
*
1818
* @api
19-
* @author Magento Core Team <core@magentocommerce.com>
2019
* @since 100.0.2
2120
*/
2221
class Items extends \Magento\Sales\Block\Items\AbstractItems

app/code/Magento/Sales/Block/Order/Email/Items.php

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

77
/**
88
* Sales Order Email order items
9-
*
10-
* @author Magento Core Team <core@magentocommerce.com>
119
*/
1210
namespace Magento\Sales\Block\Order\Email;
1311

app/code/Magento/Sales/Block/Order/Email/Items/DefaultItems.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* Sales Order Email items default renderer
1818
*
1919
* @api
20-
* @author Magento Core Team <core@magentocommerce.com>
2120
* @since 100.0.2
2221
*/
2322
class DefaultItems extends Template

app/code/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* Sales Order Email items default renderer
1313
*
1414
* @api
15-
* @author Magento Core Team <core@magentocommerce.com>
1615
* @since 100.0.2
1716
*/
1817
class DefaultOrder extends \Magento\Framework\View\Element\Template

app/code/Magento/Sales/Block/Order/Info.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
*/
66
namespace Magento\Sales\Block\Order;
77

8-
use Magento\Sales\Model\Order\Address;
9-
use Magento\Framework\View\Element\Template\Context as TemplateContext;
108
use Magento\Framework\Registry;
9+
use Magento\Framework\View\Element\Template\Context as TemplateContext;
1110
use Magento\Payment\Helper\Data as PaymentHelper;
11+
use Magento\Sales\Model\Order\Address;
1212
use Magento\Sales\Model\Order\Address\Renderer as AddressRenderer;
1313

1414
/**
1515
* Invoice view comments form
1616
*
1717
* @api
18-
* @author Magento Core Team <core@magentocommerce.com>
1918
* @since 100.0.2
2019
*/
2120
class Info extends \Magento\Framework\View\Element\Template
@@ -26,8 +25,6 @@ class Info extends \Magento\Framework\View\Element\Template
2625
protected $_template = 'Magento_Sales::order/info.phtml';
2726

2827
/**
29-
* Core registry
30-
*
3128
* @var \Magento\Framework\Registry
3229
*/
3330
protected $coreRegistry = null;
@@ -64,6 +61,8 @@ public function __construct(
6461
}
6562

6663
/**
64+
* Prepare Layout
65+
*
6766
* @return void
6867
*/
6968
protected function _prepareLayout()
@@ -74,6 +73,8 @@ protected function _prepareLayout()
7473
}
7574

7675
/**
76+
* Get payment info html
77+
*
7778
* @return string
7879
*/
7980
public function getPaymentInfoHtml()

app/code/Magento/Sales/Block/Order/Invoice/Items.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
/**
88
* Sales order view items block
9-
*
10-
* @author Magento Core Team <core@magentocommerce.com>
119
*/
1210
namespace Magento\Sales\Block\Order\Invoice;
1311

@@ -20,8 +18,6 @@
2018
class Items extends \Magento\Sales\Block\Items\AbstractItems
2119
{
2220
/**
23-
* Core registry
24-
*
2521
* @var \Magento\Framework\Registry
2622
*/
2723
protected $_coreRegistry = null;

app/code/Magento/Sales/Block/Order/Items.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* @author Magento Core Team <core@magentocommerce.com>
9-
*/
107
namespace Magento\Sales\Block\Order;
118

129
use Magento\Framework\App\ObjectManager;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/**
1515
* Adminhtml sales orders creation process controller
1616
*
17-
* @author Magento Core Team <core@magentocommerce.com>
1817
* @SuppressWarnings(PHPMD.NumberOfChildren)
1918
* @SuppressWarnings(PHPMD.AllPurposeAction)
2019
*/
@@ -344,7 +343,7 @@ protected function _processActionData($action = null)
344343
$this->messageManager->addSuccessMessage(__('The coupon code has been accepted.'));
345344
}
346345
}
347-
} elseif (isset($data['coupon']['code']) && empty($couponCode)) {
346+
} elseif (isset($data['coupon']['code']) && $couponCode=='') {
348347
$this->messageManager->addSuccessMessage(__('The coupon code has been removed.'));
349348
}
350349

app/code/Magento/Sales/Controller/Adminhtml/Order/View/Giftmessage.php

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

88
/**
99
* Adminhtml sales order view gift messages controller
10-
*
11-
* @author Magento Core Team <core@magentocommerce.com>
1210
*/
1311
abstract class Giftmessage extends \Magento\Backend\App\Action
1412
{
@@ -17,7 +15,7 @@ abstract class Giftmessage extends \Magento\Backend\App\Action
1715
*
1816
* @see _isAllowed()
1917
*/
20-
const ADMIN_RESOURCE = 'Magento_Sales::sales_order';
18+
public const ADMIN_RESOURCE = 'Magento_Sales::sales_order';
2119

2220
/**
2321
* Retrieve gift message save model

app/code/Magento/Sales/Controller/Adminhtml/Transactions.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
/**
1515
* Adminhtml sales transactions controller
16-
*
17-
* @author Magento Core Team <core@magentocommerce.com>
1816
*/
1917
abstract class Transactions extends \Magento\Backend\App\Action
2018
{
@@ -23,11 +21,9 @@ abstract class Transactions extends \Magento\Backend\App\Action
2321
*
2422
* @see _isAllowed()
2523
*/
26-
const ADMIN_RESOURCE = 'Magento_Sales::transactions';
24+
public const ADMIN_RESOURCE = 'Magento_Sales::transactions';
2725

2826
/**
29-
* Core registry
30-
*
3127
* @var Registry
3228
*/
3329
protected $_coreRegistry = null;

app/code/Magento/Sales/Helper/Data.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
/**
1111
* Sales module base helper
12-
*
13-
* @author Magento Core Team <core@magentocommerce.com>
1412
*/
1513
class Data extends \Magento\Framework\App\Helper\AbstractHelper
1614
{

app/code/Magento/Sales/Model/AdminOrder/Product/Quote/Initializer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
/**
88
* Product quote initializer
9-
*
10-
* @author Magento Core Team <core@magentocommerce.com>
11-
*
129
*/
1310
namespace Magento\Sales\Model\AdminOrder\Product\Quote;
1411

@@ -29,6 +26,8 @@ public function __construct(
2926
}
3027

3128
/**
29+
* Initializing quote product
30+
*
3231
* @param \Magento\Quote\Model\Quote $quote
3332
* @param \Magento\Catalog\Model\Product $product
3433
* @param \Magento\Framework\DataObject $config

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
/**
1212
* Configuration class for ordered items
13+
* phpcs:disable Magento2.Classes.AbstractApi
1314
* @api
1415
*
15-
* @author Magento Core Team <core@magentocommerce.com>
1616
* @since 100.0.2
1717
*/
1818
abstract class Ordered extends \Magento\Framework\App\Config\Base
@@ -144,6 +144,7 @@ protected function _prepareConfigArray($code, $totalConfig)
144144

145145
/**
146146
* Aggregate before/after information from all items and sort totals based on this data
147+
*
147148
* Invoke simple sorting if the first element contains the "sort_order" key
148149
*
149150
* @param array $config
@@ -178,6 +179,7 @@ function ($a, $b) {
178179

179180
/**
180181
* Initialize collectors array.
182+
*
181183
* Collectors array is array of total models ordered based on configuration settings
182184
*
183185
* @return $this

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
/**
99
* Base class for credit memo total
10+
* phpcs:disable Magento2.Classes.AbstractApi
1011
* @api
1112
*
12-
* @author Magento Core Team <core@magentocommerce.com>
1313
* @since 100.0.2
1414
*/
1515
abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTotal

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
/**
99
* Base class for invoice total
10+
* phpcs:disable Magento2.Classes.AbstractApi
1011
* @api
11-
* @author Magento Core Team <core@magentocommerce.com>
1212
* @since 100.0.2
1313
*/
1414
abstract class AbstractTotal extends \Magento\Sales\Model\Order\Total\AbstractTotal

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

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

88
/**
99
* Order invoice shipping total calculation model
10-
*
11-
* @author Magento Core Team <core@magentocommerce.com>
1210
*/
1311
class Shipping extends AbstractTotal
1412
{

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* By default transactions are saved as closed.
1717
*
1818
* @api
19-
* @author Magento Core Team <core@magentocommerce.com>
2019
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
2120
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2221
* @since 100.0.2
@@ -26,7 +25,7 @@ class Transaction extends AbstractModel implements TransactionInterface
2625
/**
2726
* Raw details key in additional info
2827
*/
29-
const RAW_DETAILS = 'raw_details_info';
28+
public const RAW_DETAILS = 'raw_details_info';
3029

3130
/**
3231
* Order instance
@@ -95,8 +94,6 @@ class Transaction extends AbstractModel implements TransactionInterface
9594
protected $_eventObject = 'order_payment_transaction';
9695

9796
/**
98-
* Order website id
99-
*
10097
* @var int
10198
*/
10299
protected $_orderWebsiteId = null;
@@ -409,6 +406,7 @@ public function canVoidAuthorizationCompletely()
409406
return true;
410407
} catch (\Magento\Framework\Exception\LocalizedException $e) {
411408
// jam all logical exceptions, fallback to false
409+
return false;
412410
}
413411
return false;
414412
}

0 commit comments

Comments
 (0)