Completed
Push — master ( c1d6b3...c06cd7 )
by Viacheslav
01:46
created
src/JsonProcessor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 && !is_int($key)
23 23
                 && false === filter_var($key, FILTER_VALIDATE_INT)
24 24
             ) {
25
-                $key = (string)$key;
25
+                $key = (string) $key;
26 26
                 $ref = new \stdClass();
27 27
                 $ref = &$ref->{$key};
28 28
             } else {
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
         if (array_key_exists($key, $a)) {
38 38
             return true;
39 39
         }
40
-        $key = (string)$key;
40
+        $key = (string) $key;
41 41
         foreach ($a as $k => $v) {
42
-            if ((string)$k === $key) {
42
+            if ((string) $k === $key) {
43 43
                 return true;
44 44
             }
45 45
         }
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
     private static function arrayGet($key, array $a)
50 50
     {
51
-        $key = (string)$key;
51
+        $key = (string) $key;
52 52
         foreach ($a as $k => $v) {
53
-            if ((string)$k === $key) {
53
+            if ((string) $k === $key) {
54 54
                 return $v;
55 55
             }
56 56
         }
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
         while (null !== $key = array_shift($pathItems)) {
69 69
             $key = urldecode($key);
70 70
             if ($ref instanceof \stdClass) {
71
-                $vars = (array)$ref;
71
+                $vars = (array) $ref;
72 72
                 if (self::arrayKeyExists($key, $vars)) {
73 73
                     $ref = self::arrayGet($key, $vars);
74 74
                 } else {
75
-                    throw new Exception('Key not found: ' . $key);
75
+                    throw new Exception('Key not found: '.$key);
76 76
                 }
77 77
             } else {
78 78
                 if (self::arrayKeyExists($key, $ref)) {
79 79
                     $ref = $ref[$key];
80 80
                 } else {
81
-                    throw new Exception('Key not found: ' . $key);
81
+                    throw new Exception('Key not found: '.$key);
82 82
                 }
83 83
             }
84 84
         }
@@ -100,13 +100,13 @@  discard block
 block discarded – undo
100 100
                 if (property_exists($ref, $key)) {
101 101
                     $ref = &$ref->$key;
102 102
                 } else {
103
-                    throw new Exception('Key not found: ' . $key);
103
+                    throw new Exception('Key not found: '.$key);
104 104
                 }
105 105
             } else {
106 106
                 if (array_key_exists($key, $ref)) {
107 107
                     $ref = &$ref[$key];
108 108
                 } else {
109
-                    throw new Exception('Key not found: ' . $key);
109
+                    throw new Exception('Key not found: '.$key);
110 110
                 }
111 111
             }
112 112
         }
Please login to merge, or discard this patch.