@@ -45,7 +45,7 @@ |
||
45 | 45 | json_encode($json) |
46 | 46 | ); |
47 | 47 | if ($existentialModifier !== null) { |
48 | - return $command->withExistentialModifier($existentialModifier); |
|
48 | + return $command->withExistentialModifier($existentialModifier); |
|
49 | 49 | } |
50 | 50 | return $command; |
51 | 51 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | Path $path, |
20 | 20 | string $json |
21 | 21 | ) { |
22 | - $this->arguments = [$key, $path->getPath(), $json]; |
|
22 | + $this->arguments = [$key, $path->getPath(), $json]; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function withExistentialModifier(string $existentialModifier) : CommandInterface |
@@ -16,14 +16,14 @@ |
||
16 | 16 | { |
17 | 17 | $this->arguments = $keys; |
18 | 18 | $this->arguments[] = $path->getPath(); |
19 | - $this->responseCallback = function ($result) { |
|
19 | + $this->responseCallback = function($result) { |
|
20 | 20 | return array_map('json_decode', $result); |
21 | 21 | }; |
22 | 22 | } |
23 | 23 | |
24 | 24 | public static function createCommandWithArguments(array $arguments) : CommandInterface |
25 | 25 | { |
26 | - if (count($arguments) <2) { |
|
26 | + if (count($arguments)<2) { |
|
27 | 27 | throw new InvalidNumberOfArgumentsException( |
28 | 28 | sprintf('ReJSON::mget needs at least 2 arguments!, % given', count($arguments)) |
29 | 29 | ); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | int $incrementBy |
18 | 18 | ) { |
19 | 19 | $this->arguments = [$key, $path->getPath(), $incrementBy]; |
20 | - $this->responseCallback = function ($result) { |
|
20 | + $this->responseCallback = function($result) { |
|
21 | 21 | return json_decode($result); |
22 | 22 | }; |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | int $index |
18 | 18 | ) { |
19 | 19 | $this->arguments = [$key, $path->getPath(), $index]; |
20 | - $this->responseCallback = function ($result) { |
|
20 | + $this->responseCallback = function($result) { |
|
21 | 21 | return json_decode($result); |
22 | 22 | }; |
23 | 23 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | private function __construct(string $key, Path $path) |
16 | 16 | { |
17 | - $this->arguments = [$key, $path->getPath()]; |
|
17 | + $this->arguments = [$key, $path->getPath()]; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public static function createCommandWithArguments(string $key, string $path) : CommandInterface |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | private function __construct(string $key, Path $path) |
16 | 16 | { |
17 | - $this->arguments = [$key, $path->getPath()]; |
|
17 | + $this->arguments = [$key, $path->getPath()]; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public static function createCommandWithArguments(string $key, string $path) : CommandInterface |
@@ -17,7 +17,7 @@ |
||
17 | 17 | int $incrementBy |
18 | 18 | ) { |
19 | 19 | $this->arguments = [$key, $path->getPath(), $incrementBy]; |
20 | - $this->responseCallback = function ($result) { |
|
20 | + $this->responseCallback = function($result) { |
|
21 | 21 | return json_decode($result); |
22 | 22 | }; |
23 | 23 | } |
@@ -15,12 +15,12 @@ |
||
15 | 15 | string $key, |
16 | 16 | array $paths |
17 | 17 | ) { |
18 | - $paths = array_map(function (Path $path) { |
|
18 | + $paths = array_map(function(Path $path) { |
|
19 | 19 | return $path->getPath(); |
20 | 20 | }, $paths); |
21 | 21 | $this->arguments = [$key]; |
22 | 22 | $this->arguments = array_merge($this->arguments, $paths); |
23 | - $this->responseCallback = function ($result) { |
|
23 | + $this->responseCallback = function($result) { |
|
24 | 24 | if ($result) { |
25 | 25 | return json_decode($result); |
26 | 26 | } |