Spanner/src/TransactionalReadTrait.php
private function singleUseState()
    {
        if ($this->type === self::TYPE_SINGLE_USE) {
            if ($this->state === self::STATE_SINGLE_USE_USED) {
                throw new \BadMethodCallException('This single-use transaction has already been used.');
            }

            $this->state = self::STATE_SINGLE_USE_USED;

            return true;
        }

        return false;
    }
private function singleUseState()
    {
        if ($this->type === self::TYPE_SINGLE_USE) {
            if ($this->state === self::STATE_SINGLE_USE_USED) {
                throw new \BadMethodCallException('This single-use transaction has already been used.');
            }

            $this->state = self::STATE_SINGLE_USE_USED;

            return true;
        }

        return false;
    }
private function singleUseState ( ) { if ( $ this -> type === self :: TYPE_SINGLE_USE ) { if ( $ this -> state === self :: STATE_SINGLE_USE_USED ) { throw new \ BadMethodCallException ( 'This single-use transaction has already been used.' ) ; } $ this -> state = self :: STATE_SINGLE_USE_USED ; return true ; } return false ; }
Check the transaction state, and update as necessary for single-use transactions.

@return bool true if transaction is single use, false otherwise.
@throws \BadMethodCallException
Check the transaction state and update as necessary for single - use transactions .