$method of type string is incompatible with the type DevOp\Core\Http\type expected by parameter $method of DevOp\Core\Http\ServerRequest::__construct().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
22
return new ServerRequest(/** @scrutinizer ignore-type */ $method, $uri);
Loading history...
23
}
24
25
/**
26
* @param array $server
27
* @return ServerRequest
28
*/
29
14
public function createServerRequestFromArray(array $server)
30
{
31
14
$method = $server['REQUEST_METHOD'] ?: 'GET';
32
14
$uri = ServerRequest::getUriFromGlobals($server);
33
14
$body = (new StreamFactory())->createStreamFromFile('php://temp', 'r+');
34
35
14
return new ServerRequest($method, $uri, $server, $body, '1.1');
'1.1' of type string is incompatible with the type DevOp\Core\Http\type expected by parameter $version of DevOp\Core\Http\ServerRequest::__construct().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
It seems like $method can also be of type string; however, parameter $method of DevOp\Core\Http\ServerRequest::__construct() does only seem to accept DevOp\Core\Http\type, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation