original_string: public function selectAllExcept($table, array $excludedFields, $overwrite = false)
      {
          if ($table instanceof Association) {
              $table = $table->getTarget();
          }
  
          if (!($table instanceof Table)) {
              throw new \InvalidArgumentException('You must provide either an Association or a Table object');
          }
  
          $fields = array_diff($table->getSchema()->columns(), $excludedFields);
          $aliasedFields = $this->aliasFields($fields);
  
          return $this->select($aliasedFields, $overwrite);
      }
code: public function selectAllExcept($table, array $excludedFields, $overwrite = false)
      {
          if ($table instanceof Association) {
              $table = $table->getTarget();
          }
  
          if (!($table instanceof Table)) {
              throw new \InvalidArgumentException('You must provide either an Association or a Table object');
          }
  
          $fields = array_diff($table->getSchema()->columns(), $excludedFields);
          $aliasedFields = $this->aliasFields($fields);
  
          return $this->select($aliasedFields, $overwrite);
      }
code_tokens: public function selectAllExcept ( $ table , array $ excludedFields , $ overwrite = false ) { if ( $ table instanceof Association ) { $ table = $ table -> getTarget ( ) ; } if ( ! ( $ table instanceof Table ) ) { throw new \ InvalidArgumentException ( 'You must provide either an Association or a Table object' ) ; } $ fields = array_diff ( $ table -> getSchema ( ) -> columns ( ) , $ excludedFields ) ; $ aliasedFields = $ this -> aliasFields ( $ fields ) ; return $ this -> select ( $ aliasedFields , $ overwrite ) ; }
docstring: All the fields associated with the passed table except the excluded
  fields will be added to the select clause of the query. Passed excluded fields should not be aliased.
  After the first call to this method, a second call cannot be used to remove fields that have already
  been added to the query by the first. If you need to change the list after the first call,
  pass overwrite boolean true which will reset the select clause removing all previous additions.
  
  
  
  @param \Cake\ORM\Table|\Cake\ORM\Association $table The table to use to get an array of columns
  @param array $excludedFields The un-aliased column names you do not want selected from $table
  @param bool $overwrite Whether to reset/remove previous selected fields
  @return Query
  @throws \InvalidArgumentException If Association|Table is not passed in first argument
docstring_tokens: All the fields associated with the passed table except the excluded fields will be added to the select clause of the query . Passed excluded fields should not be aliased . After the first call to this method a second call cannot be used to remove fields that have already been added to the query by the first . If you need to change the list after the first call pass overwrite boolean true which will reset the select clause removing all previous additions .