original_string: protected function getIndexTypeForObject($object, Client $client = null)
      {
          if ($client === null) {
              $client = $this->client;
          }
          $className = TypeHandling::getTypeForValue($object);
          $indexAnnotation = $this->indexInformer->getClassAnnotation($className);
          if ($indexAnnotation === null) {
              return null;
          }
          $index = $client->findIndex($indexAnnotation->indexName);
  
          return new GenericType($index, $indexAnnotation->typeName);
      }
code: protected function getIndexTypeForObject($object, Client $client = null)
      {
          if ($client === null) {
              $client = $this->client;
          }
          $className = TypeHandling::getTypeForValue($object);
          $indexAnnotation = $this->indexInformer->getClassAnnotation($className);
          if ($indexAnnotation === null) {
              return null;
          }
          $index = $client->findIndex($indexAnnotation->indexName);
  
          return new GenericType($index, $indexAnnotation->typeName);
      }
code_tokens: protected function getIndexTypeForObject ( $ object , Client $ client = null ) { if ( $ client === null ) { $ client = $ this -> client ; } $ className = TypeHandling :: getTypeForValue ( $ object ) ; $ indexAnnotation = $ this -> indexInformer -> getClassAnnotation ( $ className ) ; if ( $ indexAnnotation === null ) { return null ; } $ index = $ client -> findIndex ( $ indexAnnotation -> indexName ) ; return new GenericType ( $ index , $ indexAnnotation -> typeName ) ; }
docstring: Returns the ElasticSearch type for a specific object, by its annotation
  
  @param object $object
  @param Client $client
  @return GenericType
docstring_tokens: Returns the ElasticSearch type for a specific object by its annotation