Skip to content

Commit 05ede8f

Browse files
committed
Clean up
1 parent d8ed09f commit 05ede8f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Curl/Curl.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,14 +1022,12 @@ public function setDefaultDecoder($mixed = 'json')
10221022
{
10231023
if ($mixed === false) {
10241024
$this->defaultDecoder = false;
1025+
} elseif ($mixed === 'json') {
1026+
$this->defaultDecoder = '\Curl\Decoder::decodeJson';
1027+
} elseif ($mixed === 'xml') {
1028+
$this->defaultDecoder = '\Curl\Decoder::decodeXml';
10251029
} elseif (is_callable($mixed)) {
10261030
$this->defaultDecoder = $mixed;
1027-
} else {
1028-
if ($mixed === 'json') {
1029-
$this->defaultDecoder = '\Curl\Decoder::decodeJson';
1030-
} elseif ($mixed === 'xml') {
1031-
$this->defaultDecoder = '\Curl\Decoder::decodeXml';
1032-
}
10331031
}
10341032
}
10351033

0 commit comments

Comments
 (0)