@@ -92,7 +92,7 @@ |
||
92 | 92 | * @param string $id |
93 | 93 | * @param string $p |
94 | 94 | * @param int $deleted |
95 | - * @param array $filter |
|
95 | + * @param Parameter\JSON $filter |
|
96 | 96 | * @param array $attributes |
97 | 97 | * @return Response |
98 | 98 | */ |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * Initialize |
19 | 19 | * |
20 | - * @param ReflectionParameter $param |
|
20 | + * @param \ReflectionParameter $param |
|
21 | 21 | * @param string $value |
22 | 22 | * @return void |
23 | 23 | */ |
@@ -24,17 +24,17 @@ |
||
24 | 24 | public function __construct(\ReflectionParameter $param, $value) |
25 | 25 | { |
26 | 26 | if(is_array($value)) { |
27 | - $data = $value; |
|
27 | + $data = $value; |
|
28 | 28 | } else { |
29 | - if(!is_string($value)) { |
|
29 | + if(!is_string($value)) { |
|
30 | 30 | throw new Exception\InvalidArgument('Parameter '.$param->name.' expects a json string. ' . gettype($value).' given.'); |
31 | - } |
|
31 | + } |
|
32 | 32 | |
33 | - $data = json_decode($value); |
|
33 | + $data = json_decode($value); |
|
34 | 34 | |
35 | - if($data === null) { |
|
36 | - throw new Exception\InvalidArgument('Parameter '.$param->name.' expects a valid json string. ' . json_last_error_msg()); |
|
37 | - } |
|
35 | + if($data === null) { |
|
36 | + throw new Exception\InvalidArgument('Parameter '.$param->name.' expects a valid json string. ' . json_last_error_msg()); |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | return call_user_func_array(array('parent', __FUNCTION__), [$data]); |