original_string: protected function addCity()
      {
          $this->controlAccess('city_add');
  
          if ($this->city->add($this->getSubmitted())) {
              $url = "admin/settings/cities/{$this->data_country['code']}/{$this->data_state['state_id']}";
              $this->redirect($url, $this->text('City has been added'), 'success');
          }
  
          $this->redirect('', $this->text('City has not been added'), 'warning');
      }
code: protected function addCity()
      {
          $this->controlAccess('city_add');
  
          if ($this->city->add($this->getSubmitted())) {
              $url = "admin/settings/cities/{$this->data_country['code']}/{$this->data_state['state_id']}";
              $this->redirect($url, $this->text('City has been added'), 'success');
          }
  
          $this->redirect('', $this->text('City has not been added'), 'warning');
      }
code_tokens: protected function addCity ( ) { $ this -> controlAccess ( 'city_add' ) ; if ( $ this -> city -> add ( $ this -> getSubmitted ( ) ) ) { $ url = "admin/settings/cities/{$this->data_country['code']}/{$this->data_state['state_id']}" ; $ this -> redirect ( $ url , $ this -> text ( 'City has been added' ) , 'success' ) ; } $ this -> redirect ( '' , $ this -> text ( 'City has not been added' ) , 'warning' ) ; }
docstring: Adds a new city
docstring_tokens: Adds a new city