@@ -126,7 +126,7 @@ |
||
| 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 | } |
@@ -118,7 +118,9 @@ |
||
| 118 | 118 | if (is_object($data)) { |
| 119 | 119 | $object = new \stdClass(); |
| 120 | 120 | foreach (get_object_vars($data) as $key => $value) { |
| 121 | - if (in_array($key, $excludedKeys)) continue; |
|
| 121 | + if (in_array($key, $excludedKeys)) { |
|
| 122 | + continue; |
|
| 123 | + } |
|
| 122 | 124 | $object->$key = $this->excludeKeys($value, $excludedKeys); |
| 123 | 125 | } |
| 124 | 126 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function includes($json, array $options = []) |
| 35 | 35 | { |
| 36 | - return $this->matcher->includes($json, $this->negativeMatch($options));; |
|
| 36 | + return $this->matcher->includes($json, $this->negativeMatch($options)); ; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | private function negativeMatch(array $options = []) { |
@@ -102,11 +102,11 @@ |
||
| 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 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require __DIR__ . '/vendor/autoload.php'; |
|
| 3 | +require __DIR__.'/vendor/autoload.php'; |
|
| 4 | 4 | |
| 5 | 5 | use function Fesor\JsonMatcher\{json}; |
| 6 | 6 | |