Use an `array` typehint instead of this conditional check:  
`public function setData(array $data, $fields = array())`