Skip to content

Commit 0aed272

Browse files
Merge pull request #11 from api-ecosystem-for-laravel/analysis-OMjxOl
Apply fixes from StyleCI
2 parents 9158a54 + b453d75 commit 0aed272

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+27
-340
lines changed

src/Auth/Auth.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class Auth
5151
* @param \Dingo\Api\Routing\Router $router
5252
* @param \Illuminate\Container\Container $container
5353
* @param array $providers
54-
*
5554
* @return void
5655
*/
5756
public function __construct(Router $router, Container $container, array $providers)
@@ -65,10 +64,9 @@ public function __construct(Router $router, Container $container, array $provide
6564
* Authenticate the current request.
6665
*
6766
* @param array $providers
67+
* @return mixed
6868
*
6969
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
70-
*
71-
* @return mixed
7270
*/
7371
public function authenticate(array $providers = [])
7472
{
@@ -100,10 +98,9 @@ public function authenticate(array $providers = [])
10098
* Throw the first exception from the exception stack.
10199
*
102100
* @param array $exceptionStack
101+
* @return void
103102
*
104103
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
105-
*
106-
* @return void
107104
*/
108105
protected function throwUnauthorizedException(array $exceptionStack)
109106
{
@@ -120,7 +117,6 @@ protected function throwUnauthorizedException(array $exceptionStack)
120117
* Filter the requested providers from the available providers.
121118
*
122119
* @param array $providers
123-
*
124120
* @return array
125121
*/
126122
protected function filterProviders(array $providers)
@@ -136,7 +132,6 @@ protected function filterProviders(array $providers)
136132
* Get the authenticated user.
137133
*
138134
* @param bool $authenticate
139-
*
140135
* @return \Illuminate\Auth\GenericUser|\Illuminate\Database\Eloquent\Model|null
141136
*/
142137
public function getUser($authenticate = true)
@@ -158,7 +153,6 @@ public function getUser($authenticate = true)
158153
* Alias for getUser.
159154
*
160155
* @param bool $authenticate
161-
*
162156
* @return \Illuminate\Auth\GenericUser|\Illuminate\Database\Eloquent\Model
163157
*/
164158
public function user($authenticate = true)
@@ -170,7 +164,6 @@ public function user($authenticate = true)
170164
* Set the authenticated user.
171165
*
172166
* @param \Illuminate\Auth\GenericUser|\Illuminate\Database\Eloquent\Model $user
173-
*
174167
* @return \Dingo\Api\Auth\Auth
175168
*/
176169
public function setUser($user)
@@ -184,7 +177,6 @@ public function setUser($user)
184177
* Check if a user has authenticated with the API.
185178
*
186179
* @param bool $authenticate
187-
*
188180
* @return bool
189181
*/
190182
public function check($authenticate = false)
@@ -207,7 +199,6 @@ public function getProviderUsed()
207199
*
208200
* @param string $key
209201
* @param object|callable $provider
210-
*
211202
* @return void
212203
*/
213204
public function extend($key, $provider)

src/Auth/Provider/Authorization.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ abstract class Authorization implements \Dingo\Api\Contract\Auth\Provider
1919
* Validate the requests authorization header for the provider.
2020
*
2121
* @param \Illuminate\Http\Request $request
22+
* @return bool
2223
*
2324
* @throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
24-
*
25-
* @return bool
2625
*/
2726
public function validateAuthorizationHeader(Request $request)
2827
{

src/Auth/Provider/Basic.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Basic extends Authorization
2828
*
2929
* @param \Illuminate\Auth\AuthManager $auth
3030
* @param string $identifier
31-
*
3231
* @return void
3332
*/
3433
public function __construct(AuthManager $auth, $identifier = 'email')
@@ -42,7 +41,6 @@ public function __construct(AuthManager $auth, $identifier = 'email')
4241
*
4342
* @param \Illuminate\Http\Request $request
4443
* @param \Dingo\Api\Routing\Route $route
45-
*
4644
* @return mixed
4745
*/
4846
public function authenticate(Request $request, Route $route)

src/Auth/Provider/JWT.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class JWT extends Authorization
2222
* Create a new JWT provider instance.
2323
*
2424
* @param \PHPOpenSourceSaver\JWTAuth\JWTAuth $auth
25-
*
2625
* @return void
2726
*/
2827
public function __construct(JWTAuth $auth)
@@ -35,7 +34,6 @@ public function __construct(JWTAuth $auth)
3534
*
3635
* @param \Illuminate\Http\Request $request
3736
* @param \Dingo\Api\Routing\Route $route
38-
*
3937
* @return mixed
4038
*/
4139
public function authenticate(Request $request, Route $route)
@@ -57,10 +55,9 @@ public function authenticate(Request $request, Route $route)
5755
* Get the JWT from the request.
5856
*
5957
* @param \Illuminate\Http\Request $request
58+
* @return string
6059
*
6160
* @throws \Exception
62-
*
63-
* @return string
6461
*/
6562
protected function getToken(Request $request)
6663
{
@@ -81,7 +78,6 @@ protected function getToken(Request $request)
8178
* Parse JWT from the authorization header.
8279
*
8380
* @param \Illuminate\Http\Request $request
84-
*
8581
* @return string
8682
*/
8783
protected function parseAuthorizationHeader(Request $request)

src/Console/Command/Cache.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class Cache extends Command
5151
* @param \Illuminate\Filesystem\Filesystem $files
5252
* @param \Dingo\Api\Routing\Router $router
5353
* @param \Dingo\Api\Contract\Routing\Adapter $adapter
54-
*
5554
* @return void
5655
*/
5756
public function __construct(Filesystem $files, Router $router, Adapter $adapter)

src/Console/Command/Docs.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ class Docs extends Command
8181
* @param \Dingo\Blueprint\Writer $writer
8282
* @param string $name
8383
* @param string $version
84-
*
8584
* @return void
8685
*/
8786
public function __construct(Router $router, Blueprint $blueprint, Writer $writer, $name, $version)
@@ -192,7 +191,6 @@ protected function getControllers()
192191
*
193192
* @param \Illuminate\Support\Collection $controllers
194193
* @param object $controller
195-
*
196194
* @return void
197195
*/
198196
protected function addControllerIfNotExists(Collection $controllers, $controller)

src/Console/Command/Routes.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class Routes extends RouteListCommand
5050
* Create a new routes command instance.
5151
*
5252
* @param \Dingo\Api\Routing\Router $router
53-
*
5453
* @return void
5554
*/
5655
public function __construct(Router $router)
@@ -139,7 +138,6 @@ protected function getRoutes()
139138
* on the route.
140139
*
141140
* @param \Dingo\Api\Routing\Route $route
142-
*
143141
* @return null|string
144142
*/
145143
protected function routeRateLimit($route)
@@ -155,7 +153,6 @@ protected function routeRateLimit($route)
155153
* Filter the route by URI, Version, Scopes and / or name.
156154
*
157155
* @param array $route
158-
*
159156
* @return array|null
160157
*/
161158
protected function filterRoute(array $route)
@@ -203,7 +200,6 @@ protected function getOptions()
203200
* Filter the route by its path.
204201
*
205202
* @param array $route
206-
*
207203
* @return bool
208204
*/
209205
protected function filterByPath(array $route)
@@ -215,7 +211,6 @@ protected function filterByPath(array $route)
215211
* Filter the route by whether or not it is protected.
216212
*
217213
* @param array $route
218-
*
219214
* @return bool
220215
*/
221216
protected function filterByProtected(array $route)
@@ -227,7 +222,6 @@ protected function filterByProtected(array $route)
227222
* Filter the route by whether or not it is unprotected.
228223
*
229224
* @param array $route
230-
*
231225
* @return bool
232226
*/
233227
protected function filterByUnprotected(array $route)
@@ -239,7 +233,6 @@ protected function filterByUnprotected(array $route)
239233
* Filter the route by its versions.
240234
*
241235
* @param array $route
242-
*
243236
* @return bool
244237
*/
245238
protected function filterByVersions(array $route)
@@ -257,7 +250,6 @@ protected function filterByVersions(array $route)
257250
* Filter the route by its name.
258251
*
259252
* @param array $route
260-
*
261253
* @return bool
262254
*/
263255
protected function filterByName(array $route)
@@ -269,7 +261,6 @@ protected function filterByName(array $route)
269261
* Filter the route by its scopes.
270262
*
271263
* @param array $route
272-
*
273264
* @return bool
274265
*/
275266
protected function filterByScopes(array $route)

src/Contract/Auth/Provider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ interface Provider
1212
*
1313
* @param \Illuminate\Http\Request $request
1414
* @param \Dingo\Api\Routing\Route $route
15-
*
1615
* @return mixed
1716
*/
1817
public function authenticate(Request $request, Route $route);

src/Contract/Debug/ExceptionHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ interface ExceptionHandler
88
* Handle an exception.
99
*
1010
* @param \Throwable|\Exception $exception
11-
*
1211
* @return \Illuminate\Http\Response
1312
*/
1413
public function handle($exception);

src/Contract/Http/Parser.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ interface Parser
1010
* Parse an incoming request.
1111
*
1212
* @param \Illuminate\Http\Request $request
13-
*
1413
* @return mixed
1514
*/
1615
public function parse(IlluminateRequest $request);

0 commit comments

Comments
 (0)