for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Finder\Http\Actions;
use Finder\Http\Proxy\Contracts\OAuthProxy;
use Finder\Http\Requests\CreateAuthRequest;
use Illuminate\Contracts\Routing\ResponseFactory;
use Illuminate\Http\Response;
/**
* Class AuthCreateAction.
*
* @package Finder\Http\Actions
*/
class AuthCreateAction
{
* @var OAuthProxy
protected $oAuthProxy;
* AuthCreateAction constructor.
* @param ResponseFactory $responseFactory
$responseFactory
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param OAuthProxy $oAuthProxy
public function __construct(OAuthProxy $oAuthProxy)
$this->oAuthProxy = $oAuthProxy;
}
* @apiVersion 1.0.0
* @api {post} /v1/auth/token Create
* @apiName Create
* @apiGroup Auth
* @apiHeader {String} Accept application/json
* @apiHeader {String} Content-Type application/json
* @apiParamExample {json} Request-Body-Example:
* {
* "email": "[email protected]",
* "password": "password"
* }
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 204 No Content
* Create an auth token.
* @param CreateAuthRequest $request
* @return Response
public function __invoke(CreateAuthRequest $request)
return $this->oAuthProxy->requestTokenByCredentials(
env('OAUTH_CLIENT_ID'),
$request->input('email'),
$request->input('password')
);
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.