Skip to content

Commit

Permalink
Fix up PHPStan.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jan 4, 2024
1 parent 12368f0 commit fb5dd9d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Geocoder/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
namespace Geo\Geocoder;

use Cake\Http\Client\Response;
use Http\Message\ResponseFactory as ResponseFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;

class ResponseFactory implements ResponseFactoryInterface {

/**
* @inheritDoc
* @param int $code
* @param string $reasonPhrase
* @param array<string, mixed> $headers
* @param string|null $body
*
* @return \Psr\Http\Message\ResponseInterface
*/
public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $protocolVersion = '1.1') {
public function createResponse(int $code = 200, string $reasonPhrase = '', array $headers = [], ?string $body = null): ResponseInterface {
return new Response($headers, (string)$body);
}

Expand Down

0 comments on commit fb5dd9d

Please sign in to comment.