for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
use FatCode\OpenApi\Annotation as Api;
use FatCode\OpenApi\Http\Response;
use FatCode\OpenApi\Schema\TextPlain;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
/**
* @Api\Application(
* version="1.0.0",
* title="Example get route",
* servers=[
* @Api\Server(port=8080, host="localhost")
* ],
* )
*/
class Application
{
}
* @Api\PathItem\Get(
* route="/something/{id}",
* parameters=[
* @Api\Parameter(name="id", in="path", schema=@Api\Schema(type="int"))
* responses=[
* @Api\Response(code=200, schema=@Api\Reference(TextPlain::class))
* ]
*
* @param ServerRequestInterface $request
* @return ResponseInterface
function getSomething(ServerRequestInterface $request) : ResponseInterface
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
function getSomething(/** @scrutinizer ignore-unused */ ServerRequestInterface $request) : ResponseInterface
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return new Response(200, "Hello world");
//open-api build ./src
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.