for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gravatalonga\Framework\Testing\Traits;
use Nyholm\Psr7\Request;
use Nyholm\Psr7\ServerRequest;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
trait MakeRequestTrait
{
/**
* Generate a call to request
*
* @param string $method
* @param string $endpoint
* @param string $body
* @param array $headers
* @param array $serverParams
* @return ResponseInterface
*/
public function call(string $method, string $endpoint, string $body = '', array $headers = [], array $serverParams = []) : ResponseInterface
$serverParams
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function call(string $method, string $endpoint, string $body = '', array $headers = [], /** @scrutinizer ignore-unused */ array $serverParams = []) : ResponseInterface
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$request = new ServerRequest($method, $endpoint, $headers, $body);
return $this->app->handle($request);
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.