88use Magento \Directory \Model \Currency ;
99use Magento \Framework \Api \AttributeValueFactory ;
1010use Magento \Framework \App \ObjectManager ;
11+ use Magento \Framework \Exception \LocalizedException ;
1112use Magento \Framework \Locale \ResolverInterface ;
1213use Magento \Framework \Pricing \PriceCurrencyInterface ;
1314use Magento \Sales \Api \Data \OrderInterface ;
@@ -981,7 +982,7 @@ public function setState($state)
981982 * Retrieve frontend label of order status
982983 *
983984 * @return string
984- * @throws \Magento\Framework\Exception\ LocalizedException
985+ * @throws LocalizedException
985986 */
986987 public function getFrontendStatusLabel ()
987988 {
@@ -992,7 +993,7 @@ public function getFrontendStatusLabel()
992993 * Retrieve label of order status
993994 *
994995 * @return string
995- * @throws \Magento\Framework\Exception\ LocalizedException
996+ * @throws LocalizedException
996997 */
997998 public function getStatusLabel ()
998999 {
@@ -1078,12 +1079,12 @@ public function place()
10781079
10791080 /**
10801081 * @return $this
1081- * @throws \Magento\Framework\Exception\ LocalizedException
1082+ * @throws LocalizedException
10821083 */
10831084 public function hold ()
10841085 {
10851086 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. ' ));
10871088 }
10881089 $ this ->setHoldBeforeState ($ this ->getState ());
10891090 $ this ->setHoldBeforeStatus ($ this ->getStatus ());
@@ -1096,12 +1097,12 @@ public function hold()
10961097 * Attempt to unhold the order
10971098 *
10981099 * @return $this
1099- * @throws \Magento\Framework\Exception\ LocalizedException
1100+ * @throws LocalizedException
11001101 */
11011102 public function unhold ()
11021103 {
11031104 if (!$ this ->canUnhold ()) {
1104- throw new \ Magento \ Framework \ Exception \ LocalizedException (__ ('You cannot remove the hold. ' ));
1105+ throw new LocalizedException (__ ('You cannot remove the hold. ' ));
11051106 }
11061107
11071108 $ this ->setState ($ this ->getHoldBeforeState ())
@@ -1145,7 +1146,7 @@ public function isFraudDetected()
11451146 * @param string $comment
11461147 * @param bool $graceful
11471148 * @return $this
1148- * @throws \Magento\Framework\Exception\ LocalizedException
1149+ * @throws LocalizedException
11491150 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
11501151 */
11511152 public function registerCancellation ($ comment = '' , $ graceful = true )
@@ -1184,7 +1185,7 @@ public function registerCancellation($comment = '', $graceful = true)
11841185 $ this ->addStatusHistoryComment ($ comment , false );
11851186 }
11861187 } elseif (!$ graceful ) {
1187- throw new \ Magento \ Framework \ Exception \ LocalizedException (__ ('We cannot cancel this order. ' ));
1188+ throw new LocalizedException (__ ('We cannot cancel this order. ' ));
11881189 }
11891190 return $ this ;
11901191 }
0 commit comments