PubSub/src/Snapshot.php
public function subscription()
    {
        return $this->info['subscription']
            ? new Subscription($this->connection, $this->projectId, $this->info['subscription'], null, $this->encode)
            : null;
    }
public function subscription()
    {
        return $this->info['subscription']
            ? new Subscription($this->connection, $this->projectId, $this->info['subscription'], null, $this->encode)
            : null;
    }
public function subscription ( ) { return $ this -> info [ 'subscription' ] ? new Subscription ( $ this -> connection , $ this -> projectId , $ this -> info [ 'subscription' ] , null , $ this -> encode ) : null ; }
Get the Subscription attached to the snapshot, if one exists.

Example:
```
$subscription = $snapshot->subscription();
```

@return Subscription|null
Get the Subscription attached to the snapshot if one exists .