original_string: public function getLineItemForProduct(Product $product)
      {
          foreach ($this->getLineItems() as $lineItem)
          {
              if ($lineItem->getProduct()->getId() == $product->getId())
              {
                  return $lineItem;
              }
          }
  
          return $this->createLineItemForProduct($product);
      }
code: public function getLineItemForProduct(Product $product)
      {
          foreach ($this->getLineItems() as $lineItem)
          {
              if ($lineItem->getProduct()->getId() == $product->getId())
              {
                  return $lineItem;
              }
          }
  
          return $this->createLineItemForProduct($product);
      }
code_tokens: public function getLineItemForProduct ( Product $ product ) { foreach ( $ this -> getLineItems ( ) as $ lineItem ) { if ( $ lineItem -> getProduct ( ) -> getId ( ) == $ product -> getId ( ) ) { return $ lineItem ; } } return $ this -> createLineItemForProduct ( $ product ) ; }
docstring: Get OrderLineItem for given Product
  
  @author Tom Haskins-Vaughan <tom@harvestcloud.com>
  @since  2012-04-10
  
  @param  HarvestCloud\CoreBundle\Entity\Product
  
  @return HarvestCloud\CoreBundle\Entity\OrderLineItem
docstring_tokens: Get OrderLineItem for given Product