original_string: protected function controlOptions()
      {
          $allowed = array();
  
          if (!empty($this->current_route['options'])) {
              foreach (array_keys($this->current_route['options']) as $options) {
                  foreach (explode(',', $options) as $option) {
                      $allowed[trim(trim($option, '-'))] = true;
                  }
              }
          }
  
          $submitted = $this->getOptions();
  
          if (!empty($submitted) && !array_intersect_key($submitted, $allowed)) {
              $this->errorAndExit($this->text('Unsupported command options'));
          }
      }
code: protected function controlOptions()
      {
          $allowed = array();
  
          if (!empty($this->current_route['options'])) {
              foreach (array_keys($this->current_route['options']) as $options) {
                  foreach (explode(',', $options) as $option) {
                      $allowed[trim(trim($option, '-'))] = true;
                  }
              }
          }
  
          $submitted = $this->getOptions();
  
          if (!empty($submitted) && !array_intersect_key($submitted, $allowed)) {
              $this->errorAndExit($this->text('Unsupported command options'));
          }
      }
code_tokens: protected function controlOptions ( ) { $ allowed = array ( ) ; if ( ! empty ( $ this -> current_route [ 'options' ] ) ) { foreach ( array_keys ( $ this -> current_route [ 'options' ] ) as $ options ) { foreach ( explode ( ',' , $ options ) as $ option ) { $ allowed [ trim ( trim ( $ option , '-' ) ) ] = true ; } } } $ submitted = $ this -> getOptions ( ) ; if ( ! empty ( $ submitted ) && ! array_intersect_key ( $ submitted , $ allowed ) ) { $ this -> errorAndExit ( $ this -> text ( 'Unsupported command options' ) ) ; } }
docstring: Controls supported command options
docstring_tokens: Controls supported command options