src/Response/Iterator/MultiBulkTuple.php
protected function checkPreconditions(MultiBulk $iterator)
    {
        if ($iterator->getPosition() !== 0) {
            throw new \InvalidArgumentException(
                'Cannot initialize a tuple iterator using an already initiated iterator.'
            );
        }

        if (($size = count($iterator)) % 2 !== 0) {
            throw new \UnexpectedValueException('Invalid response size for a tuple iterator.');
        }
    }
protected function checkPreconditions(MultiBulk $iterator)
    {
        if ($iterator->getPosition() !== 0) {
            throw new \InvalidArgumentException(
                'Cannot initialize a tuple iterator using an already initiated iterator.'
            );
        }

        if (($size = count($iterator)) % 2 !== 0) {
            throw new \UnexpectedValueException('Invalid response size for a tuple iterator.');
        }
    }
protected function checkPreconditions ( MultiBulk $ iterator ) { if ( $ iterator -> getPosition ( ) !== 0 ) { throw new \ InvalidArgumentException ( 'Cannot initialize a tuple iterator using an already initiated iterator.' ) ; } if ( ( $ size = count ( $ iterator ) ) % 2 !== 0 ) { throw new \ UnexpectedValueException ( 'Invalid response size for a tuple iterator.' ) ; } }
Checks for valid preconditions.

@param MultiBulk $iterator Inner multibulk response iterator.

@throws \InvalidArgumentException
@throws \UnexpectedValueException
Checks for valid preconditions .