original_string: protected function _normalizeFormFields($fields)
      {
          $_options = [
              'on' => 'both'
          ];
  
          $_defaults = [
              '_create' => $_options
          ];
  
          $result = [];
  
          $result['_create'] = $_defaults['_create'];
  
          foreach ($fields as $name => $options) {
              if (is_array($options)) {
                  $result[$name] = array_merge($_options, $options);
              } else {
                  $result[$options] = $_options;
              }
          }
          return $result;
      }
code: protected function _normalizeFormFields($fields)
      {
          $_options = [
              'on' => 'both'
          ];
  
          $_defaults = [
              '_create' => $_options
          ];
  
          $result = [];
  
          $result['_create'] = $_defaults['_create'];
  
          foreach ($fields as $name => $options) {
              if (is_array($options)) {
                  $result[$name] = array_merge($_options, $options);
              } else {
                  $result[$options] = $_options;
              }
          }
          return $result;
      }
code_tokens: protected function _normalizeFormFields ( $ fields ) { $ _options = [ 'on' => 'both' ] ; $ _defaults = [ '_create' => $ _options ] ; $ result = [ ] ; $ result [ '_create' ] = $ _defaults [ '_create' ] ; foreach ( $ fields as $ name => $ options ) { if ( is_array ( $ options ) ) { $ result [ $ name ] = array_merge ( $ _options , $ options ) ; } else { $ result [ $ options ] = $ _options ; } } return $ result ; }
docstring: Normalizes the formfields-array.
  
  @param array $fields Fields to normalize.
  @return array
docstring_tokens: Normalizes the formfields - array .