@@ -21,7 +21,6 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * Create a new instance. |
23 | 23 | * |
24 | - * @param array|Option $attributes |
|
25 | 24 | * @return void |
26 | 25 | */ |
27 | 26 | public function __construct(Option $options) |
@@ -119,7 +118,7 @@ discard block |
||
119 | 118 | } |
120 | 119 | |
121 | 120 | /** |
122 | - * @param array $options |
|
121 | + * @param Option $options |
|
123 | 122 | */ |
124 | 123 | protected function parse($options): void |
125 | 124 | { |
@@ -152,7 +151,7 @@ discard block |
||
152 | 151 | } |
153 | 152 | |
154 | 153 | /** |
155 | - * @return mixed |
|
154 | + * @return Attribute |
|
156 | 155 | */ |
157 | 156 | public function instance() |
158 | 157 | { |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace ArinaSystems\JsonResponse; |
4 | 4 | |
5 | +use ArinaSystems\JsonResponse\Option; |
|
5 | 6 | use Illuminate\Support\Arr; |
6 | 7 | use InvalidArgumentException; |
7 | -use ArinaSystems\JsonResponse\Option; |
|
8 | 8 | |
9 | 9 | class Attribute |
10 | 10 | { |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace ArinaSystems\JsonResponse\Attribute\Builders; |
4 | 4 | |
5 | -use Illuminate\Container\Container; |
|
6 | -use ArinaSystems\JsonResponse\Option; |
|
7 | 5 | use ArinaSystems\JsonResponse\Attribute; |
6 | +use ArinaSystems\JsonResponse\Option; |
|
7 | +use Illuminate\Container\Container; |
|
8 | 8 | |
9 | 9 | abstract class Builder |
10 | 10 | { |
@@ -103,7 +103,7 @@ |
||
103 | 103 | /** |
104 | 104 | * Get the current instance of json response options. |
105 | 105 | * |
106 | - * @return mixed |
|
106 | + * @return Option |
|
107 | 107 | */ |
108 | 108 | public function instance(): self |
109 | 109 | { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Check if an status is exist in the array. |
72 | 72 | * |
73 | - * @param array $key |
|
73 | + * @param string $key |
|
74 | 74 | * @return bool |
75 | 75 | */ |
76 | 76 | public function has($key) |
@@ -92,6 +92,7 @@ discard block |
||
92 | 92 | /** |
93 | 93 | * Call the response status. |
94 | 94 | * |
95 | + * @param JsonResponse $builder |
|
95 | 96 | * @return array |
96 | 97 | */ |
97 | 98 | public function call(string $status, $builder) |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace ArinaSystems\JsonResponse\Tests; |
4 | 4 | |
5 | -use Illuminate\Support\Facades\Config; |
|
6 | 5 | use ArinaSystems\JsonResponse\Option; |
6 | +use Illuminate\Support\Facades\Config; |
|
7 | 7 | |
8 | 8 | class OptionTest extends TestCase |
9 | 9 | { |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace ArinaSystems\JsonResponse\Attribute\Builders; |
4 | 4 | |
5 | -use Throwable; |
|
5 | +use ArinaSystems\JsonResponse\Facades\JsonResponse; |
|
6 | 6 | use Illuminate\Auth\AuthenticationException; |
7 | 7 | use Illuminate\Validation\ValidationException; |
8 | -use ArinaSystems\JsonResponse\Facades\JsonResponse; |
|
9 | 8 | use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; |
9 | +use Throwable; |
|
10 | 10 | |
11 | 11 | class ExceptionAttributeBuilder extends Builder |
12 | 12 | { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Create a new instance. |
28 | 28 | * |
29 | - * @param \ArinaSystems\JsonResponse\Option|array|string $options |
|
29 | + * @param Option $options |
|
30 | 30 | * @return void |
31 | 31 | */ |
32 | 32 | public function __construct(Option $options, Attribute $attributes, Status $status) |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @param string|array|null $key |
109 | 109 | * @param mixed|null $default |
110 | - * @return \ArinaSystems\JsonResponse\Option|mixed |
|
110 | + * @return integer |
|
111 | 111 | */ |
112 | 112 | public function options($key = null, $default = null) |
113 | 113 | { |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * Set json response attributes. |
165 | 165 | * |
166 | 166 | * @param \ArinaSystems\JsonResponse\Attribute|array|string $attributes |
167 | - * @param null|mixed $value |
|
167 | + * @param \Throwable $value |
|
168 | 168 | * @return self |
169 | 169 | */ |
170 | 170 | public function setAttributes($attributes, $value = null) |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | /** |
217 | 217 | * Get the current instance of json response builder. |
218 | 218 | * |
219 | - * @return ArinaSystems\JsonResponse\JsonResponse |
|
219 | + * @return JsonResponse |
|
220 | 220 | */ |
221 | 221 | public function instance(): self |
222 | 222 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace ArinaSystems\JsonResponse\Traits; |
4 | 4 | |
5 | -use Throwable; |
|
6 | 5 | use ArinaSystems\JsonResponse\Facades\JsonResponse; |
6 | +use Throwable; |
|
7 | 7 | |
8 | 8 | trait JsonHandler |
9 | 9 | { |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace ArinaSystems\JsonResponse\Tests; |
4 | 4 | |
5 | +use ArinaSystems\JsonResponse\Facades\JsonResponse; |
|
6 | +use ArinaSystems\JsonResponse\Facades\Option; |
|
5 | 7 | use Exception; |
6 | 8 | use Illuminate\Support\Facades\Config; |
7 | -use ArinaSystems\JsonResponse\Facades\Option; |
|
8 | -use ArinaSystems\JsonResponse\Facades\JsonResponse; |
|
9 | 9 | |
10 | 10 | class JsonResponseTest extends TestCase |
11 | 11 | { |