From 0e1a0a16311d9070ac092c18f95bab3bfa803d7b Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Tue, 19 Jun 2018 00:09:47 -0700 Subject: [PATCH] Clean up --- src/Curl/Curl.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 55c9a01..67435f3 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -961,10 +961,7 @@ class Curl */ public function setJsonDecoder($mixed) { - if ($mixed === false) { - $this->jsonDecoder = false; - $this->jsonDecoderArgs = array(); - } elseif (is_callable($mixed)) { + if ($mixed === false || is_callable($mixed)) { $this->jsonDecoder = $mixed; $this->jsonDecoderArgs = array(); } @@ -978,10 +975,7 @@ class Curl */ public function setXmlDecoder($mixed) { - if ($mixed === false) { - $this->xmlDecoder = false; - $this->xmlDecoderArgs = array(); - } elseif (is_callable($mixed)) { + if ($mixed === false || is_callable($mixed)) { $this->xmlDecoder = $mixed; $this->xmlDecoderArgs = array(); }