Skip to content

Commit b194605

Browse files
walmslesthilanga
authored andcommitted
Style CI fixes (dingo#1440)
* Minor code style fixes * Apply fixes from StyleCI
1 parent 43b13d0 commit b194605

File tree

17 files changed

+56
-56
lines changed

17 files changed

+56
-56
lines changed

src/Auth/Provider/Basic.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Dingo\Api\Auth\Provider;
44

5-
use Illuminate\Http\Request;
65
use Dingo\Api\Routing\Route;
6+
use Illuminate\Http\Request;
77
use Illuminate\Auth\AuthManager;
88
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
99

@@ -27,7 +27,7 @@ class Basic extends Authorization
2727
* Create a new basic provider instance.
2828
*
2929
* @param \Illuminate\Auth\AuthManager $auth
30-
* @param string $identifier
30+
* @param string $identifier
3131
*
3232
* @return void
3333
*/

src/Auth/Provider/JWT.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Exception;
66
use Tymon\JWTAuth\JWTAuth;
7-
use Illuminate\Http\Request;
87
use Dingo\Api\Routing\Route;
8+
use Illuminate\Http\Request;
99
use Tymon\JWTAuth\Exceptions\JWTException;
1010
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
1111

src/Auth/Provider/OAuth2.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace Dingo\Api\Auth\Provider;
44

55
use Exception;
6-
use Illuminate\Http\Request;
76
use Dingo\Api\Routing\Route;
7+
use Illuminate\Http\Request;
88
use League\OAuth2\Server\ResourceServer;
99
use League\OAuth2\Server\Entity\AccessTokenEntity;
1010
use League\OAuth2\Server\Exception\OAuthException;
@@ -45,7 +45,7 @@ class OAuth2 extends Authorization
4545
* Create a new OAuth 2.0 provider instance.
4646
*
4747
* @param \League\OAuth2\Server\ResourceServer $resource
48-
* @param bool $httpHeadersOnly
48+
* @param bool $httpHeadersOnly
4949
*
5050
* @return void
5151
*/
@@ -115,7 +115,7 @@ protected function resolveResourceOwner(AccessTokenEntity $token)
115115
* Validate a route has any scopes.
116116
*
117117
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token
118-
* @param \Dingo\Api\Routing\Route $route
118+
* @param \Dingo\Api\Routing\Route $route
119119
*
120120
* @throws \League\OAuth2\Server\Exception\InvalidScopeException
121121
*
@@ -142,7 +142,7 @@ protected function validateAnyRouteScopes(AccessTokenEntity $token, Route $route
142142
* Validate a route has all scopes.
143143
*
144144
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $token
145-
* @param \Dingo\Api\Routing\Route $route
145+
* @param \Dingo\Api\Routing\Route $route
146146
*
147147
* @throws \League\OAuth2\Server\Exception\InvalidScopeException
148148
*

src/Contract/Auth/Provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Dingo\Api\Contract\Auth;
44

5-
use Illuminate\Http\Request;
65
use Dingo\Api\Routing\Route;
6+
use Illuminate\Http\Request;
77

88
interface Provider
99
{

src/Dispatcher.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Dingo\Api\Auth\Auth;
66
use Dingo\Api\Routing\Router;
7-
use Illuminate\Container\Container;
87
use Dingo\Api\Http\InternalRequest;
8+
use Illuminate\Container\Container;
99
use Illuminate\Filesystem\Filesystem;
1010
use Symfony\Component\HttpFoundation\Cookie;
1111
use Dingo\Api\Exception\InternalHttpException;
@@ -165,10 +165,10 @@ class Dispatcher
165165
/**
166166
* Create a new dispatcher instance.
167167
*
168-
* @param \Illuminate\Container\Container $container
168+
* @param \Illuminate\Container\Container $container
169169
* @param \Illuminate\Filesystem\Filesystem $files
170-
* @param \Dingo\Api\Routing\Router $router
171-
* @param \Dingo\Api\Auth\Auth $auth
170+
* @param \Dingo\Api\Routing\Router $router
171+
* @param \Dingo\Api\Auth\Auth $auth
172172
*
173173
* @return void
174174
*/
@@ -348,7 +348,7 @@ public function cookie(Cookie $cookie)
348348
/**
349349
* Perform API GET request.
350350
*
351-
* @param string $uri
351+
* @param string $uri
352352
* @param string|array $parameters
353353
*
354354
* @return mixed
@@ -361,9 +361,9 @@ public function get($uri, $parameters = [])
361361
/**
362362
* Perform API POST request.
363363
*
364-
* @param string $uri
364+
* @param string $uri
365365
* @param string|array $parameters
366-
* @param string $content
366+
* @param string $content
367367
*
368368
* @return mixed
369369
*/
@@ -375,9 +375,9 @@ public function post($uri, $parameters = [], $content = '')
375375
/**
376376
* Perform API PUT request.
377377
*
378-
* @param string $uri
378+
* @param string $uri
379379
* @param string|array $parameters
380-
* @param string $content
380+
* @param string $content
381381
*
382382
* @return mixed
383383
*/
@@ -389,9 +389,9 @@ public function put($uri, $parameters = [], $content = '')
389389
/**
390390
* Perform API PATCH request.
391391
*
392-
* @param string $uri
392+
* @param string $uri
393393
* @param string|array $parameters
394-
* @param string $content
394+
* @param string $content
395395
*
396396
* @return mixed
397397
*/
@@ -403,9 +403,9 @@ public function patch($uri, $parameters = [], $content = '')
403403
/**
404404
* Perform API DELETE request.
405405
*
406-
* @param string $uri
406+
* @param string $uri
407407
* @param string|array $parameters
408-
* @param string $content
408+
* @param string $content
409409
*
410410
* @return mixed
411411
*/
@@ -417,10 +417,10 @@ public function delete($uri, $parameters = [], $content = '')
417417
/**
418418
* Queue up and dispatch a new request.
419419
*
420-
* @param string $verb
421-
* @param string $uri
420+
* @param string $verb
421+
* @param string $uri
422422
* @param string|array $parameters
423-
* @param string $content
423+
* @param string $content
424424
*
425425
* @return mixed
426426
*/
@@ -448,8 +448,8 @@ protected function queueRequest($verb, $uri, $parameters, $content = '')
448448
/**
449449
* Create a new internal request from an HTTP verb and URI.
450450
*
451-
* @param string $verb
452-
* @param string $uri
451+
* @param string $verb
452+
* @param string $uri
453453
* @param string|array $parameters
454454
*
455455
* @return \Dingo\Api\Http\InternalRequest

src/Http/RateLimit/Handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ public function rateLimitRequest(Request $request, $limit = 0, $expires = 0)
9797
$this->setRateLimiter([$this->throttle, 'getRateLimiter']);
9898
}
9999

100-
// If the developer specified a certain amount of requests or expiration
100+
// If the developer specified a certain amount of requests or expiration
101101
// time on a specific route then we'll always use the route specific
102102
// throttle with the given values.
103103
} elseif ($limit > 0 || $expires > 0) {
104104
$this->throttle = new Route(['limit' => $limit, 'expires' => $expires]);
105105

106106
$this->keyPrefix = sha1($request->path());
107107

108-
// Otherwise we'll use the throttle that gives the consumer the largest
108+
// Otherwise we'll use the throttle that gives the consumer the largest
109109
// amount of requests. If no matching throttle is found then rate
110110
// limiting will not be imposed for the request.
111111
} else {

src/Http/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
use Illuminate\Contracts\Support\Arrayable;
1212
use Illuminate\Http\Response as IlluminateResponse;
1313
use Illuminate\Events\Dispatcher as EventDispatcher;
14-
use Illuminate\Database\Eloquent\Model as EloquentModel;
1514
use Dingo\Api\Transformer\Factory as TransformerFactory;
15+
use Illuminate\Database\Eloquent\Model as EloquentModel;
1616
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
1717
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
1818

src/Http/Response/Factory.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use Illuminate\Support\Str;
88
use Dingo\Api\Http\Response;
99
use Illuminate\Support\Collection;
10-
use Dingo\Api\Transformer\Factory as TransformerFactory;
1110
use Illuminate\Contracts\Pagination\Paginator;
11+
use Dingo\Api\Transformer\Factory as TransformerFactory;
1212
use Symfony\Component\HttpKernel\Exception\HttpException;
1313

1414
class Factory
@@ -55,7 +55,7 @@ public function created($location = null, $content = null)
5555
* Respond with an accepted response and associate a location and/or content if provided.
5656
*
5757
* @param null|string $location
58-
* @param mixed $content
58+
* @param mixed $content
5959
*
6060
* @return \Dingo\Api\Http\Response
6161
*/
@@ -87,9 +87,9 @@ public function noContent()
8787
* Bind a collection to a transformer and start building a response.
8888
*
8989
* @param \Illuminate\Support\Collection $collection
90-
* @param object $transformer
91-
* @param array|\Closure $parameters
92-
* @param \Closure|null $after
90+
* @param object $transformer
91+
* @param array|\Closure $parameters
92+
* @param \Closure|null $after
9393
*
9494
* @return \Dingo\Api\Http\Response
9595
*/
@@ -114,9 +114,9 @@ public function collection(Collection $collection, $transformer, $parameters = [
114114
/**
115115
* Bind an item to a transformer and start building a response.
116116
*
117-
* @param object $item
118-
* @param object $transformer
119-
* @param array $parameters
117+
* @param object $item
118+
* @param object $transformer
119+
* @param array $parameters
120120
* @param \Closure $after
121121
*
122122
* @return \Dingo\Api\Http\Response
@@ -139,9 +139,9 @@ public function item($item, $transformer, $parameters = [], Closure $after = nul
139139
* Bind a paginator to a transformer and start building a response.
140140
*
141141
* @param \Illuminate\Contracts\Pagination\Paginator $paginator
142-
* @param object $transformer
143-
* @param array $parameters
144-
* @param \Closure $after
142+
* @param object $transformer
143+
* @param array $parameters
144+
* @param \Closure $after
145145
*
146146
* @return \Dingo\Api\Http\Response
147147
*/
@@ -162,7 +162,7 @@ public function paginator(Paginator $paginator, $transformer, array $parameters
162162
* Return an error response.
163163
*
164164
* @param string $message
165-
* @param int $statusCode
165+
* @param int $statusCode
166166
*
167167
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
168168
*
@@ -261,7 +261,7 @@ public function errorMethodNotAllowed($message = 'Method Not Allowed')
261261
* Call magic methods beginning with "with".
262262
*
263263
* @param string $method
264-
* @param array $parameters
264+
* @param array $parameters
265265
*
266266
* @throws \ErrorException
267267
*
@@ -272,9 +272,9 @@ public function __call($method, $parameters)
272272
if (Str::startsWith($method, 'with')) {
273273
return call_user_func_array([$this, Str::camel(substr($method, 4))], $parameters);
274274

275-
// Because PHP won't let us name the method "array" we'll simply watch for it
276-
// in here and return the new binding. Gross. This is now DEPRECATED and
277-
// should not be used. Just return an array or a new response instance.
275+
// Because PHP won't let us name the method "array" we'll simply watch for it
276+
// in here and return the new binding. Gross. This is now DEPRECATED and
277+
// should not be used. Just return an array or a new response instance.
278278
} elseif ($method == 'array') {
279279
return new Response($parameters[0]);
280280
}

src/Provider/HttpServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Dingo\Api\Auth\Auth;
66
use Dingo\Api\Routing\Router;
7-
use Dingo\Api\Http\Validation;
87
use Dingo\Api\Http\Middleware;
8+
use Dingo\Api\Http\Validation;
99
use Dingo\Api\Transformer\Factory;
1010
use Dingo\Api\Http\RequestValidator;
1111
use Dingo\Api\Http\RateLimit\Handler;

src/Routing/Adapter/Lumen.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use FastRoute\Dispatcher;
88
use FastRoute\RouteParser;
99
use Illuminate\Support\Str;
10-
use Illuminate\Http\Request;
1110
use FastRoute\DataGenerator;
11+
use Illuminate\Http\Request;
1212
use FastRoute\RouteCollector;
1313
use Laravel\Lumen\Application;
1414
use Dingo\Api\Contract\Routing\Adapter;

0 commit comments

Comments
 (0)