Completed
Pull Request — master (#16)
by Sergey
03:53
created
src/Helper/JsonHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
         }
127 127
 
128 128
         if (is_array($data)) {
129
-            return array_map(function ($data) use ($excludedKeys) {
129
+            return array_map(function($data) use ($excludedKeys) {
130 130
                 return $this->excludeKeys($data, $excludedKeys);
131 131
             }, $data);
132 132
         }
Please login to merge, or discard this patch.
src/JsonMatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,11 +102,11 @@
 block discarded – undo
102 102
     {
103 103
         // get base path
104 104
         $basePath = $this->getPath($options);
105
-        $path = ltrim($basePath . '/' . $path, '/');
105
+        $path = ltrim($basePath.'/'.$path, '/');
106 106
         $pathExists = true;
107 107
         try {
108 108
             $this->jsonHelper->parse($this->subject, $path);
109
-        } catch(MissingPathException $e){
109
+        } catch (MissingPathException $e) {
110 110
             $pathExists = false;
111 111
 
112 112
         }
Please login to merge, or discard this patch.
src/JsonSchema/JsonSchemaGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         }
25 25
 
26 26
         if (isset($definition['oneOf'])) {
27
-            $definition['oneOf'] = array_map(function ($type) {
27
+            $definition['oneOf'] = array_map(function($type) {
28 28
                 return $this->processTypeDeclaration($type);
29 29
             }, $definition['oneOf']);
30 30
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $obj['properties'] = $this->expandProperties($obj['properties']);
68 68
         // todo: support pattern properties
69
-        $obj['required'] = array_keys(array_filter($obj['properties'], function ($type) {
69
+        $obj['required'] = array_keys(array_filter($obj['properties'], function($type) {
70 70
             return array_key_exists('_required', $type) ? $type['_required'] : true;
71 71
         }));
72 72
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     private function stripInternalRequiredKey(array $type)
97 97
     {
98 98
         if ('object' === $type['type']) {
99
-            $type['properties'] = array_map(function ($type) {
99
+            $type['properties'] = array_map(function($type) {
100 100
                 return $this->stripInternalRequiredKey($type);
101 101
             }, $type['properties']);
102 102
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         foreach ($rpn as $token) {
121 121
             switch ($token) {
122 122
                 case '|':
123
-                    $operands = [array_pop($stack), array_pop($stack)];;
123
+                    $operands = [array_pop($stack), array_pop($stack)]; ;
124 124
                     if (isset($operands[0]['oneOf'])) {
125 125
                         $operands[0]['oneOf'][] = $operands[1];
126 126
                         $union = $operands[0];
Please login to merge, or discard this patch.