We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ed09f commit 05ede8fCopy full SHA for 05ede8f
src/Curl/Curl.php
@@ -1022,14 +1022,12 @@ public function setDefaultDecoder($mixed = 'json')
1022
{
1023
if ($mixed === false) {
1024
$this->defaultDecoder = false;
1025
+ } elseif ($mixed === 'json') {
1026
+ $this->defaultDecoder = '\Curl\Decoder::decodeJson';
1027
+ } elseif ($mixed === 'xml') {
1028
+ $this->defaultDecoder = '\Curl\Decoder::decodeXml';
1029
} elseif (is_callable($mixed)) {
1030
$this->defaultDecoder = $mixed;
- } else {
- if ($mixed === 'json') {
- $this->defaultDecoder = '\Curl\Decoder::decodeJson';
- } elseif ($mixed === 'xml') {
1031
- $this->defaultDecoder = '\Curl\Decoder::decodeXml';
1032
- }
1033
}
1034
1035
0 commit comments