From b453d7586bbb7aadcc206ec9324c4e10e95760d9 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sun, 30 Jan 2022 11:43:49 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Auth/Auth.php | 13 ++----- src/Auth/Provider/Authorization.php | 3 +- src/Auth/Provider/Basic.php | 2 -- src/Auth/Provider/JWT.php | 6 +--- src/Console/Command/Cache.php | 1 - src/Console/Command/Docs.php | 2 -- src/Console/Command/Routes.php | 9 ----- src/Contract/Auth/Provider.php | 1 - src/Contract/Debug/ExceptionHandler.php | 1 - src/Contract/Http/Parser.php | 1 - .../Http/RateLimit/HasRateLimiter.php | 1 - src/Contract/Http/RateLimit/Throttle.php | 1 - src/Contract/Http/Request.php | 1 - src/Contract/Http/Validator.php | 1 - src/Contract/Routing/Adapter.php | 7 ---- src/Contract/Transformer/Adapter.php | 1 - src/Dispatcher.php | 26 +------------- src/Event/RequestWasMatched.php | 1 - src/Event/ResponseIsMorphing.php | 1 - src/Exception/Handler.php | 21 ++--------- src/Exception/InternalHttpException.php | 1 - src/Exception/RateLimitExceededException.php | 1 - src/Exception/ResourceException.php | 1 - src/Exception/UnknownVersionException.php | 1 - src/Exception/ValidationHttpException.php | 1 - src/Facade/API.php | 3 -- src/Http/FormRequest.php | 6 ---- src/Http/Middleware/Auth.php | 2 -- src/Http/Middleware/PrepareController.php | 2 -- src/Http/Middleware/RateLimit.php | 5 +-- src/Http/Middleware/Request.php | 7 ---- src/Http/Parser/Accept.php | 4 +-- src/Http/RateLimit/Handler.php | 10 ------ src/Http/RateLimit/Throttle/Authenticated.php | 1 - src/Http/RateLimit/Throttle/Route.php | 1 - src/Http/RateLimit/Throttle/Throttle.php | 1 - .../RateLimit/Throttle/Unauthenticated.php | 1 - src/Http/Request.php | 2 -- src/Http/RequestValidator.php | 5 --- src/Http/Response.php | 21 +---------- src/Http/Response/Factory.php | 31 +++++----------- src/Http/Response/Format/Format.php | 6 ---- src/Http/Response/Format/Json.php | 5 --- .../Format/JsonOptionalFormatting.php | 7 ---- src/Http/Response/Format/Jsonp.php | 2 -- src/Http/Validation/Accept.php | 4 +-- src/Http/Validation/Domain.php | 4 --- src/Http/Validation/Prefix.php | 3 -- src/Provider/LaravelServiceProvider.php | 4 --- src/Provider/LumenServiceProvider.php | 7 ++-- src/Provider/ServiceProvider.php | 3 -- src/Routing/Adapter/Laravel.php | 11 ------ src/Routing/Adapter/Lumen.php | 16 --------- src/Routing/Helpers.php | 11 ++---- src/Routing/ResourceRegistrar.php | 2 -- src/Routing/Route.php | 4 --- src/Routing/RouteCollection.php | 4 --- src/Routing/Router.php | 35 +------------------ src/Routing/UrlGenerator.php | 2 -- src/Transformer/Adapter/Fractal.php | 7 ---- src/Transformer/Binding.php | 8 ++--- src/Transformer/Factory.php | 14 +------- src/helpers.php | 1 - 63 files changed, 27 insertions(+), 340 deletions(-) diff --git a/src/Auth/Auth.php b/src/Auth/Auth.php index a1a0d1a1..51d13cc8 100644 --- a/src/Auth/Auth.php +++ b/src/Auth/Auth.php @@ -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) @@ -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 = []) { @@ -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) { @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -207,7 +199,6 @@ public function getProviderUsed() * * @param string $key * @param object|callable $provider - * * @return void */ public function extend($key, $provider) diff --git a/src/Auth/Provider/Authorization.php b/src/Auth/Provider/Authorization.php index f8bfb12a..05c4ed42 100644 --- a/src/Auth/Provider/Authorization.php +++ b/src/Auth/Provider/Authorization.php @@ -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) { diff --git a/src/Auth/Provider/Basic.php b/src/Auth/Provider/Basic.php index 423d2c69..5809f7ef 100644 --- a/src/Auth/Provider/Basic.php +++ b/src/Auth/Provider/Basic.php @@ -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') @@ -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) diff --git a/src/Auth/Provider/JWT.php b/src/Auth/Provider/JWT.php index e4b055b8..d1605d18 100644 --- a/src/Auth/Provider/JWT.php +++ b/src/Auth/Provider/JWT.php @@ -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) @@ -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) @@ -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) { @@ -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) diff --git a/src/Console/Command/Cache.php b/src/Console/Command/Cache.php index 9ae15f60..a8b9fdcf 100644 --- a/src/Console/Command/Cache.php +++ b/src/Console/Command/Cache.php @@ -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) diff --git a/src/Console/Command/Docs.php b/src/Console/Command/Docs.php index 7689565d..541ecb7a 100644 --- a/src/Console/Command/Docs.php +++ b/src/Console/Command/Docs.php @@ -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) @@ -192,7 +191,6 @@ protected function getControllers() * * @param \Illuminate\Support\Collection $controllers * @param object $controller - * * @return void */ protected function addControllerIfNotExists(Collection $controllers, $controller) diff --git a/src/Console/Command/Routes.php b/src/Console/Command/Routes.php index 4498f171..61b3e527 100644 --- a/src/Console/Command/Routes.php +++ b/src/Console/Command/Routes.php @@ -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) @@ -139,7 +138,6 @@ protected function getRoutes() * on the route. * * @param \Dingo\Api\Routing\Route $route - * * @return null|string */ protected function routeRateLimit($route) @@ -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) @@ -203,7 +200,6 @@ protected function getOptions() * Filter the route by its path. * * @param array $route - * * @return bool */ protected function filterByPath(array $route) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/src/Contract/Auth/Provider.php b/src/Contract/Auth/Provider.php index d1fdafdd..22784f95 100644 --- a/src/Contract/Auth/Provider.php +++ b/src/Contract/Auth/Provider.php @@ -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); diff --git a/src/Contract/Debug/ExceptionHandler.php b/src/Contract/Debug/ExceptionHandler.php index ffb16be1..1bddab9d 100644 --- a/src/Contract/Debug/ExceptionHandler.php +++ b/src/Contract/Debug/ExceptionHandler.php @@ -8,7 +8,6 @@ interface ExceptionHandler * Handle an exception. * * @param \Throwable|\Exception $exception - * * @return \Illuminate\Http\Response */ public function handle($exception); diff --git a/src/Contract/Http/Parser.php b/src/Contract/Http/Parser.php index 777810d5..e1f5bbb4 100644 --- a/src/Contract/Http/Parser.php +++ b/src/Contract/Http/Parser.php @@ -10,7 +10,6 @@ interface Parser * Parse an incoming request. * * @param \Illuminate\Http\Request $request - * * @return mixed */ public function parse(IlluminateRequest $request); diff --git a/src/Contract/Http/RateLimit/HasRateLimiter.php b/src/Contract/Http/RateLimit/HasRateLimiter.php index 80a2d521..49845572 100644 --- a/src/Contract/Http/RateLimit/HasRateLimiter.php +++ b/src/Contract/Http/RateLimit/HasRateLimiter.php @@ -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); diff --git a/src/Contract/Http/RateLimit/Throttle.php b/src/Contract/Http/RateLimit/Throttle.php index 36434890..8f4bdce1 100644 --- a/src/Contract/Http/RateLimit/Throttle.php +++ b/src/Contract/Http/RateLimit/Throttle.php @@ -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); diff --git a/src/Contract/Http/Request.php b/src/Contract/Http/Request.php index fe7f2113..586fdccc 100644 --- a/src/Contract/Http/Request.php +++ b/src/Contract/Http/Request.php @@ -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); diff --git a/src/Contract/Http/Validator.php b/src/Contract/Http/Validator.php index b16fa905..72f410f5 100644 --- a/src/Contract/Http/Validator.php +++ b/src/Contract/Http/Validator.php @@ -10,7 +10,6 @@ interface Validator * Validate a request. * * @param \Illuminate\Http\Request $request - * * @return bool */ public function validate(IlluminateRequest $request); diff --git a/src/Contract/Routing/Adapter.php b/src/Contract/Routing/Adapter.php index 7de88d63..8dabd0dc 100644 --- a/src/Contract/Routing/Adapter.php +++ b/src/Contract/Routing/Adapter.php @@ -11,7 +11,6 @@ interface Adapter * * @param \Illuminate\Http\Request $request * @param string $version - * * @return mixed */ public function dispatch(Request $request, $version); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -70,7 +64,6 @@ public function setRoutes(array $routes); * Prepare a route for serialization. * * @param mixed $route - * * @return mixed */ public function prepareRouteForSerialization($route); diff --git a/src/Contract/Transformer/Adapter.php b/src/Contract/Transformer/Adapter.php index 7e2a4756..fc858baa 100644 --- a/src/Contract/Transformer/Adapter.php +++ b/src/Contract/Transformer/Adapter.php @@ -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); diff --git a/src/Dispatcher.php b/src/Dispatcher.php index 6403a0bb..9bf3b5b4 100644 --- a/src/Dispatcher.php +++ b/src/Dispatcher.php @@ -170,7 +170,6 @@ class Dispatcher * @param \Illuminate\Filesystem\Filesystem $files * @param \Dingo\Api\Routing\Router $router * @param \Dingo\Api\Auth\Auth $auth - * * @return void */ public function __construct(Container $container, Filesystem $files, Router $router, Auth $auth) @@ -197,7 +196,6 @@ protected function setupRequestStack() * Attach files to be uploaded. * * @param array $files - * * @return \Dingo\Api\Dispatcher */ public function attach(array $files) @@ -223,7 +221,6 @@ public function attach(array $files) * Internal request will be authenticated as the given user. * * @param mixed $user - * * @return \Dingo\Api\Dispatcher */ public function be($user) @@ -237,7 +234,6 @@ public function be($user) * Send a JSON payload in the request body. * * @param string|array $content - * * @return \Dingo\Api\Dispatcher */ public function json($content) @@ -255,7 +251,6 @@ public function json($content) * Sets the domain to be used for the request. * * @param string $domain - * * @return \Dingo\Api\Dispatcher */ public function on($domain) @@ -293,7 +288,6 @@ public function once() * Set the version of the API for the next request. * * @param string $version - * * @return \Dingo\Api\Dispatcher */ public function version($version) @@ -307,7 +301,6 @@ public function version($version) * Set the parameters to be sent on the next API request. * * @param string|array $parameters - * * @return \Dingo\Api\Dispatcher */ public function with($parameters) @@ -322,7 +315,6 @@ public function with($parameters) * * @param string $key * @param string $value - * * @return \Dingo\Api\Dispatcher */ public function header($key, $value) @@ -336,7 +328,6 @@ public function header($key, $value) * Set a cookie to be sent on the next API request. * * @param \Symfony\Component\HttpFoundation\Cookie $cookie - * * @return \Dingo\Api\Dispatcher */ public function cookie(Cookie $cookie) @@ -351,7 +342,6 @@ public function cookie(Cookie $cookie) * * @param string $uri * @param string|array $parameters - * * @return mixed */ public function get($uri, $parameters = []) @@ -365,7 +355,6 @@ public function get($uri, $parameters = []) * @param string $uri * @param string|array $parameters * @param string $content - * * @return mixed */ public function post($uri, $parameters = [], $content = '') @@ -379,7 +368,6 @@ public function post($uri, $parameters = [], $content = '') * @param string $uri * @param string|array $parameters * @param string $content - * * @return mixed */ public function put($uri, $parameters = [], $content = '') @@ -393,7 +381,6 @@ public function put($uri, $parameters = [], $content = '') * @param string $uri * @param string|array $parameters * @param string $content - * * @return mixed */ public function patch($uri, $parameters = [], $content = '') @@ -407,7 +394,6 @@ public function patch($uri, $parameters = [], $content = '') * @param string $uri * @param string|array $parameters * @param string $content - * * @return mixed */ public function delete($uri, $parameters = [], $content = '') @@ -422,7 +408,6 @@ public function delete($uri, $parameters = [], $content = '') * @param string $uri * @param string|array $parameters * @param string $content - * * @return mixed */ protected function queueRequest($verb, $uri, $parameters, $content = '') @@ -452,7 +437,6 @@ protected function queueRequest($verb, $uri, $parameters, $content = '') * @param string $verb * @param string $uri * @param string|array $parameters - * * @return \Dingo\Api\Http\InternalRequest */ protected function createRequest($verb, $uri, $parameters) @@ -493,7 +477,6 @@ protected function createRequest($verb, $uri, $parameters) * Add the prefix to the URI. * * @param string $uri - * * @return string */ protected function addPrefixToUri($uri) @@ -525,10 +508,9 @@ protected function getAcceptHeader() * Attempt to dispatch an internal request. * * @param \Dingo\Api\Http\InternalRequest $request + * @return mixed * * @throws \Exception|\Symfony\Component\HttpKernel\Exception\HttpExceptionInterface - * - * @return mixed */ protected function dispatch(InternalRequest $request) { @@ -670,7 +652,6 @@ public function getSubtype() * Set the subtype. * * @param string $subtype - * * @return void */ public function setSubtype($subtype) @@ -692,7 +673,6 @@ public function getStandardsTree() * Set the standards tree. * * @param string $standardsTree - * * @return void */ public function setStandardsTree($standardsTree) @@ -704,7 +684,6 @@ public function setStandardsTree($standardsTree) * Set the prefix. * * @param string $prefix - * * @return void */ public function setPrefix($prefix) @@ -716,7 +695,6 @@ public function setPrefix($prefix) * Set the default version. * * @param string $version - * * @return void */ public function setDefaultVersion($version) @@ -728,7 +706,6 @@ public function setDefaultVersion($version) * Set the default domain. * * @param string $domain - * * @return void */ public function setDefaultDomain($domain) @@ -740,7 +717,6 @@ public function setDefaultDomain($domain) * Set the default format. * * @param string $format - * * @return void */ public function setDefaultFormat($format) diff --git a/src/Event/RequestWasMatched.php b/src/Event/RequestWasMatched.php index f55da5ca..b3afdfa2 100644 --- a/src/Event/RequestWasMatched.php +++ b/src/Event/RequestWasMatched.php @@ -26,7 +26,6 @@ class RequestWasMatched * * @param \Dingo\Api\Http\Request $request * @param \Illuminate\Contracts\Container\Container $app - * * @return void */ public function __construct(Request $request, Container $app) diff --git a/src/Event/ResponseIsMorphing.php b/src/Event/ResponseIsMorphing.php index a672ac22..dbc003dd 100644 --- a/src/Event/ResponseIsMorphing.php +++ b/src/Event/ResponseIsMorphing.php @@ -26,7 +26,6 @@ class ResponseIsMorphing * * @param \Dingo\Api\Http\Response $response * @param string $content - * * @return void */ public function __construct(Response $response, &$content) diff --git a/src/Exception/Handler.php b/src/Exception/Handler.php index 95782116..52ef4eb4 100644 --- a/src/Exception/Handler.php +++ b/src/Exception/Handler.php @@ -61,7 +61,6 @@ class Handler implements ExceptionHandler, IlluminateExceptionHandler * @param IlluminateExceptionHandler $parentHandler * @param array $format * @param bool $debug - * * @return void */ public function __construct(IlluminateExceptionHandler $parentHandler, array $format, $debug) @@ -75,7 +74,6 @@ public function __construct(IlluminateExceptionHandler $parentHandler, array $fo * Report or log an exception. * * @param Throwable $exception - * * @return void */ public function report(Throwable $throwable) @@ -87,7 +85,6 @@ public function report(Throwable $throwable) * Determine if the exception should be reported. * * @param Throwable $e - * * @return bool */ public function shouldReport(Throwable $e) @@ -100,10 +97,9 @@ public function shouldReport(Throwable $e) * * @param Request $request * @param Throwable $exception + * @return mixed * * @throws Exception - * - * @return mixed */ public function render($request, Throwable $exception) { @@ -115,7 +111,6 @@ public function render($request, Throwable $exception) * * @param OutputInterface $output * @param Throwable $exception - * * @return mixed */ public function renderForConsole($output, Throwable $exception) @@ -127,7 +122,6 @@ public function renderForConsole($output, Throwable $exception) * Register a new exception handler. * * @param callable $callback - * * @return void */ public function register(callable $callback) @@ -141,7 +135,6 @@ public function register(callable $callback) * Handle an exception if it has an existing handler. * * @param Throwable|Exception $exception - * * @return Response */ public function handle($exception) @@ -172,10 +165,9 @@ public function handle($exception) * Handle a generic error response if there is no handler available. * * @param Throwable $exception + * @return Response * * @throws Throwable - * - * @return Response */ protected function genericResponse(Throwable $exception) { @@ -198,7 +190,6 @@ protected function genericResponse(Throwable $exception) * Get the status code from the exception. * * @param Throwable $exception - * * @return int */ protected function getStatusCode(Throwable $exception) @@ -226,7 +217,6 @@ protected function getStatusCode(Throwable $exception) * Get the headers from the exception. * * @param Throwable $exception - * * @return array */ protected function getHeaders(Throwable $exception) @@ -238,7 +228,6 @@ protected function getHeaders(Throwable $exception) * Prepare the replacements array by gathering the keys and values. * * @param Throwable $exception - * * @return array */ protected function prepareReplacements(Throwable $exception) @@ -293,7 +282,6 @@ protected function prepareReplacements(Throwable $exception) * Set user defined replacements. * * @param array $replacements - * * @return void */ public function setReplacements(array $replacements) @@ -305,7 +293,6 @@ public function setReplacements(array $replacements) * Recursively remove any empty replacement values in the response array. * * @param array $input - * * @return array */ protected function recursivelyRemoveEmptyReplacements(array $input) @@ -340,7 +327,6 @@ protected function newResponseArray() * * @param Exception $exception * @param int $defaultStatusCode - * * @return int */ protected function getExceptionStatusCode(Exception $exception, $defaultStatusCode = 500) @@ -362,7 +348,6 @@ protected function runningInDebugMode() * Get the hint for an exception handler. * * @param callable $callback - * * @return string */ protected function handlerHint(callable $callback) @@ -395,7 +380,6 @@ public function getHandlers() * Set the error format array. * * @param array $format - * * @return void */ public function setErrorFormat(array $format) @@ -407,7 +391,6 @@ public function setErrorFormat(array $format) * Set the debug mode. * * @param bool $debug - * * @return void */ public function setDebug($debug) diff --git a/src/Exception/InternalHttpException.php b/src/Exception/InternalHttpException.php index 656a94fc..9119fae0 100644 --- a/src/Exception/InternalHttpException.php +++ b/src/Exception/InternalHttpException.php @@ -23,7 +23,6 @@ class InternalHttpException extends HttpException * @param \Exception $previous * @param array $headers * @param int $code - * * @return void */ public function __construct(Response $response, $message = null, Exception $previous = null, array $headers = [], $code = 0) diff --git a/src/Exception/RateLimitExceededException.php b/src/Exception/RateLimitExceededException.php index 5e0d1464..c5efac1a 100644 --- a/src/Exception/RateLimitExceededException.php +++ b/src/Exception/RateLimitExceededException.php @@ -14,7 +14,6 @@ class RateLimitExceededException extends HttpException * @param \Exception $previous * @param array $headers * @param int $code - * * @return void */ public function __construct($message = null, Exception $previous = null, $headers = [], $code = 0) diff --git a/src/Exception/ResourceException.php b/src/Exception/ResourceException.php index 37631bd5..85e6a133 100644 --- a/src/Exception/ResourceException.php +++ b/src/Exception/ResourceException.php @@ -24,7 +24,6 @@ class ResourceException extends HttpException implements MessageBagErrors * @param \Exception $previous * @param array $headers * @param int $code - * * @return void */ public function __construct($message = null, $errors = null, Exception $previous = null, $headers = [], $code = 0) diff --git a/src/Exception/UnknownVersionException.php b/src/Exception/UnknownVersionException.php index 77b5781a..28d88f77 100644 --- a/src/Exception/UnknownVersionException.php +++ b/src/Exception/UnknownVersionException.php @@ -13,7 +13,6 @@ class UnknownVersionException extends HttpException * @param string $message * @param \Exception $previous * @param int $code - * * @return void */ public function __construct($message = null, Exception $previous = null, $code = 0) diff --git a/src/Exception/ValidationHttpException.php b/src/Exception/ValidationHttpException.php index cc3a6154..74afd86f 100644 --- a/src/Exception/ValidationHttpException.php +++ b/src/Exception/ValidationHttpException.php @@ -13,7 +13,6 @@ class ValidationHttpException extends ResourceException * @param \Exception $previous * @param array $headers * @param int $code - * * @return void */ public function __construct($errors = null, Exception $previous = null, $headers = [], $code = 0) diff --git a/src/Facade/API.php b/src/Facade/API.php index aaf00848..5eed7908 100644 --- a/src/Facade/API.php +++ b/src/Facade/API.php @@ -21,7 +21,6 @@ protected static function getFacadeAccessor() * Bind an exception handler. * * @param callable $callback - * * @return void */ public static function error(callable $callback) @@ -34,7 +33,6 @@ public static function error(callable $callback) * * @param string $class * @param string|\Closure $transformer - * * @return \Dingo\Api\Transformer\Binding */ public static function transform($class, $transformer) @@ -97,7 +95,6 @@ public static function router() * * @param string $routeName * @param string $apiVersion - * * @return string */ public static function route($routeName, $apiVersion = 'v1') diff --git a/src/Http/FormRequest.php b/src/Http/FormRequest.php index 4426659c..fbbb0547 100644 --- a/src/Http/FormRequest.php +++ b/src/Http/FormRequest.php @@ -113,7 +113,6 @@ protected function getValidatorInstance() * Create the default validator instance. * * @param \Illuminate\Contracts\Validation\Factory $factory - * * @return \Illuminate\Contracts\Validation\Validator */ protected function createDefaultValidator(ValidationFactory $factory) @@ -140,7 +139,6 @@ protected function validationData() * Handle a failed validation attempt. * * @param \Illuminate\Contracts\Validation\Validator $validator - * * @return void */ protected function failedValidation(Validator $validator) @@ -156,7 +154,6 @@ protected function failedValidation(Validator $validator) * Get the proper failed validation response for the request. * * @param array $errors - * * @return \Symfony\Component\HttpFoundation\Response */ public function response(array $errors) @@ -174,7 +171,6 @@ public function response(array $errors) * Format the errors from the given Validator instance. * * @param \Illuminate\Contracts\Validation\Validator $validator - * * @return array */ protected function formatErrors(Validator $validator) @@ -254,7 +250,6 @@ public function attributes() * Set the Redirector instance. * * @param \Laravel\Lumen\Http\Redirector|\Illuminate\Routing\Redirector $redirector - * * @return $this */ public function setRedirector($redirector) @@ -268,7 +263,6 @@ public function setRedirector($redirector) * Set the container implementation. * * @param \Illuminate\Contracts\Container\Container $container - * * @return $this */ public function setContainer(Container $container) diff --git a/src/Http/Middleware/Auth.php b/src/Http/Middleware/Auth.php index 98f25af5..45cabd91 100644 --- a/src/Http/Middleware/Auth.php +++ b/src/Http/Middleware/Auth.php @@ -27,7 +27,6 @@ class Auth * * @param \Dingo\Api\Routing\Router $router * @param \Dingo\Api\Auth\Auth $auth - * * @return void */ public function __construct(Router $router, Authentication $auth) @@ -41,7 +40,6 @@ public function __construct(Router $router, Authentication $auth) * * @param \Illuminate\Http\Request $request * @param \Closure $next - * * @return mixed */ public function handle($request, Closure $next) diff --git a/src/Http/Middleware/PrepareController.php b/src/Http/Middleware/PrepareController.php index f6398c53..cf479b3f 100644 --- a/src/Http/Middleware/PrepareController.php +++ b/src/Http/Middleware/PrepareController.php @@ -18,7 +18,6 @@ class PrepareController * Create a new prepare controller instance. * * @param \Dingo\Api\Routing\Router $router - * * @return void */ public function __construct(Router $router) @@ -31,7 +30,6 @@ public function __construct(Router $router) * * @param \Dingo\Api\Http\Request $request * @param \Closure $next - * * @return mixed */ public function handle($request, Closure $next) diff --git a/src/Http/Middleware/RateLimit.php b/src/Http/Middleware/RateLimit.php index 7cba1d17..f9cde7fc 100644 --- a/src/Http/Middleware/RateLimit.php +++ b/src/Http/Middleware/RateLimit.php @@ -30,7 +30,6 @@ class RateLimit * * @param \Dingo\Api\Routing\Router $router * @param \Dingo\Api\Http\RateLimit\Handler $handler - * * @return void */ public function __construct(Router $router, Handler $handler) @@ -44,10 +43,9 @@ public function __construct(Router $router, Handler $handler) * * @param \Dingo\Api\Http\Request $request * @param \Closure $next + * @return mixed * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return mixed */ public function handle($request, Closure $next) { @@ -80,7 +78,6 @@ public function handle($request, Closure $next) * Send the response with the rate limit headers. * * @param \Dingo\Api\Http\Response $response - * * @return \Dingo\Api\Http\Response */ protected function responseWithHeaders($response) diff --git a/src/Http/Middleware/Request.php b/src/Http/Middleware/Request.php index 3c066284..1ac32ac0 100644 --- a/src/Http/Middleware/Request.php +++ b/src/Http/Middleware/Request.php @@ -68,7 +68,6 @@ class Request * @param \Dingo\Api\Routing\Router $router * @param \Dingo\Api\Http\RequestValidator $validator * @param \Illuminate\Contracts\Events\Dispatcher $events - * * @return void */ public function __construct(Container $app, ExceptionHandler $exception, Router $router, RequestValidator $validator, EventDispatcher $events) @@ -85,7 +84,6 @@ public function __construct(Container $app, ExceptionHandler $exception, Router * * @param \Illuminate\Http\Request $request * @param \Closure $next - * * @return mixed */ public function handle($request, Closure $next) @@ -115,7 +113,6 @@ public function handle($request, Closure $next) * Send the request through the Dingo router. * * @param \Dingo\Api\Http\Request $request - * * @return \Dingo\Api\Http\Response */ protected function sendRequestThroughRouter(HttpRequest $request) @@ -173,7 +170,6 @@ public function terminate($request, $response) * @author Taylor Otwell * * @param string $middleware - * * @return array */ protected function parseMiddleware($middleware) @@ -191,7 +187,6 @@ protected function parseMiddleware($middleware) * Gather the middlewares for the route. * * @param \Dingo\Api\Http\Request $request - * * @return array */ protected function gatherRouteMiddlewares($request) @@ -207,7 +202,6 @@ protected function gatherRouteMiddlewares($request) * Set the middlewares. * * @param array $middleware - * * @return void */ public function setMiddlewares(array $middleware) @@ -219,7 +213,6 @@ public function setMiddlewares(array $middleware) * Merge new middlewares onto the existing middlewares. * * @param array $middleware - * * @return void */ public function mergeMiddlewares(array $middleware) diff --git a/src/Http/Parser/Accept.php b/src/Http/Parser/Accept.php index 570d9c54..c8bf246e 100644 --- a/src/Http/Parser/Accept.php +++ b/src/Http/Parser/Accept.php @@ -43,7 +43,6 @@ class Accept implements Parser * @param string $subtype * @param string $version * @param string $format - * * @return void */ public function __construct($standardsTree, $subtype, $version, $format) @@ -60,10 +59,9 @@ public function __construct($standardsTree, $subtype, $version, $format) * * @param \Illuminate\Http\Request $request * @param bool $strict + * @return array * * @throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException - * - * @return array */ public function parse(Request $request, $strict = false) { diff --git a/src/Http/RateLimit/Handler.php b/src/Http/RateLimit/Handler.php index c9ddc2ab..f20593ad 100644 --- a/src/Http/RateLimit/Handler.php +++ b/src/Http/RateLimit/Handler.php @@ -68,7 +68,6 @@ class Handler * @param \Illuminate\Container\Container $container * @param \Illuminate\Cache\CacheManager $cache * @param array $throttles - * * @return void */ public function __construct(Container $container, CacheManager $cache, array $throttles) @@ -84,7 +83,6 @@ public function __construct(Container $container, CacheManager $cache, array $th * @param \Dingo\Api\Http\Request $request * @param int $limit * @param int $expires - * * @return void */ public function rateLimitRequest(Request $request, $limit = 0, $expires = 0) @@ -167,7 +165,6 @@ protected function getMatchingThrottles() * Namespace a cache key. * * @param string $key - * * @return string */ protected function key($key) @@ -181,7 +178,6 @@ protected function key($key) * @param string $key * @param mixed $value * @param int $minutes - * * @return void */ protected function cache($key, $value, $minutes) @@ -193,7 +189,6 @@ protected function cache($key, $value, $minutes) * Retrieve a value from the cache store. * * @param string $key - * * @return mixed */ protected function retrieve($key) @@ -205,7 +200,6 @@ protected function retrieve($key) * Increment a key in the cache. * * @param string $key - * * @return void */ protected function increment($key) @@ -217,7 +211,6 @@ protected function increment($key) * Forget a key in the cache. * * @param string $key - * * @return void */ protected function forget($key) @@ -251,7 +244,6 @@ public function getRateLimiter() * Set the rate limiter. * * @param callable $limiter - * * @return void */ public function setRateLimiter(callable $limiter) @@ -263,7 +255,6 @@ public function setRateLimiter(callable $limiter) * Set the throttle to use for rate limiting. * * @param string|\Dingo\Api\Contract\Http\RateLimit\Throttle $throttle - * * @return void */ public function setThrottle($throttle) @@ -321,7 +312,6 @@ public function getRateLimitReset() * Extend the rate limiter by adding a new throttle. * * @param callable|\Dingo\Api\Http\RateLimit\Throttle $throttle - * * @return void */ public function extend($throttle) diff --git a/src/Http/RateLimit/Throttle/Authenticated.php b/src/Http/RateLimit/Throttle/Authenticated.php index f3e4b5db..173ce51b 100644 --- a/src/Http/RateLimit/Throttle/Authenticated.php +++ b/src/Http/RateLimit/Throttle/Authenticated.php @@ -10,7 +10,6 @@ class Authenticated extends Throttle * Authenticated throttle will be matched when request is authenticated. * * @param \Illuminate\Container\Container $container - * * @return bool */ public function match(Container $container) diff --git a/src/Http/RateLimit/Throttle/Route.php b/src/Http/RateLimit/Throttle/Route.php index 57328b74..c6976676 100644 --- a/src/Http/RateLimit/Throttle/Route.php +++ b/src/Http/RateLimit/Throttle/Route.php @@ -10,7 +10,6 @@ class Route extends Throttle * Route specific throttles always match. * * @param \Illuminate\Container\Container $container - * * @return bool */ public function match(Container $container) diff --git a/src/Http/RateLimit/Throttle/Throttle.php b/src/Http/RateLimit/Throttle/Throttle.php index 98ac5ca4..512823ec 100644 --- a/src/Http/RateLimit/Throttle/Throttle.php +++ b/src/Http/RateLimit/Throttle/Throttle.php @@ -17,7 +17,6 @@ abstract class Throttle implements RateLimitThrottle * Create a new throttle instance. * * @param array $options - * * @return void */ public function __construct(array $options = []) diff --git a/src/Http/RateLimit/Throttle/Unauthenticated.php b/src/Http/RateLimit/Throttle/Unauthenticated.php index 978b155b..20f893ec 100644 --- a/src/Http/RateLimit/Throttle/Unauthenticated.php +++ b/src/Http/RateLimit/Throttle/Unauthenticated.php @@ -10,7 +10,6 @@ class Unauthenticated extends Throttle * Unauthenticated throttle will be matched when request is not authenticated. * * @param \Illuminate\Container\Container $container - * * @return bool */ public function match(Container $container) diff --git a/src/Http/Request.php b/src/Http/Request.php index 953a9e3e..edbd25b6 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -26,7 +26,6 @@ class Request extends IlluminateRequest implements RequestInterface * 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) @@ -100,7 +99,6 @@ protected function parseAcceptHeader() * Set the accept parser instance. * * @param \Dingo\Api\Http\Parser\Accept $acceptParser - * * @return void */ public static function setAcceptParser(Accept $acceptParser) diff --git a/src/Http/RequestValidator.php b/src/Http/RequestValidator.php index 77b98977..73eff6ef 100644 --- a/src/Http/RequestValidator.php +++ b/src/Http/RequestValidator.php @@ -32,7 +32,6 @@ class RequestValidator * Create a new request validator instance. * * @param \Illuminate\Container\Container $container - * * @return void */ public function __construct(Container $container) @@ -44,7 +43,6 @@ public function __construct(Container $container) * Replace the validators. * * @param array $validators - * * @return void */ public function replace(array $validators) @@ -56,7 +54,6 @@ public function replace(array $validators) * Merge an array of validators. * * @param array $validators - * * @return void */ public function merge(array $validators) @@ -68,7 +65,6 @@ public function merge(array $validators) * Extend the validators. * * @param string|\Dingo\Api\Http\Validator $validator - * * @return void */ public function extend($validator) @@ -80,7 +76,6 @@ public function extend($validator) * Validate a request. * * @param \Illuminate\Http\Request $request - * * @return bool */ public function validateRequest(IlluminateRequest $request) diff --git a/src/Http/Response.php b/src/Http/Response.php index 29a0a847..d62b2094 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -68,7 +68,6 @@ class Response extends IlluminateResponse * @param int $status * @param array $headers * @param \Dingo\Api\Transformer\Binding $binding - * * @return void */ public function __construct($content, $status = 200, $headers = [], Binding $binding = null) @@ -82,7 +81,6 @@ public function __construct($content, $status = 200, $headers = [], Binding $bin * Make an API response from an existing Illuminate response. * * @param \Illuminate\Http\Response $old - * * @return \Dingo\Api\Http\Response */ public static function makeFromExisting(IlluminateResponse $old) @@ -98,7 +96,6 @@ public static function makeFromExisting(IlluminateResponse $old) * Make an API response from an existing JSON response. * * @param \Illuminate\Http\JsonResponse $json - * * @return \Dingo\Api\Http\Response */ public static function makeFromJson(JsonResponse $json) @@ -123,7 +120,6 @@ public static function makeFromJson(JsonResponse $json) * Morph the API response to the appropriate format. * * @param string $format - * * @return \Dingo\Api\Http\Response */ public function morph($format = 'json') @@ -221,7 +217,6 @@ public function setContent($content) * Set the event dispatcher instance. * * @param \Illuminate\Contracts\Events\Dispatcher $events - * * @return void */ public static function setEventDispatcher(EventDispatcher $events) @@ -233,10 +228,9 @@ public static function setEventDispatcher(EventDispatcher $events) * Get the formatter based on the requested format type. * * @param string $format + * @return \Dingo\Api\Http\Response\Format\Format * * @throws \RuntimeException - * - * @return \Dingo\Api\Http\Response\Format\Format */ public static function getFormatter($format) { @@ -251,7 +245,6 @@ public static function getFormatter($format) * Determine if a response formatter has been registered. * * @param string $format - * * @return bool */ public static function hasFormatter($format) @@ -263,7 +256,6 @@ public static function hasFormatter($format) * Set the response formatters. * * @param array $formatters - * * @return void */ public static function setFormatters(array $formatters) @@ -275,7 +267,6 @@ public static function setFormatters(array $formatters) * Set the formats' options. * * @param array $formatsOptions - * * @return void */ public static function setFormatsOptions(array $formatsOptions) @@ -287,7 +278,6 @@ public static function setFormatsOptions(array $formatsOptions) * Get the format's options. * * @param string $format - * * @return array */ public static function getFormatsOptions($format) @@ -303,7 +293,6 @@ public static function getFormatsOptions($format) * Determine if any format's options were set. * * @param string $format - * * @return bool */ public static function hasOptionsForFormat($format) @@ -316,7 +305,6 @@ public static function hasOptionsForFormat($format) * * @param string $key * @param \Dingo\Api\Http\Response\Format\Format $formatter - * * @return void */ public static function addFormatter($key, $formatter) @@ -328,7 +316,6 @@ public static function addFormatter($key, $formatter) * Set the transformer factory instance. * * @param \Dingo\Api\Transformer\Factory $transformer - * * @return void */ public static function setTransformer(TransformerFactory $transformer) @@ -351,7 +338,6 @@ public static function getTransformer() * * @param string $key * @param mixed $value - * * @return \Dingo\Api\Http\Response */ public function addMeta($key, $value) @@ -366,7 +352,6 @@ public function addMeta($key, $value) * * @param string $key * @param mixed $value - * * @return \Dingo\Api\Http\Response */ public function meta($key, $value) @@ -378,7 +363,6 @@ public function meta($key, $value) * Set the meta data for the response. * * @param array $meta - * * @return \Dingo\Api\Http\Response */ public function setMeta(array $meta) @@ -402,7 +386,6 @@ public function getMeta() * Add a cookie to the response. * * @param \Symfony\Component\HttpFoundation\Cookie|mixed $cookie - * * @return \Dingo\Api\Http\Response */ public function cookie($cookie) @@ -416,7 +399,6 @@ public function cookie($cookie) * @param string $key * @param string $value * @param bool $replace - * * @return \Dingo\Api\Http\Response */ public function withHeader($key, $value, $replace = true) @@ -428,7 +410,6 @@ public function withHeader($key, $value, $replace = true) * Set the response status code. * * @param int $statusCode - * * @return \Dingo\Api\Http\Response */ public function statusCode($statusCode) diff --git a/src/Http/Response/Factory.php b/src/Http/Response/Factory.php index 578b859f..77ae5e8b 100644 --- a/src/Http/Response/Factory.php +++ b/src/Http/Response/Factory.php @@ -24,7 +24,6 @@ class Factory * Create a new response factory instance. * * @param \Dingo\Api\Transformer\Factory $transformer - * * @return void */ public function __construct(TransformerFactory $transformer) @@ -36,7 +35,6 @@ public function __construct(TransformerFactory $transformer) * Respond with a created response and associate a location if provided. * * @param null|string $location - * * @return \Dingo\Api\Http\Response */ public function created($location = null, $content = null) @@ -56,7 +54,6 @@ public function created($location = null, $content = null) * * @param null|string $location * @param mixed $content - * * @return \Dingo\Api\Http\Response */ public function accepted($location = null, $content = null) @@ -90,7 +87,6 @@ public function noContent() * @param string|callable|object $transformer * @param array|\Closure $parameters * @param \Closure|null $after - * * @return \Dingo\Api\Http\Response */ public function collection(Collection $collection, $transformer = null, $parameters = [], Closure $after = null) @@ -122,7 +118,6 @@ public function collection(Collection $collection, $transformer = null, $paramet * @param null|string|callable|object $transformer * @param array $parameters * @param \Closure $after - * * @return \Dingo\Api\Http\Response */ public function item($item, $transformer = null, $parameters = [], Closure $after = null) @@ -155,7 +150,6 @@ public function item($item, $transformer = null, $parameters = [], Closure $afte * @param $transformer * @param array $parameters * @param Closure|null $after - * * @return Response */ public function array(array $array, $transformer = null, $parameters = [], Closure $after = null) @@ -187,7 +181,6 @@ public function array(array $array, $transformer = null, $parameters = [], Closu * @param null|string|callable|object $transformer * @param array $parameters * @param \Closure $after - * * @return \Dingo\Api\Http\Response */ public function paginator(Paginator $paginator, $transformer = null, array $parameters = [], Closure $after = null) @@ -212,10 +205,9 @@ public function paginator(Paginator $paginator, $transformer = null, array $para * * @param string $message * @param int $statusCode + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function error($message, $statusCode) { @@ -226,10 +218,9 @@ public function error($message, $statusCode) * Return a 404 not found error. * * @param string $message + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function errorNotFound($message = 'Not Found') { @@ -240,10 +231,9 @@ public function errorNotFound($message = 'Not Found') * Return a 400 bad request error. * * @param string $message + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function errorBadRequest($message = 'Bad Request') { @@ -254,10 +244,9 @@ public function errorBadRequest($message = 'Bad Request') * Return a 403 forbidden error. * * @param string $message + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function errorForbidden($message = 'Forbidden') { @@ -268,10 +257,9 @@ public function errorForbidden($message = 'Forbidden') * Return a 500 internal server error. * * @param string $message + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function errorInternal($message = 'Internal Error') { @@ -282,10 +270,9 @@ public function errorInternal($message = 'Internal Error') * Return a 401 unauthorized error. * * @param string $message + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function errorUnauthorized($message = 'Unauthorized') { @@ -296,10 +283,9 @@ public function errorUnauthorized($message = 'Unauthorized') * Return a 405 method not allowed error. * * @param string $message + * @return void * * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * - * @return void */ public function errorMethodNotAllowed($message = 'Method Not Allowed') { @@ -311,10 +297,9 @@ public function errorMethodNotAllowed($message = 'Method Not Allowed') * * @param string $method * @param array $parameters + * @return mixed * * @throws \ErrorException - * - * @return mixed */ public function __call($method, $parameters) { diff --git a/src/Http/Response/Format/Format.php b/src/Http/Response/Format/Format.php index 5d5ef82a..57103ac4 100644 --- a/src/Http/Response/Format/Format.php +++ b/src/Http/Response/Format/Format.php @@ -29,7 +29,6 @@ abstract class Format * Set the request instance. * * @param \Illuminate\Http\Request $request - * * @return \Dingo\Api\Http\Response\Format\Format */ public function setRequest($request) @@ -43,7 +42,6 @@ public function setRequest($request) * Set the response instance. * * @param \Illuminate\Http\Response $response - * * @return \Dingo\Api\Http\Response\Format\Format */ public function setResponse($response) @@ -57,7 +55,6 @@ public function setResponse($response) * Set the formats' options. * * @param array $options - * * @return \Dingo\Api\Http\Response\Format\Format */ public function setOptions(array $options) @@ -71,7 +68,6 @@ public function setOptions(array $options) * Format an Eloquent model. * * @param \Illuminate\Database\Eloquent\Model $model - * * @return string */ abstract public function formatEloquentModel($model); @@ -80,7 +76,6 @@ abstract public function formatEloquentModel($model); * Format an Eloquent collection. * * @param \Illuminate\Database\Eloquent\Collection $collection - * * @return string */ abstract public function formatEloquentCollection($collection); @@ -89,7 +84,6 @@ abstract public function formatEloquentCollection($collection); * Format an array or instance implementing Arrayable. * * @param array|\Illuminate\Contracts\Support\Arrayable $content - * * @return string */ abstract public function formatArray($content); diff --git a/src/Http/Response/Format/Json.php b/src/Http/Response/Format/Json.php index 8864fe7c..b095058a 100644 --- a/src/Http/Response/Format/Json.php +++ b/src/Http/Response/Format/Json.php @@ -18,7 +18,6 @@ class Json extends Format * Format an Eloquent model. * * @param \Illuminate\Database\Eloquent\Model $model - * * @return string */ public function formatEloquentModel($model) @@ -36,7 +35,6 @@ public function formatEloquentModel($model) * Format an Eloquent collection. * * @param \Illuminate\Database\Eloquent\Collection $collection - * * @return string */ public function formatEloquentCollection($collection) @@ -59,7 +57,6 @@ public function formatEloquentCollection($collection) * Format an array or instance implementing Arrayable. * * @param array|\Illuminate\Contracts\Support\Arrayable $content - * * @return string */ public function formatArray($content) @@ -87,7 +84,6 @@ public function getContentType() * Morph a value to an array. * * @param array|\Illuminate\Contracts\Support\Arrayable $value - * * @return array */ protected function morphToArray($value) @@ -99,7 +95,6 @@ protected function morphToArray($value) * Encode the content to its JSON representation. * * @param mixed $content - * * @return string */ protected function encode($content) diff --git a/src/Http/Response/Format/JsonOptionalFormatting.php b/src/Http/Response/Format/JsonOptionalFormatting.php index 7e6ad9ec..f58d6384 100644 --- a/src/Http/Response/Format/JsonOptionalFormatting.php +++ b/src/Http/Response/Format/JsonOptionalFormatting.php @@ -73,7 +73,6 @@ protected function isCustomIndentStyleRequired() * * @param string $content * @param array $jsonEncodeOptions - * * @return string */ protected function performJsonEncoding($content, array $jsonEncodeOptions = []) @@ -93,7 +92,6 @@ protected function performJsonEncoding($content, array $jsonEncodeOptions = []) * Filter JSON encode options array against the whitelist array. * * @param array $jsonEncodeOptions - * * @return array */ protected function filterJsonEncodeOptions(array $jsonEncodeOptions) @@ -105,7 +103,6 @@ protected function filterJsonEncodeOptions(array $jsonEncodeOptions) * Sweep JSON encode options together to get options' bitmask. * * @param array $jsonEncodeOptions - * * @return int */ protected function calucateJsonEncodeOptionsBitmask(array $jsonEncodeOptions) @@ -119,7 +116,6 @@ protected function calucateJsonEncodeOptionsBitmask(array $jsonEncodeOptions) * @param string $jsonString * @param string $indentStyle * @param int $defaultIndentSize - * * @return string */ protected function indentPrettyPrintedJson($jsonString, $indentStyle, $defaultIndentSize = 2) @@ -144,7 +140,6 @@ protected function indentPrettyPrintedJson($jsonString, $indentStyle, $defaultIn * Get indent char for given indent style. * * @param string $indentStyle - * * @return string */ protected function getIndentCharForIndentStyle($indentStyle) @@ -168,7 +163,6 @@ protected function getPrettyPrintIndentSize() * Determine if indent style is allowed to have various indent size. * * @param string $indentStyle - * * @return bool */ protected function hasVariousIndentSize($indentStyle) @@ -184,7 +178,6 @@ protected function hasVariousIndentSize($indentStyle) * @param string $indentChar Char, used for indent (default is tab) * @param int $indentSize Number of times to repeat indent char per one indent level * @param int $defaultSpaces Default number of indent spaces after json_encode() - * * @return string */ protected function peformIndentation($jsonString, $indentChar = "\t", $indentSize = 1, $defaultSpaces = 4) diff --git a/src/Http/Response/Format/Jsonp.php b/src/Http/Response/Format/Jsonp.php index efa1841b..971d99e8 100644 --- a/src/Http/Response/Format/Jsonp.php +++ b/src/Http/Response/Format/Jsonp.php @@ -15,7 +15,6 @@ class Jsonp extends Json * Create a new JSONP response formatter instance. * * @param string $callbackName - * * @return void */ public function __construct($callbackName = 'callback') @@ -61,7 +60,6 @@ public function getContentType() * Encode the content to its JSONP representation. * * @param mixed $content - * * @return string */ protected function encode($content) diff --git a/src/Http/Validation/Accept.php b/src/Http/Validation/Accept.php index 4485ed00..10c82d89 100644 --- a/src/Http/Validation/Accept.php +++ b/src/Http/Validation/Accept.php @@ -28,7 +28,6 @@ class Accept implements Validator * * @param \Dingo\Api\Http\Parser\Accept $accept * @param bool $strict - * * @return void */ public function __construct(AcceptParser $accept, $strict = false) @@ -44,10 +43,9 @@ public function __construct(AcceptParser $accept, $strict = false) * a success boolean. * * @param \Illuminate\Http\Request $request + * @return bool * * @throws \Exception|\Symfony\Component\HttpKernel\Exception\BadRequestHttpException - * - * @return bool */ public function validate(Request $request) { diff --git a/src/Http/Validation/Domain.php b/src/Http/Validation/Domain.php index e872f662..c0e85693 100644 --- a/src/Http/Validation/Domain.php +++ b/src/Http/Validation/Domain.php @@ -21,7 +21,6 @@ class Domain implements Validator * Create a new domain validator instance. * * @param string $domain - * * @return void */ public function __construct($domain) @@ -33,7 +32,6 @@ public function __construct($domain) * Validate that the request domain matches the configured domain. * * @param \Illuminate\Http\Request $request - * * @return bool */ public function validate(Request $request) @@ -45,7 +43,6 @@ public function validate(Request $request) * Strip the protocol from a domain. * * @param string $domain - * * @return string */ protected function stripProtocol($domain) @@ -61,7 +58,6 @@ protected function stripProtocol($domain) * Strip the port from a domain. * * @param $domain - * * @return mixed */ protected function stripPort($domain) diff --git a/src/Http/Validation/Prefix.php b/src/Http/Validation/Prefix.php index 9de94afb..e98ab3b7 100644 --- a/src/Http/Validation/Prefix.php +++ b/src/Http/Validation/Prefix.php @@ -18,7 +18,6 @@ class Prefix implements Validator * Create a new prefix validator instance. * * @param string $prefix - * * @return void */ public function __construct($prefix) @@ -31,7 +30,6 @@ public function __construct($prefix) * API prefix. * * @param \Illuminate\Http\Request $request - * * @return bool */ public function validate(Request $request) @@ -47,7 +45,6 @@ public function validate(Request $request) * Explode array on slash and remove empty values. * * @param array $array - * * @return array */ protected function filterAndExplode($array) diff --git a/src/Provider/LaravelServiceProvider.php b/src/Provider/LaravelServiceProvider.php index 9ae9f2ff..1dfb5765 100644 --- a/src/Provider/LaravelServiceProvider.php +++ b/src/Provider/LaravelServiceProvider.php @@ -130,7 +130,6 @@ protected function registerRouterAdapter() * Add the request middleware to the beginning of the kernel. * * @param \Illuminate\Contracts\Http\Kernel $kernel - * * @return void */ protected function addRequestMiddlewareToBeginning(Kernel $kernel) @@ -145,7 +144,6 @@ protected function addRequestMiddlewareToBeginning(Kernel $kernel) * * @param string $name * @param string $class - * * @return void */ protected function addMiddlewareAlias($name, $class) @@ -164,7 +162,6 @@ protected function addMiddlewareAlias($name, $class) * our request through them, exactly how the developer wanted. * * @param \Illuminate\Contracts\Http\Kernel $kernel - * * @return array */ protected function gatherAppMiddleware(Kernel $kernel) @@ -180,7 +177,6 @@ protected function gatherAppMiddleware(Kernel $kernel) * * @param FormRequest $form * @param IlluminateRequest $current - * * @return void */ protected function initializeRequest(FormRequest $form, IlluminateRequest $current) diff --git a/src/Provider/LumenServiceProvider.php b/src/Provider/LumenServiceProvider.php index 2de5d8ed..2a8665df 100644 --- a/src/Provider/LumenServiceProvider.php +++ b/src/Provider/LumenServiceProvider.php @@ -22,9 +22,9 @@ class LumenServiceProvider extends DingoServiceProvider /** * Boot the service provider. * - * @throws \ReflectionException - * * @return void + * + * @throws \ReflectionException */ public function boot() { @@ -115,7 +115,6 @@ protected function getDispatcherResolver() * Lumen application instance. * * @param \ReflectionClass $reflection - * * @return void */ protected function addRequestMiddlewareToBeginning(ReflectionClass $reflection) @@ -136,7 +135,6 @@ protected function addRequestMiddlewareToBeginning(ReflectionClass $reflection) * our request through them, exactly how the developer wanted. * * @param \ReflectionClass $reflection - * * @return array */ protected function gatherAppMiddleware(ReflectionClass $reflection) @@ -154,7 +152,6 @@ protected function gatherAppMiddleware(ReflectionClass $reflection) * * @param FormRequest $form * @param IlluminateRequest $current - * * @return void */ protected function initializeRequest(FormRequest $form, IlluminateRequest $current) diff --git a/src/Provider/ServiceProvider.php b/src/Provider/ServiceProvider.php index e41242ab..aa53d9e5 100644 --- a/src/Provider/ServiceProvider.php +++ b/src/Provider/ServiceProvider.php @@ -20,7 +20,6 @@ abstract class ServiceProvider extends IlluminateServiceProvider * * @param string $item * @param bool $instantiate - * * @return mixed */ protected function config($item, $instantiate = true) @@ -39,7 +38,6 @@ protected function config($item, $instantiate = true) * * @param string $item * @param array $values - * * @return array */ protected function instantiateConfigValues($item, array $values) @@ -56,7 +54,6 @@ protected function instantiateConfigValues($item, array $values) * * @param string $item * @param mixed $value - * * @return mixed */ protected function instantiateConfigValue($item, $value) diff --git a/src/Routing/Adapter/Laravel.php b/src/Routing/Adapter/Laravel.php index 012d30c2..4b12895c 100644 --- a/src/Routing/Adapter/Laravel.php +++ b/src/Routing/Adapter/Laravel.php @@ -57,7 +57,6 @@ class Laravel implements Adapter * Create a new laravel routing adapter instance. * * @param \Illuminate\Routing\Router $router - * * @return void */ public function __construct(Router $router) @@ -70,7 +69,6 @@ public function __construct(Router $router) * * @param \Illuminate\Http\Request $request * @param string $version - * * @return mixed */ public function dispatch(Request $request, $version) @@ -96,7 +94,6 @@ public function dispatch(Request $request, $version) * Merge the old application routes with the API routes. * * @param string $version - * * @return array */ protected function mergeOldRoutes($version) @@ -124,7 +121,6 @@ protected function mergeOldRoutes($version) * * @param mixed $route * @param \Illuminate\Http\Request $request - * * @return array */ public function getRouteProperties($route, Request $request) @@ -143,7 +139,6 @@ public function getRouteProperties($route, Request $request) * @param array $versions * @param string $uri * @param mixed $action - * * @return \Illuminate\Routing\Route */ public function addRoute(array $methods, array $versions, $uri, $action) @@ -167,7 +162,6 @@ public function addRoute(array $methods, array $versions, $uri, $action) * Create the route collections for the versions. * * @param array $versions - * * @return void */ protected function createRouteCollections(array $versions) @@ -183,7 +177,6 @@ protected function createRouteCollections(array $versions) * Get all routes or only for a specific version. * * @param string $version - * * @return mixed */ public function getRoutes($version = null) @@ -199,7 +192,6 @@ public function getRoutes($version = null) * Get a normalized iterable set of routes. * * @param string $version - * * @return mixed */ public function getIterableRoutes($version = null) @@ -211,7 +203,6 @@ public function getIterableRoutes($version = null) * Set the routes on the adapter. * * @param array $routes - * * @return void */ public function setRoutes(array $routes) @@ -223,7 +214,6 @@ public function setRoutes(array $routes) * Prepare a route for serialization. * * @param mixed $route - * * @return mixed */ public function prepareRouteForSerialization($route) @@ -237,7 +227,6 @@ public function prepareRouteForSerialization($route) * Gather the route middlewares. * * @param \Illuminate\Routing\Route $route - * * @return array */ public function gatherRouteMiddlewares($route) diff --git a/src/Routing/Adapter/Lumen.php b/src/Routing/Adapter/Lumen.php index 05bb04f5..0ebde19f 100644 --- a/src/Routing/Adapter/Lumen.php +++ b/src/Routing/Adapter/Lumen.php @@ -79,7 +79,6 @@ class Lumen implements Adapter * @param \FastRoute\RouteParser $parser * @param \FastRoute\DataGenerator $generator * @param callable $dispatcherResolver - * * @return void */ public function __construct(Application $app, RouteParser $parser, DataGenerator $generator, callable $dispatcherResolver) @@ -95,7 +94,6 @@ public function __construct(Application $app, RouteParser $parser, DataGenerator * * @param \Illuminate\Http\Request $request * @param string $version - * * @return mixed */ public function dispatch(Request $request, $version) @@ -120,7 +118,6 @@ public function dispatch(Request $request, $version) * Merge the old application routes with the API routes. * * @param string $version - * * @return array */ protected function mergeOldRoutes($version) @@ -142,7 +139,6 @@ protected function mergeOldRoutes($version) * Normalize the request URI so that Lumen can properly dispatch it. * * @param \Illuminate\Http\Request $request - * * @return void */ protected function normalizeRequestUri(Request $request) @@ -159,7 +155,6 @@ protected function normalizeRequestUri(Request $request) * * @param mixed $route * @param \Illuminate\Http\Request $request - * * @return array */ public function getRouteProperties($route, Request $request) @@ -182,7 +177,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) @@ -200,7 +194,6 @@ public function addRoute(array $methods, array $versions, $uri, $action) * Break a URI that has optional segments into individual URIs. * * @param string $uri - * * @return array */ protected function breakUriSegments($uri) @@ -231,7 +224,6 @@ protected function breakUriSegments($uri) * Create the route collections for the versions. * * @param array $versions - * * @return void */ protected function createRouteCollections(array $versions) @@ -276,7 +268,6 @@ protected function removeMiddlewareFromApp() * Get all routes or only for a specific version. * * @param string $version - * * @return mixed */ public function getRoutes($version = null) @@ -292,7 +283,6 @@ public function getRoutes($version = null) * Get routes in an iterable form. * * @param string $version - * * @return \ArrayIterator */ public function getIterableRoutes($version = null) @@ -338,7 +328,6 @@ public function getIterableRoutes($version = null) * Normalize the FastRoute static routes so they're the same across multiple versions. * * @param array $routes - * * @return array */ protected function normalizeStaticRoutes(array $routes) @@ -369,7 +358,6 @@ protected function normalizeStaticRoutes(array $routes) * Determine if a string is an HTTP method. * * @param string $string - * * @return bool */ protected function stringIsHttpMethod($string) @@ -383,7 +371,6 @@ protected function stringIsHttpMethod($string) * Set the routes on the adapter. * * @param array $routes - * * @return void */ public function setRoutes(array $routes) @@ -395,7 +382,6 @@ public function setRoutes(array $routes) * Prepare a route for serialization. * * @param mixed $route - * * @return mixed */ public function prepareRouteForSerialization($route) @@ -407,7 +393,6 @@ public function prepareRouteForSerialization($route) * Gather the route middlewares. * * @param array $route - * * @return array */ public function gatherRouteMiddlewares($route) @@ -421,7 +406,6 @@ public function gatherRouteMiddlewares($route) * * @param array $route * @param string $method - * * @return array */ private function setRouteMethods($route, $method) diff --git a/src/Routing/Helpers.php b/src/Routing/Helpers.php index 63f81b1b..b6beb2b2 100644 --- a/src/Routing/Helpers.php +++ b/src/Routing/Helpers.php @@ -48,7 +48,6 @@ trait Helpers * * @param string|\Dingo\Api\Contract\Http\RateLimit\Throttle $class * @param array $options - * * @return void */ protected function throttle($class, array $options = []) @@ -62,7 +61,6 @@ protected function throttle($class, array $options = []) * @param int $limit * @param int $expires * @param array $options - * * @return void */ protected function rateLimit($limit, $expires, array $options = []) @@ -75,7 +73,6 @@ protected function rateLimit($limit, $expires, array $options = []) * * @param string|array $scopes * @param array $options - * * @return void */ protected function scopes($scopes, array $options = []) @@ -90,7 +87,6 @@ protected function scopes($scopes, array $options = []) * * @param string|array $providers * @param array $options - * * @return void */ protected function authenticateWith($providers, array $options = []) @@ -104,7 +100,6 @@ protected function authenticateWith($providers, array $options = []) * Prepare a property value. * * @param string|array $value - * * @return array */ protected function getPropertyValue($value) @@ -196,10 +191,9 @@ protected function response() * Magically handle calls to certain properties. * * @param string $key + * @return mixed * * @throws \ErrorException - * - * @return mixed */ public function __get($key) { @@ -219,10 +213,9 @@ public function __get($key) * * @param string $method * @param array $parameters + * @return \Dingo\Api\Http\Response * * @throws \ErrorException - * - * @return \Dingo\Api\Http\Response */ public function __call($method, $parameters) { diff --git a/src/Routing/ResourceRegistrar.php b/src/Routing/ResourceRegistrar.php index 96f8b0ae..08bea28a 100644 --- a/src/Routing/ResourceRegistrar.php +++ b/src/Routing/ResourceRegistrar.php @@ -18,7 +18,6 @@ class ResourceRegistrar extends IlluminateResourceRegistrar * Create a new resource registrar instance. * * @param \Dingo\Api\Routing\Router $router - * * @return void */ public function __construct(Router $router) @@ -32,7 +31,6 @@ public function __construct(Router $router) * @param string $name * @param string $controller * @param array $options - * * @return void */ public function register($name, $controller, array $options = []) diff --git a/src/Routing/Route.php b/src/Routing/Route.php index ece58e09..1fb26856 100644 --- a/src/Routing/Route.php +++ b/src/Routing/Route.php @@ -105,7 +105,6 @@ public function __construct(Adapter $adapter, Container $container, Request $req * * @param Request $request * @param $route - * * @return void */ protected function setupRouteProperties(Request $request, $route) @@ -182,7 +181,6 @@ protected function mergeControllerProperties() * Find the controller options and whether or not it will apply to this routes controller method. * * @param string $name - * * @return array */ protected function findControllerPropertyOptions($name) @@ -206,7 +204,6 @@ protected function findControllerPropertyOptions($name) * Determine if a controller method is in an array of options. * * @param array $options - * * @return bool */ protected function optionsApplyToControllerMethod(array $options) @@ -229,7 +226,6 @@ protected function optionsApplyToControllerMethod(array $options) * Explode a value on a pipe delimiter. * * @param string|array $value - * * @return array */ protected function explodeOnPipes($value) diff --git a/src/Routing/RouteCollection.php b/src/Routing/RouteCollection.php index 221bafc8..060b51f2 100644 --- a/src/Routing/RouteCollection.php +++ b/src/Routing/RouteCollection.php @@ -33,7 +33,6 @@ class RouteCollection implements Countable, IteratorAggregate * Add a route to the collection. * * @param \Dingo\Api\Routing\Route $route - * * @return \Dingo\Api\Routing\Route */ public function add(Route $route) @@ -49,7 +48,6 @@ public function add(Route $route) * Add route lookups. * * @param \Dingo\Api\Routing\Route $route - * * @return void */ protected function addLookups(Route $route) @@ -69,7 +67,6 @@ protected function addLookups(Route $route) * Get a route by name. * * @param string $name - * * @return \Dingo\Api\Routing\Route|null */ public function getByName($name) @@ -81,7 +78,6 @@ public function getByName($name) * Get a route by action. * * @param string $action - * * @return \Dingo\Api\Routing\Route|null */ public function getByAction($action) diff --git a/src/Routing/Router.php b/src/Routing/Router.php index a38fe2e4..ff6f3e4f 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -97,7 +97,6 @@ class Router * @param \Illuminate\Container\Container $container * @param string $domain * @param string $prefix - * * @return void */ public function __construct(Adapter $adapter, ExceptionHandler $exception, Container $container, $domain, $prefix) @@ -120,7 +119,6 @@ public function __construct(Adapter $adapter, ExceptionHandler $exception, Conta * @param array|string $version * @param array|callable $second * @param callable $third - * * @return void */ public function version($version, $second, $third = null) @@ -141,7 +139,6 @@ public function version($version, $second, $third = null) * * @param array $attributes * @param callable $callback - * * @return void */ public function group(array $attributes, $callback) @@ -178,7 +175,6 @@ public function group(array $attributes, $callback) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function get($uri, $action) @@ -191,7 +187,6 @@ public function get($uri, $action) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function post($uri, $action) @@ -204,7 +199,6 @@ public function post($uri, $action) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function put($uri, $action) @@ -217,7 +211,6 @@ public function put($uri, $action) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function patch($uri, $action) @@ -230,7 +223,6 @@ public function patch($uri, $action) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function delete($uri, $action) @@ -243,7 +235,6 @@ public function delete($uri, $action) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function options($uri, $action) @@ -256,7 +247,6 @@ public function options($uri, $action) * * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function any($uri, $action) @@ -272,7 +262,6 @@ public function any($uri, $action) * @param array|string $methods * @param string $uri * @param array|string|callable $action - * * @return mixed */ public function match($methods, $uri, $action) @@ -284,7 +273,6 @@ public function match($methods, $uri, $action) * Register an array of resources. * * @param array $resources - * * @return void */ public function resources(array $resources) @@ -306,7 +294,6 @@ public function resources(array $resources) * @param string $name * @param string $controller * @param array $options - * * @return void */ public function resource($name, $controller, array $options = []) @@ -326,7 +313,6 @@ public function resource($name, $controller, array $options = []) * @param string|array $methods * @param string $uri * @param string|array|callable $action - * * @return mixed */ public function addRoute($methods, $uri, $action) @@ -364,7 +350,6 @@ public function addRoute($methods, $uri, $action) * Add the controller preparation middleware to the beginning of the routes middleware. * * @param array $action - * * @return array */ protected function addControllerMiddlewareToRouteAction(array $action) @@ -378,7 +363,6 @@ protected function addControllerMiddlewareToRouteAction(array $action) * Merge the last groups attributes. * * @param array $attributes - * * @return array */ protected function mergeLastGroupAttributes(array $attributes) @@ -395,7 +379,6 @@ protected function mergeLastGroupAttributes(array $attributes) * * @param array $new * @param array $old - * * @return array */ protected function mergeGroup(array $new, array $old) @@ -434,7 +417,6 @@ protected function mergeGroup(array $new, array $old) * * @param string $option * @param array $new - * * @return array */ protected function formatArrayBasedOption($option, array $new) @@ -449,7 +431,6 @@ protected function formatArrayBasedOption($option, array $new) * * @param array $new * @param array $old - * * @return string */ protected function formatUses(array $new, array $old) @@ -466,7 +447,6 @@ protected function formatUses(array $new, array $old) * * @param array $new * @param array $old - * * @return string */ protected function formatNamespace(array $new, array $old) @@ -485,7 +465,6 @@ protected function formatNamespace(array $new, array $old) * * @param array $new * @param array $old - * * @return string */ protected function formatPrefix($new, $old) @@ -501,10 +480,9 @@ protected function formatPrefix($new, $old) * Dispatch a request via the adapter. * * @param \Dingo\Api\Http\Request $request + * @return \Dingo\Api\Http\Response * * @throws \Exception - * - * @return \Dingo\Api\Http\Response */ public function dispatch(Request $request) { @@ -535,7 +513,6 @@ public function dispatch(Request $request) * @param mixed $response * @param \Dingo\Api\Http\Request $request * @param string $format - * * @return \Dingo\Api\Http\Response */ protected function prepareResponse($response, Request $request, $format) @@ -575,7 +552,6 @@ protected function prepareResponse($response, Request $request, $format) * Gather the middleware for the given route. * * @param mixed $route - * * @return array */ public function gatherRouteMiddlewares($route) @@ -597,7 +573,6 @@ protected function requestIsConditional() * Set the conditional request. * * @param bool $conditionalRequest - * * @return void */ public function setConditionalRequest($conditionalRequest) @@ -645,7 +620,6 @@ public function current() * Create a new route instance from an adapter route. * * @param array|\Illuminate\Routing\Route $route - * * @return \Dingo\Api\Routing\Route */ public function createRoute($route) @@ -657,7 +631,6 @@ public function createRoute($route) * Set the current route instance. * * @param \Dingo\Api\Routing\Route $route - * * @return void */ public function setCurrentRoute(Route $route) @@ -695,7 +668,6 @@ public function getLastGroupPrefix() * Get all routes registered on the adapter. * * @param string $version - * * @return mixed */ public function getRoutes($version = null) @@ -735,7 +707,6 @@ public function getAdapterRoutes() * Set the raw adapter routes. * * @param array $routes - * * @return void */ public function setAdapterRoutes(array $routes) @@ -779,7 +750,6 @@ public function currentRouteName() * Alias for the "currentRouteNamed" method. * * @param mixed string - * * @return bool */ public function is() @@ -797,7 +767,6 @@ public function is() * Determine if the current route matches a given name. * * @param string $name - * * @return bool */ public function currentRouteNamed($name) @@ -825,7 +794,6 @@ public function currentRouteAction() * Alias for the "currentRouteUses" method. * * @param mixed string - * * @return bool */ public function uses() @@ -843,7 +811,6 @@ public function uses() * Determine if the current route action matches a given action. * * @param string $action - * * @return bool */ public function currentRouteUses($action) diff --git a/src/Routing/UrlGenerator.php b/src/Routing/UrlGenerator.php index fda58e7e..78db4903 100644 --- a/src/Routing/UrlGenerator.php +++ b/src/Routing/UrlGenerator.php @@ -18,7 +18,6 @@ class UrlGenerator extends IlluminateUrlGenerator * Create a new URL generator instance. * * @param \Dingo\Api\Http\Request $request - * * @return void */ public function __construct(Request $request) @@ -30,7 +29,6 @@ public function __construct(Request $request) * Set the routes to use from the version. * * @param string $version - * * @return \Dingo\Api\Routing\UrlGenerator */ public function version($version) diff --git a/src/Transformer/Adapter/Fractal.php b/src/Transformer/Adapter/Fractal.php index 74d890a6..ef4a4199 100644 --- a/src/Transformer/Adapter/Fractal.php +++ b/src/Transformer/Adapter/Fractal.php @@ -51,7 +51,6 @@ class Fractal implements Adapter * @param string $includeKey * @param string $includeSeparator * @param bool $eagerLoading - * * @return void */ public function __construct(FractalManager $fractal, $includeKey = 'include', $includeSeparator = ',', $eagerLoading = true) @@ -69,7 +68,6 @@ public function __construct(FractalManager $fractal, $includeKey = 'include', $i * @param League\Fractal\TransformerAbstract|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) @@ -114,7 +112,6 @@ public function transform($response, $transformer, Binding $binding, Request $re * Eloquent collection and eager loading is enabled. * * @param mixed $response - * * @return bool */ protected function shouldEagerLoad($response) @@ -130,7 +127,6 @@ protected function shouldEagerLoad($response) * Create the Fractal paginator adapter. * * @param \Illuminate\Contracts\Pagination\Paginator $paginator - * * @return \League\Fractal\Pagination\IlluminatePaginatorAdapter */ protected function createPaginatorAdapter(IlluminatePaginator $paginator) @@ -144,7 +140,6 @@ protected function createPaginatorAdapter(IlluminatePaginator $paginator) * @param mixed $response * @param \League\Fractal\TransformerAbstract $transformer * @param array $parameters - * * @return \League\Fractal\Resource\Item|\League\Fractal\Resource\Collection */ protected function createResource($response, $transformer, array $parameters) @@ -162,7 +157,6 @@ protected function createResource($response, $transformer, array $parameters) * Parse the includes. * * @param \Dingo\Api\Http\Request $request - * * @return void */ public function parseFractalIncludes(Request $request) @@ -191,7 +185,6 @@ public function getFractal() * * @param \League\Fractal\TransformerAbstract $transformer * @param string|array $requestedIncludes - * * @return array */ protected function mergeEagerLoads($transformer, $requestedIncludes) diff --git a/src/Transformer/Binding.php b/src/Transformer/Binding.php index 0f203ab2..a89d0782 100644 --- a/src/Transformer/Binding.php +++ b/src/Transformer/Binding.php @@ -50,7 +50,6 @@ class Binding * @param mixed $resolver * @param array $parameters * @param \Closure $callback - * * @return void */ public function __construct(Container $container, $resolver, array $parameters = [], Closure $callback = null) @@ -64,9 +63,9 @@ public function __construct(Container $container, $resolver, array $parameters = /** * Resolve a transformer binding instance. * - * @throws \RuntimeException - * * @return object + * + * @throws \RuntimeException */ public function resolveTransformer() { @@ -85,7 +84,6 @@ public function resolveTransformer() * Fire the binding callback. * * @param string|array $parameters - * * @return void */ public function fireCallback($parameters = null) @@ -109,7 +107,6 @@ public function getParameters() * Set the meta data for the binding. * * @param array $meta - * * @return void */ public function setMeta(array $meta) @@ -122,7 +119,6 @@ public function setMeta(array $meta) * * @param string $key * @param mixed $value - * * @return void */ public function addMeta($key, $value) diff --git a/src/Transformer/Factory.php b/src/Transformer/Factory.php index ce8676bb..35fb11db 100644 --- a/src/Transformer/Factory.php +++ b/src/Transformer/Factory.php @@ -39,7 +39,6 @@ class Factory * * @param \Illuminate\Container\Container $container * @param \Dingo\Api\Contract\Transformer\Adapter $adapter - * * @return void */ public function __construct(Container $container, Adapter $adapter) @@ -55,7 +54,6 @@ public function __construct(Container $container, Adapter $adapter) * @param $resolver * @param array $parameters * @param \Closure|null $after - * * @return \Dingo\Api\Transformer\Binding */ public function register($class, $resolver, array $parameters = [], Closure $after = null) @@ -67,7 +65,6 @@ public function register($class, $resolver, array $parameters = [], Closure $aft * Transform a response. * * @param string|object $response - * * @return mixed */ public function transform($response) @@ -81,7 +78,6 @@ public function transform($response) * Determine if a response is transformable. * * @param mixed $response - * * @return bool */ public function transformableResponse($response) @@ -93,7 +89,6 @@ public function transformableResponse($response) * Determine if a value is of a transformable type. * * @param mixed $value - * * @return bool */ public function transformableType($value) @@ -105,10 +100,9 @@ public function transformableType($value) * Get a registered transformer binding. * * @param string|object $class + * @return \Dingo\Api\Transformer\Binding * * @throws \RuntimeException - * - * @return \Dingo\Api\Transformer\Binding */ public function getBinding($class) { @@ -131,7 +125,6 @@ public function getBinding($class) * @param string|callable|object $resolver * @param array $parameters * @param \Closure $callback - * * @return \Dingo\Api\Transformer\Binding */ protected function createBinding($resolver, array $parameters = [], Closure $callback = null) @@ -143,7 +136,6 @@ protected function createBinding($resolver, array $parameters = [], Closure $cal * Get a registered transformer binding from a collection of items. * * @param \Illuminate\Support\Collection $collection - * * @return null|string|callable */ protected function getBindingFromCollection($collection) @@ -155,7 +147,6 @@ protected function getBindingFromCollection($collection) * Determine if a class has a transformer binding. * * @param string|object $class - * * @return bool */ protected function hasBinding($class) @@ -173,7 +164,6 @@ protected function hasBinding($class) * Determine if the instance is a collection. * * @param object $instance - * * @return bool */ protected function isCollection($instance) @@ -195,7 +185,6 @@ public function getTransformerBindings() * Set the transformation layer at runtime. * * @param \Closure|\Dingo\Api\Contract\Transformer\Adapter $adapter - * * @return void */ public function setAdapter($adapter) @@ -238,7 +227,6 @@ public function getRequest() * * @param string $method * @param array $parameters - * * @return mixed */ public function __call($method, $parameters) diff --git a/src/helpers.php b/src/helpers.php index 50d4bd0e..84c7eee2 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -5,7 +5,6 @@ * Set the version to generate API URLs to. * * @param string $version - * * @return \Dingo\Api\Routing\UrlGenerator */ function version($version)