diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 037da9d..7430d2a 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -1022,14 +1022,12 @@ class Curl { if ($mixed === false) { $this->defaultDecoder = false; + } elseif ($mixed === 'json') { + $this->defaultDecoder = '\Curl\Decoder::decodeJson'; + } elseif ($mixed === 'xml') { + $this->defaultDecoder = '\Curl\Decoder::decodeXml'; } elseif (is_callable($mixed)) { $this->defaultDecoder = $mixed; - } else { - if ($mixed === 'json') { - $this->defaultDecoder = '\Curl\Decoder::decodeJson'; - } elseif ($mixed === 'xml') { - $this->defaultDecoder = '\Curl\Decoder::decodeXml'; - } } }