@@ -26,9 +26,9 @@ |
||
26 | 26 | */ |
27 | 27 | public function __invoke(callable $fn) |
28 | 28 | { |
29 | - return function (HttpRequestInterface $request, array $options) use ($fn) { |
|
29 | + return function(HttpRequestInterface $request, array $options) use ($fn) { |
|
30 | 30 | return $fn(call_user_func([$this, 'applyRequest'], $request, $options), $options)->then( |
31 | - function (HttpResponseInterface $response) use ($request, $options) { |
|
31 | + function(HttpResponseInterface $response) use ($request, $options) { |
|
32 | 32 | return call_user_func([$this, 'applyResponse'], $request, $response, $options); |
33 | 33 | } |
34 | 34 | ); |
@@ -38,11 +38,11 @@ |
||
38 | 38 | function json_decode($json, $assoc = false, $depth = 512, $options = 0) |
39 | 39 | { |
40 | 40 | static $jsonErrors = [ |
41 | - JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', |
|
42 | - JSON_ERROR_STATE_MISMATCH => 'JSON_ERROR_STATE_MISMATCH - Underflow or the modes mismatch', |
|
43 | - JSON_ERROR_CTRL_CHAR => 'JSON_ERROR_CTRL_CHAR - Unexpected control character found', |
|
44 | - JSON_ERROR_SYNTAX => 'JSON_ERROR_SYNTAX - Syntax error, malformed JSON', |
|
45 | - JSON_ERROR_UTF8 => 'JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded', |
|
41 | + JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', |
|
42 | + JSON_ERROR_STATE_MISMATCH => 'JSON_ERROR_STATE_MISMATCH - Underflow or the modes mismatch', |
|
43 | + JSON_ERROR_CTRL_CHAR => 'JSON_ERROR_CTRL_CHAR - Unexpected control character found', |
|
44 | + JSON_ERROR_SYNTAX => 'JSON_ERROR_SYNTAX - Syntax error, malformed JSON', |
|
45 | + JSON_ERROR_UTF8 => 'JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded', |
|
46 | 46 | ]; |
47 | 47 | |
48 | 48 | // Patched support for decoding empty strings for PHP 7+ |