Passed
Branch master (c4513b)
by Harry
03:23
created
src/functions.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
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+
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
     if (JSON_ERROR_NONE !== json_last_error()) {
52 52
         $last = json_last_error();
53 53
         throw new InvalidArgumentException(
54
-             'Unable to parse JSON data: '
55
-             . (isset($jsonErrors[$last])
54
+                'Unable to parse JSON data: '
55
+                . (isset($jsonErrors[$last])
56 56
                  ? $jsonErrors[$last]
57 57
                  : 'Unknown error')
58
-         );
58
+            );
59 59
     }
60 60
 
61 61
     return $data;
Please login to merge, or discard this patch.