protected function _detectStreaming($method) {
    $streamings = [
      'public' => [
        'statuses/sample',
        'statuses/filter'
      ]
    ];
    foreach ($streamings as $key => $values) {
      if (in_array($method, $values)) {
        return $key;
      }
    }

    return false;
  }
protected function _detectStreaming($method) {
    $streamings = [
      'public' => [
        'statuses/sample',
        'statuses/filter'
      ]
    ];
    foreach ($streamings as $key => $values) {
      if (in_array($method, $values)) {
        return $key;
      }
    }

    return false;
  }
protected function _detectStreaming ( $ method ) { $ streamings = [ 'public' => [ 'statuses/sample' , 'statuses/filter' ] ] ; foreach ( $ streamings as $ key => $ values ) { if ( in_array ( $ method , $ values ) ) { return $ key ; } } return false ; }
Detects if API call should use streaming endpoint, and if yes, which one

@param string $method The API method to call

@return string|false Variant of streaming API to be used
Detects if API call should use streaming endpoint and if yes which one