8
8
use Magento \Directory \Model \Currency ;
9
9
use Magento \Framework \Api \AttributeValueFactory ;
10
10
use Magento \Framework \App \ObjectManager ;
11
+ use Magento \Framework \Exception \LocalizedException ;
11
12
use Magento \Framework \Locale \ResolverInterface ;
12
13
use Magento \Framework \Pricing \PriceCurrencyInterface ;
13
14
use Magento \Sales \Api \Data \OrderInterface ;
@@ -981,7 +982,7 @@ public function setState($state)
981
982
* Retrieve frontend label of order status
982
983
*
983
984
* @return string
984
- * @throws \Magento\Framework\Exception\ LocalizedException
985
+ * @throws LocalizedException
985
986
*/
986
987
public function getFrontendStatusLabel ()
987
988
{
@@ -992,7 +993,7 @@ public function getFrontendStatusLabel()
992
993
* Retrieve label of order status
993
994
*
994
995
* @return string
995
- * @throws \Magento\Framework\Exception\ LocalizedException
996
+ * @throws LocalizedException
996
997
*/
997
998
public function getStatusLabel ()
998
999
{
@@ -1078,12 +1079,12 @@ public function place()
1078
1079
1079
1080
/**
1080
1081
* @return $this
1081
- * @throws \Magento\Framework\Exception\ LocalizedException
1082
+ * @throws LocalizedException
1082
1083
*/
1083
1084
public function hold ()
1084
1085
{
1085
1086
if (!$ this ->canHold ()) {
1086
- throw new \ Magento \ Framework \ Exception \ LocalizedException (__ ('A hold action is not available. ' ));
1087
+ throw new LocalizedException (__ ('A hold action is not available. ' ));
1087
1088
}
1088
1089
$ this ->setHoldBeforeState ($ this ->getState ());
1089
1090
$ this ->setHoldBeforeStatus ($ this ->getStatus ());
@@ -1096,12 +1097,12 @@ public function hold()
1096
1097
* Attempt to unhold the order
1097
1098
*
1098
1099
* @return $this
1099
- * @throws \Magento\Framework\Exception\ LocalizedException
1100
+ * @throws LocalizedException
1100
1101
*/
1101
1102
public function unhold ()
1102
1103
{
1103
1104
if (!$ this ->canUnhold ()) {
1104
- throw new \ Magento \ Framework \ Exception \ LocalizedException (__ ('You cannot remove the hold. ' ));
1105
+ throw new LocalizedException (__ ('You cannot remove the hold. ' ));
1105
1106
}
1106
1107
1107
1108
$ this ->setState ($ this ->getHoldBeforeState ())
@@ -1145,7 +1146,7 @@ public function isFraudDetected()
1145
1146
* @param string $comment
1146
1147
* @param bool $graceful
1147
1148
* @return $this
1148
- * @throws \Magento\Framework\Exception\ LocalizedException
1149
+ * @throws LocalizedException
1149
1150
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
1150
1151
*/
1151
1152
public function registerCancellation ($ comment = '' , $ graceful = true )
@@ -1184,7 +1185,7 @@ public function registerCancellation($comment = '', $graceful = true)
1184
1185
$ this ->addStatusHistoryComment ($ comment , false );
1185
1186
}
1186
1187
} elseif (!$ graceful ) {
1187
- throw new \ Magento \ Framework \ Exception \ LocalizedException (__ ('We cannot cancel this order. ' ));
1188
+ throw new LocalizedException (__ ('We cannot cancel this order. ' ));
1188
1189
}
1189
1190
return $ this ;
1190
1191
}
0 commit comments