protected function ensureBucketExists()
    {
        if ($this->bucketExists) {
            return;
        }

        try {
            $this->service->buckets->get($this->bucket);
            $this->bucketExists = true;

            return;
        } catch (\Google_Service_Exception $e) {
            $this->bucketExists = false;

            throw new \RuntimeException(
                sprintf(
                    'The configured bucket "%s" does not exist.',
                    $this->bucket
                )
            );
        }
    }
protected function ensureBucketExists()
    {
        if ($this->bucketExists) {
            return;
        }

        try {
            $this->service->buckets->get($this->bucket);
            $this->bucketExists = true;

            return;
        } catch (\Google_Service_Exception $e) {
            $this->bucketExists = false;

            throw new \RuntimeException(
                sprintf(
                    'The configured bucket "%s" does not exist.',
                    $this->bucket
                )
            );
        }
    }
protected function ensureBucketExists ( ) { if ( $ this -> bucketExists ) { return ; } try { $ this -> service -> buckets -> get ( $ this -> bucket ) ; $ this -> bucketExists = true ; return ; } catch ( \ Google_Service_Exception $ e ) { $ this -> bucketExists = false ; throw new \ RuntimeException ( sprintf ( 'The configured bucket "%s" does not exist.' , $ this -> bucket ) ) ; } }
Ensures the specified bucket exists.

@throws \RuntimeException if the bucket does not exists
Ensures the specified bucket exists .