@@ -50,10 +50,10 @@ public function check(Order $order)
50
50
* Check if order can be automatically switched to complete status
51
51
*
52
52
* @param Order $order
53
- * @param string $currentState
53
+ * @param string|null $currentState
54
54
* @return bool
55
55
*/
56
- private function canBeCompleteStatus (Order $ order , string $ currentState ): bool
56
+ private function canBeCompleteStatus (Order $ order , ? string $ currentState ): bool
57
57
{
58
58
if ($ currentState === Order::STATE_PROCESSING && !$ order ->canShip ()) {
59
59
return true ;
@@ -66,10 +66,10 @@ private function canBeCompleteStatus(Order $order, string $currentState): bool
66
66
* Check if order can be automatically switched to closed status
67
67
*
68
68
* @param Order $order
69
- * @param string $currentState
69
+ * @param string|null $currentState
70
70
* @return bool
71
71
*/
72
- private function canBeClosedStatus (Order $ order , string $ currentState ): bool
72
+ private function canBeClosedStatus (Order $ order , ? string $ currentState ): bool
73
73
{
74
74
if (in_array ($ currentState , [Order::STATE_PROCESSING , Order::STATE_COMPLETE ])
75
75
&& !$ order ->canCreditmemo ()
@@ -90,10 +90,10 @@ private function canBeClosedStatus(Order $order, string $currentState): bool
90
90
* Check if order can be automatically switched to processing status
91
91
*
92
92
* @param Order $order
93
- * @param string $currentState
93
+ * @param string|null $currentState
94
94
* @return bool
95
95
*/
96
- private function canBeProcessingStatus (Order $ order , string $ currentState ): bool
96
+ private function canBeProcessingStatus (Order $ order , ? string $ currentState ): bool
97
97
{
98
98
if ($ currentState == Order::STATE_NEW && $ order ->getIsInProcess ()) {
99
99
return true ;
0 commit comments