protected function convertBools($candidate) { if (is_bool($candidate)) { return $candidate ? "true" : "false"; } return $candidate; }