public function setMaxCount(int $maxCount): StreamMetadataBuilder
    {
        if ($maxCount < 0) {
            throw new InvalidArgumentException('Max count must be positive');
        }

        $this->maxCount = $maxCount;

        return $this;
    }
public function setMaxCount(int $maxCount): StreamMetadataBuilder
    {
        if ($maxCount < 0) {
            throw new InvalidArgumentException('Max count must be positive');
        }

        $this->maxCount = $maxCount;

        return $this;
    }
public function setMaxCount ( int $ maxCount ) : StreamMetadataBuilder { if ( $ maxCount < 0 ) { throw new InvalidArgumentException ( 'Max count must be positive' ) ; } $ this -> maxCount = $ maxCount ; return $ this ; }
Sets the maximum number of events allowed in the stream
Sets the maximum number of events allowed in the stream