Skip to content

Apply fixes from StyleCI #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions src/Auth/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class Auth
* @param \Dingo\Api\Routing\Router $router
* @param \Illuminate\Container\Container $container
* @param array $providers
*
* @return void
*/
public function __construct(Router $router, Container $container, array $providers)
Expand All @@ -65,10 +64,9 @@ public function __construct(Router $router, Container $container, array $provide
* Authenticate the current request.
*
* @param array $providers
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
*
* @return mixed
*/
public function authenticate(array $providers = [])
{
Expand Down Expand Up @@ -100,10 +98,9 @@ public function authenticate(array $providers = [])
* Throw the first exception from the exception stack.
*
* @param array $exceptionStack
* @return void
*
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
*
* @return void
*/
protected function throwUnauthorizedException(array $exceptionStack)
{
Expand All @@ -120,7 +117,6 @@ protected function throwUnauthorizedException(array $exceptionStack)
* Filter the requested providers from the available providers.
*
* @param array $providers
*
* @return array
*/
protected function filterProviders(array $providers)
Expand All @@ -136,7 +132,6 @@ protected function filterProviders(array $providers)
* Get the authenticated user.
*
* @param bool $authenticate
*
* @return \Illuminate\Auth\GenericUser|\Illuminate\Database\Eloquent\Model|null
*/
public function getUser($authenticate = true)
Expand All @@ -158,7 +153,6 @@ public function getUser($authenticate = true)
* Alias for getUser.
*
* @param bool $authenticate
*
* @return \Illuminate\Auth\GenericUser|\Illuminate\Database\Eloquent\Model
*/
public function user($authenticate = true)
Expand All @@ -170,7 +164,6 @@ public function user($authenticate = true)
* Set the authenticated user.
*
* @param \Illuminate\Auth\GenericUser|\Illuminate\Database\Eloquent\Model $user
*
* @return \Dingo\Api\Auth\Auth
*/
public function setUser($user)
Expand All @@ -184,7 +177,6 @@ public function setUser($user)
* Check if a user has authenticated with the API.
*
* @param bool $authenticate
*
* @return bool
*/
public function check($authenticate = false)
Expand All @@ -207,7 +199,6 @@ public function getProviderUsed()
*
* @param string $key
* @param object|callable $provider
*
* @return void
*/
public function extend($key, $provider)
Expand Down
3 changes: 1 addition & 2 deletions src/Auth/Provider/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ abstract class Authorization implements \Dingo\Api\Contract\Auth\Provider
* Validate the requests authorization header for the provider.
*
* @param \Illuminate\Http\Request $request
* @return bool
*
* @throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
*
* @return bool
*/
public function validateAuthorizationHeader(Request $request)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Auth/Provider/Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class Basic extends Authorization
*
* @param \Illuminate\Auth\AuthManager $auth
* @param string $identifier
*
* @return void
*/
public function __construct(AuthManager $auth, $identifier = 'email')
Expand All @@ -42,7 +41,6 @@ public function __construct(AuthManager $auth, $identifier = 'email')
*
* @param \Illuminate\Http\Request $request
* @param \Dingo\Api\Routing\Route $route
*
* @return mixed
*/
public function authenticate(Request $request, Route $route)
Expand Down
6 changes: 1 addition & 5 deletions src/Auth/Provider/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class JWT extends Authorization
* Create a new JWT provider instance.
*
* @param \PHPOpenSourceSaver\JWTAuth\JWTAuth $auth
*
* @return void
*/
public function __construct(JWTAuth $auth)
Expand All @@ -35,7 +34,6 @@ public function __construct(JWTAuth $auth)
*
* @param \Illuminate\Http\Request $request
* @param \Dingo\Api\Routing\Route $route
*
* @return mixed
*/
public function authenticate(Request $request, Route $route)
Expand All @@ -57,10 +55,9 @@ public function authenticate(Request $request, Route $route)
* Get the JWT from the request.
*
* @param \Illuminate\Http\Request $request
* @return string
*
* @throws \Exception
*
* @return string
*/
protected function getToken(Request $request)
{
Expand All @@ -81,7 +78,6 @@ protected function getToken(Request $request)
* Parse JWT from the authorization header.
*
* @param \Illuminate\Http\Request $request
*
* @return string
*/
protected function parseAuthorizationHeader(Request $request)
Expand Down
1 change: 0 additions & 1 deletion src/Console/Command/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class Cache extends Command
* @param \Illuminate\Filesystem\Filesystem $files
* @param \Dingo\Api\Routing\Router $router
* @param \Dingo\Api\Contract\Routing\Adapter $adapter
*
* @return void
*/
public function __construct(Filesystem $files, Router $router, Adapter $adapter)
Expand Down
2 changes: 0 additions & 2 deletions src/Console/Command/Docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class Docs extends Command
* @param \Dingo\Blueprint\Writer $writer
* @param string $name
* @param string $version
*
* @return void
*/
public function __construct(Router $router, Blueprint $blueprint, Writer $writer, $name, $version)
Expand Down Expand Up @@ -192,7 +191,6 @@ protected function getControllers()
*
* @param \Illuminate\Support\Collection $controllers
* @param object $controller
*
* @return void
*/
protected function addControllerIfNotExists(Collection $controllers, $controller)
Expand Down
9 changes: 0 additions & 9 deletions src/Console/Command/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class Routes extends RouteListCommand
* Create a new routes command instance.
*
* @param \Dingo\Api\Routing\Router $router
*
* @return void
*/
public function __construct(Router $router)
Expand Down Expand Up @@ -139,7 +138,6 @@ protected function getRoutes()
* on the route.
*
* @param \Dingo\Api\Routing\Route $route
*
* @return null|string
*/
protected function routeRateLimit($route)
Expand All @@ -155,7 +153,6 @@ protected function routeRateLimit($route)
* Filter the route by URI, Version, Scopes and / or name.
*
* @param array $route
*
* @return array|null
*/
protected function filterRoute(array $route)
Expand Down Expand Up @@ -203,7 +200,6 @@ protected function getOptions()
* Filter the route by its path.
*
* @param array $route
*
* @return bool
*/
protected function filterByPath(array $route)
Expand All @@ -215,7 +211,6 @@ protected function filterByPath(array $route)
* Filter the route by whether or not it is protected.
*
* @param array $route
*
* @return bool
*/
protected function filterByProtected(array $route)
Expand All @@ -227,7 +222,6 @@ protected function filterByProtected(array $route)
* Filter the route by whether or not it is unprotected.
*
* @param array $route
*
* @return bool
*/
protected function filterByUnprotected(array $route)
Expand All @@ -239,7 +233,6 @@ protected function filterByUnprotected(array $route)
* Filter the route by its versions.
*
* @param array $route
*
* @return bool
*/
protected function filterByVersions(array $route)
Expand All @@ -257,7 +250,6 @@ protected function filterByVersions(array $route)
* Filter the route by its name.
*
* @param array $route
*
* @return bool
*/
protected function filterByName(array $route)
Expand All @@ -269,7 +261,6 @@ protected function filterByName(array $route)
* Filter the route by its scopes.
*
* @param array $route
*
* @return bool
*/
protected function filterByScopes(array $route)
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Auth/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface Provider
*
* @param \Illuminate\Http\Request $request
* @param \Dingo\Api\Routing\Route $route
*
* @return mixed
*/
public function authenticate(Request $request, Route $route);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Debug/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ interface ExceptionHandler
* Handle an exception.
*
* @param \Throwable|\Exception $exception
*
* @return \Illuminate\Http\Response
*/
public function handle($exception);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Http/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface Parser
* Parse an incoming request.
*
* @param \Illuminate\Http\Request $request
*
* @return mixed
*/
public function parse(IlluminateRequest $request);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Http/RateLimit/HasRateLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface HasRateLimiter
*
* @param \Illuminate\Container\Container $app
* @param \Dingo\Api\Http\Request $request
*
* @return string
*/
public function getRateLimiter(Container $app, Request $request);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Http/RateLimit/Throttle.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface Throttle
* Attempt to match the throttle against a given condition.
*
* @param \Illuminate\Container\Container $container
*
* @return bool
*/
public function match(Container $container);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface Request
* Create a new Dingo request instance from an Illuminate request instance.
*
* @param \Illuminate\Http\Request $old
*
* @return \Dingo\Api\Http\Request
*/
public function createFromIlluminate(IlluminateRequest $old);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Http/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface Validator
* Validate a request.
*
* @param \Illuminate\Http\Request $request
*
* @return bool
*/
public function validate(IlluminateRequest $request);
Expand Down
7 changes: 0 additions & 7 deletions src/Contract/Routing/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface Adapter
*
* @param \Illuminate\Http\Request $request
* @param string $version
*
* @return mixed
*/
public function dispatch(Request $request, $version);
Expand All @@ -21,7 +20,6 @@ public function dispatch(Request $request, $version);
*
* @param mixed $route
* @param \Illuminate\Http\Request $request
*
* @return array
*/
public function getRouteProperties($route, Request $request);
Expand All @@ -33,7 +31,6 @@ public function getRouteProperties($route, Request $request);
* @param array $versions
* @param string $uri
* @param mixed $action
*
* @return void
*/
public function addRoute(array $methods, array $versions, $uri, $action);
Expand All @@ -42,7 +39,6 @@ public function addRoute(array $methods, array $versions, $uri, $action);
* Get all routes or only for a specific version.
*
* @param string $version
*
* @return mixed
*/
public function getRoutes($version = null);
Expand All @@ -52,7 +48,6 @@ public function getRoutes($version = null);
* version containing iterable routes that can be consumed by the adapter.
*
* @param string $version
*
* @return mixed
*/
public function getIterableRoutes($version = null);
Expand All @@ -61,7 +56,6 @@ public function getIterableRoutes($version = null);
* Set the routes on the adapter.
*
* @param array $routes
*
* @return void
*/
public function setRoutes(array $routes);
Expand All @@ -70,7 +64,6 @@ public function setRoutes(array $routes);
* Prepare a route for serialization.
*
* @param mixed $route
*
* @return mixed
*/
public function prepareRouteForSerialization($route);
Expand Down
1 change: 0 additions & 1 deletion src/Contract/Transformer/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface Adapter
* @param object $transformer
* @param \Dingo\Api\Transformer\Binding $binding
* @param \Dingo\Api\Http\Request $request
*
* @return array
*/
public function transform($response, $transformer, Binding $binding, Request $request);
Expand Down
Loading