original_string: public function getBillingAddress($actor=null)
      {
          if(is_null($actor)){
              $actor = $this->securityContext->getToken()->getUser();
              if (!$actor || !is_object($actor)) {
                  throw new \LogicException(
                      'The getBillingAddress cannot be used without an authenticated user!'
                  );
              }
          }
          /** @var Address $address */
          $address = $this->manager->getRepository('EcommerceBundle:Address')
              ->findOneBy(array(
                      'actor'       => $actor,
                      'forBilling' => true
                  ));
  
          // if it does not exist, create a new one
          if (is_null($address)) {
              $address = new Address();
              $address->setForBilling(true);
              $country = $this->manager->getRepository('CoreBundle:Country')->find('es');
              $address->setCountry($country);
              $address->setActor($actor);
          }
  
          return $address;
      }
code: public function getBillingAddress($actor=null)
      {
          if(is_null($actor)){
              $actor = $this->securityContext->getToken()->getUser();
              if (!$actor || !is_object($actor)) {
                  throw new \LogicException(
                      'The getBillingAddress cannot be used without an authenticated user!'
                  );
              }
          }
          /** @var Address $address */
          $address = $this->manager->getRepository('EcommerceBundle:Address')
              ->findOneBy(array(
                      'actor'       => $actor,
                      'forBilling' => true
                  ));
  
          // if it does not exist, create a new one
          if (is_null($address)) {
              $address = new Address();
              $address->setForBilling(true);
              $country = $this->manager->getRepository('CoreBundle:Country')->find('es');
              $address->setCountry($country);
              $address->setActor($actor);
          }
  
          return $address;
      }
code_tokens: public function getBillingAddress ( $ actor = null ) { if ( is_null ( $ actor ) ) { $ actor = $ this -> securityContext -> getToken ( ) -> getUser ( ) ; if ( ! $ actor || ! is_object ( $ actor ) ) { throw new \ LogicException ( 'The getBillingAddress cannot be used without an authenticated user!' ) ; } } /** @var Address $address */ $ address = $ this -> manager -> getRepository ( 'EcommerceBundle:Address' ) -> findOneBy ( array ( 'actor' => $ actor , 'forBilling' => true ) ) ; // if it does not exist, create a new one if ( is_null ( $ address ) ) { $ address = new Address ( ) ; $ address -> setForBilling ( true ) ; $ country = $ this -> manager -> getRepository ( 'CoreBundle:Country' ) -> find ( 'es' ) ; $ address -> setCountry ( $ country ) ; $ address -> setActor ( $ actor ) ; } return $ address ; }
docstring: Get billing address
  
  @return Address
docstring_tokens: Get billing address