@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Get the services provided by the provider. |
| 49 | 49 | * |
| 50 | - * @return array |
|
| 50 | + * @return string[] |
|
| 51 | 51 | */ |
| 52 | 52 | public function provides() |
| 53 | 53 | { |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function boot() |
| 25 | 25 | { |
| 26 | 26 | $this->publishes([ |
| 27 | - __DIR__.'/../../config/api.php' => config_path('api.php'), |
|
| 27 | + __DIR__ . '/../../config/api.php' => config_path('api.php'), |
|
| 28 | 28 | ]); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | public function register() |
| 35 | 35 | { |
| 36 | 36 | // Register the 'Api' class using the container so that we can resolve it accordingly. |
| 37 | - $this->app['vinelab.api'] = $this->app->share(function () { |
|
| 37 | + $this->app['vinelab.api'] = $this->app->share(function() { |
|
| 38 | 38 | return $this->app->make('Vinelab\Api\Api'); |
| 39 | 39 | }); |
| 40 | 40 | // Shortcut so developers don't need to add an alias in app/config/app.php |
| 41 | - $this->app->booting(function () { |
|
| 41 | + $this->app->booting(function() { |
|
| 42 | 42 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
| 43 | 43 | $loader->alias('Api', 'Vinelab\Api\ApiFacadeAccessor'); |
| 44 | 44 | }); |
@@ -21,9 +21,9 @@ |
||
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @param $response |
| 24 | - * @param $status |
|
| 24 | + * @param integer $status |
|
| 25 | 25 | * @param $headers |
| 26 | - * @param $options |
|
| 26 | + * @param integer $options |
|
| 27 | 27 | * |
| 28 | 28 | * @return $this|\Illuminate\Http\JsonResponse |
| 29 | 29 | */ |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | private function resolveMapperClassName($classname) |
| 172 | 172 | { |
| 173 | - return App::make($this->getMapperNamespace().$classname); |
|
| 173 | + return App::make($this->getMapperNamespace() . $classname); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | public function getMaximumLimit() |
| 247 | 247 | { |
| 248 | 248 | // get the default limit value of results per request from the config file |
| 249 | - return (int) $this->limit; |
|
| 249 | + return (int)$this->limit; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | /** |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $limit = $this->getMaximumLimit(); |
| 265 | 265 | |
| 266 | 266 | // check if limit value exceed the allowed predefined default limit value |
| 267 | - return ($request_limit <= $limit) ? (int) $request_limit : (int) $limit; |
|
| 267 | + return ($request_limit <= $limit) ? (int)$request_limit : (int)$limit; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | public function setLimit($limit) |
| 276 | 276 | { |
| 277 | - $this->limit = (int) $limit; |
|
| 277 | + $this->limit = (int)$limit; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /** |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | } // if not Exception or RuntimeException or a string then throw and API exception |
| 48 | 48 | else { |
| 49 | 49 | throw new ApiException('Argument 1 passed Vinelab\Api\ErrorHandler::handle() must be an instance of |
| 50 | - Exception or RuntimeException or a string, '.get_class($exception).' is given.'); |
|
| 50 | + Exception or RuntimeException or a string, '.get_class($exception) . ' is given.'); |
|
| 51 | 51 | } |
| 52 | 52 | $response = [ |
| 53 | 53 | 'status' => $status, |