code: protected static function checkStatusChange($order, $prevStatusCode)
      {
          if (!empty($prevStatusCode) && $order->statusCode != $prevStatusCode)
              \event(new OrderStatusChanged($order->id, $order->statusCode, $prevStatusCode));
      }
docs: Check on order status differences and fires event.
  @param object $order Order.
  @param string $prevStatusCode Previous status code.
  @return void