original_string: public function index($product)
      {
          if (is_numeric($product)) {
              $product = $this->product->get($product);
          }
  
          if (empty($product)) {
              return false;
          }
  
          $indexed = 0;
          $indexed += (int) $this->indexProduct($product);
          $indexed += (int) $this->indexProductTranslations($product);
  
          return $indexed > 0;
      }
code: public function index($product)
      {
          if (is_numeric($product)) {
              $product = $this->product->get($product);
          }
  
          if (empty($product)) {
              return false;
          }
  
          $indexed = 0;
          $indexed += (int) $this->indexProduct($product);
          $indexed += (int) $this->indexProductTranslations($product);
  
          return $indexed > 0;
      }
code_tokens: public function index ( $ product ) { if ( is_numeric ( $ product ) ) { $ product = $ this -> product -> get ( $ product ) ; } if ( empty ( $ product ) ) { return false ; } $ indexed = 0 ; $ indexed += ( int ) $ this -> indexProduct ( $ product ) ; $ indexed += ( int ) $ this -> indexProductTranslations ( $ product ) ; return $ indexed > 0 ; }
docstring: Indexes a product
  @param integer|array $product
  @return boolean
docstring_tokens: Indexes a product