original_string: protected function submitAddAddressCheckout()
      {
          $type = $this->getPosted('save_address', '', true, 'string');
  
          if (empty($type)) {
              return null;
          }
  
          $errors = $this->validateAddressCheckout($type);
  
          if (empty($errors)) {
              $this->addAddressCheckout($type);
              $this->{"show_{$type}_address_form"} = false;
          }
      }
code: protected function submitAddAddressCheckout()
      {
          $type = $this->getPosted('save_address', '', true, 'string');
  
          if (empty($type)) {
              return null;
          }
  
          $errors = $this->validateAddressCheckout($type);
  
          if (empty($errors)) {
              $this->addAddressCheckout($type);
              $this->{"show_{$type}_address_form"} = false;
          }
      }
code_tokens: protected function submitAddAddressCheckout ( ) { $ type = $ this -> getPosted ( 'save_address' , '' , true , 'string' ) ; if ( empty ( $ type ) ) { return null ; } $ errors = $ this -> validateAddressCheckout ( $ type ) ; if ( empty ( $ errors ) ) { $ this -> addAddressCheckout ( $ type ) ; $ this -> { "show_{$type}_address_form" } = false ; } }
docstring: Saves a submitted address
docstring_tokens: Saves a submitted address