@@ -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 | { |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace ArinaSystems\JsonResponse\Attribute\Builders; |
| 4 | 4 | |
| 5 | +use ArinaSystems\JsonResponse\Facades\JsonResponse; |
|
| 5 | 6 | use Exception; |
| 6 | 7 | use Illuminate\Auth\AuthenticationException; |
| 7 | 8 | use Illuminate\Validation\ValidationException; |
| 8 | -use ArinaSystems\JsonResponse\Facades\JsonResponse; |
|
| 9 | 9 | use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; |
| 10 | 10 | |
| 11 | 11 | class ExceptionAttributeBuilder extends Builder |
@@ -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) |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * |
| 126 | 126 | * @param string|array|null $key |
| 127 | 127 | * @param mixed|null $default |
| 128 | - * @return \ArinaSystems\JsonResponse\Option|mixed |
|
| 128 | + * @return integer |
|
| 129 | 129 | */ |
| 130 | 130 | public function options($key = null, $default = null) |
| 131 | 131 | { |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | /** |
| 235 | 235 | * Get the current instance of json response builder. |
| 236 | 236 | * |
| 237 | - * @return ArinaSystems\JsonResponse\JsonResponse |
|
| 237 | + * @return JsonResponse |
|
| 238 | 238 | */ |
| 239 | 239 | public function instance(): self |
| 240 | 240 | { |
@@ -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,9 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace ArinaSystems\JsonResponse\Tests; |
| 4 | 4 | |
| 5 | -use ArinaSystems\JsonResponse\Code; |
|
| 6 | -use ArinaSystems\JsonResponse\Facades\Option; |
|
| 7 | 5 | use ArinaSystems\JsonResponse\Facades\JsonResponse; |
| 6 | +use ArinaSystems\JsonResponse\Facades\Option; |
|
| 8 | 7 | use Illuminate\Support\Facades\Config; |
| 9 | 8 | |
| 10 | 9 | class JsonResponseTest extends TestCase |
@@ -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,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace ArinaSystems\JsonResponse\Traits; |
| 4 | 4 | |
| 5 | -use Exception; |
|
| 6 | 5 | use ArinaSystems\JsonResponse\Facades\JsonResponse; |
| 6 | +use Exception; |
|
| 7 | 7 | |
| 8 | 8 | trait JsonHandler |
| 9 | 9 | { |