Payment/Model/PaymentStates.php
static private function assertValidChangeSet(array $cs)
    {
        if (
            array_key_exists(0, $cs) &&
            array_key_exists(1, $cs) &&
            (is_null($cs[0]) || in_array($cs[0], static::getStates(), true)) &&
            (is_null($cs[1]) || in_array($cs[1], static::getStates(), true))
        ) {
            return true;
        }

        throw new InvalidArgumentException("Unexpected order state change set.");
    }
static private function assertValidChangeSet(array $cs)
    {
        if (
            array_key_exists(0, $cs) &&
            array_key_exists(1, $cs) &&
            (is_null($cs[0]) || in_array($cs[0], static::getStates(), true)) &&
            (is_null($cs[1]) || in_array($cs[1], static::getStates(), true))
        ) {
            return true;
        }

        throw new InvalidArgumentException("Unexpected order state change set.");
    }
Returns whether or not the change set is valid.

@param array $cs

@return bool

@throws InvalidArgumentException