From 05ede8f26fbd3ddc71f17966dcbc3a7601c2384a Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Mon, 12 Dec 2022 05:54:12 -0800 Subject: [PATCH] Clean up --- src/Curl/Curl.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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'; - } } }