original_string: public function listen(int $since, int $maximum = 500)
      {
          $query = [
              'clientId' => $this->clientId,
              'since' => $since,
              'block' => 'true',
              'form' => 'cjson',
              'schema' => '1.10',
              'filter' => $this->service->getAnnotation()->getObjectType(),
              'size' => $maximum,
          ];
  
          if ($this->authenticatedClient->hasAccount()) {
              $query['account'] = (string) $this->authenticatedClient->getAccount()->getMpxId();
          }
  
          return $this->authenticatedClient->requestAsync('GET', $this->uri, [
              'query' => $query,
          ])->then(function (ResponseInterface $response) {
              return $this->deserializeResponse($response);
          });
      }
code: public function listen(int $since, int $maximum = 500)
      {
          $query = [
              'clientId' => $this->clientId,
              'since' => $since,
              'block' => 'true',
              'form' => 'cjson',
              'schema' => '1.10',
              'filter' => $this->service->getAnnotation()->getObjectType(),
              'size' => $maximum,
          ];
  
          if ($this->authenticatedClient->hasAccount()) {
              $query['account'] = (string) $this->authenticatedClient->getAccount()->getMpxId();
          }
  
          return $this->authenticatedClient->requestAsync('GET', $this->uri, [
              'query' => $query,
          ])->then(function (ResponseInterface $response) {
              return $this->deserializeResponse($response);
          });
      }
code_tokens: public function listen ( int $ since , int $ maximum = 500 ) { $ query = [ 'clientId' => $ this -> clientId , 'since' => $ since , 'block' => 'true' , 'form' => 'cjson' , 'schema' => '1.10' , 'filter' => $ this -> service -> getAnnotation ( ) -> getObjectType ( ) , 'size' => $ maximum , ] ; if ( $ this -> authenticatedClient -> hasAccount ( ) ) { $ query [ 'account' ] = ( string ) $ this -> authenticatedClient -> getAccount ( ) -> getMpxId ( ) ; } return $ this -> authenticatedClient -> requestAsync ( 'GET' , $ this -> uri , [ 'query' => $ query , ] ) -> then ( function ( ResponseInterface $ response ) { return $ this -> deserializeResponse ( $ response ) ; } ) ; }
docstring: Listen for notifications.
  
  This method always filters to the object type defined in the discovered
  data service passed in the constructor, such as 'Media'.
  
  @see  https://docs.theplatform.com/help/media-media-data-service-api-reference
  
  @todo Add support for a configurable timeout?
  
  @see  \Lullabot\Mpx\DataService\NotificationListener::sync
  @see  \Lullabot\Mpx\DataService\Notification
  
  @param int $since   The last sync ID.
  @param int $maximum (optional) The maximum number of notifications to return. Defaults to 500.
  
  @return \GuzzleHttp\Promise\PromiseInterface A promise returning an array of Notification objects.
docstring_tokens: Listen for notifications .