I've the following Problem, those methods of my SQLBuilder are simply the same, what can I do to reduce the code?
public function select($fields){
if(is_array($fields)){
$this->fields = implode(',', $fields);
} else {
$this->fields = $fields;
}
return $this;
}
public function from($tables){
if(is_array($tables)){
$this->tables = implode(',', $tables);
} else {
$this->tables = $tables;
}
return $this;
}