private function getStatefulStatusCode($messageName, array $messageOptions)
    {
        // on security-auth this is always 'Start'
        if ('Security_Authenticate' === $messageName) {
            return self::TRANSACTION_STATUS_CODE_START;
        }

        // if endSession is set this will be (the) 'End'
        if (isset($messageOptions['endSession']) && $messageOptions['endSession'] === true) {
            return self::TRANSACTION_STATUS_CODE_END;
        }

        // on everything else we assume in-series
        return self::TRANSACTION_STATUS_CODE_INSERIES;
    }