original_string: protected function submitEditCity()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCity();
          } else if ($this->isPosted('save') && $this->validateEditCity()) {
              if (isset($this->data_city['city_id'])) {
                  $this->updateCity();
              } else {
                  $this->addCity();
              }
          }
      }
code: protected function submitEditCity()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCity();
          } else if ($this->isPosted('save') && $this->validateEditCity()) {
              if (isset($this->data_city['city_id'])) {
                  $this->updateCity();
              } else {
                  $this->addCity();
              }
          }
      }
code_tokens: protected function submitEditCity ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteCity ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditCity ( ) ) { if ( isset ( $ this -> data_city [ 'city_id' ] ) ) { $ this -> updateCity ( ) ; } else { $ this -> addCity ( ) ; } } }
docstring: Handles a submitted city
docstring_tokens: Handles a submitted city