original_string: public static function cleanFields($fields)
      {
          $fields = parent::cleanFields($fields);
  
          //If config is requested add id and type as they are need to pull config.
          if (in_array('config', $fields)) {
              $fields[] = 'id';
              $fields[] = 'type';
          }
  
          //Removing config from field list as it is not a real column in the table.
          if (in_array('config', $fields)) {
              $key = array_keys($fields, 'config');
              unset($fields[$key[0]]);
          }
  
          return $fields;
      }
code: public static function cleanFields($fields)
      {
          $fields = parent::cleanFields($fields);
  
          //If config is requested add id and type as they are need to pull config.
          if (in_array('config', $fields)) {
              $fields[] = 'id';
              $fields[] = 'type';
          }
  
          //Removing config from field list as it is not a real column in the table.
          if (in_array('config', $fields)) {
              $key = array_keys($fields, 'config');
              unset($fields[$key[0]]);
          }
  
          return $fields;
      }
code_tokens: public static function cleanFields ( $ fields ) { $ fields = parent :: cleanFields ( $ fields ) ; //If config is requested add id and type as they are need to pull config. if ( in_array ( 'config' , $ fields ) ) { $ fields [ ] = 'id' ; $ fields [ ] = 'type' ; } //Removing config from field list as it is not a real column in the table. if ( in_array ( 'config' , $ fields ) ) { $ key = array_keys ( $ fields , 'config' ) ; unset ( $ fields [ $ key [ 0 ] ] ) ; } return $ fields ; }
docstring: Removes 'config' from field list if supplied as it chokes the model.
  
  @param mixed $fields
  
  @return array
docstring_tokens: Removes config from field list if supplied as it chokes the model .