Skip to content

Commit

Permalink
PSR-17 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
bpolaszek committed Aug 31, 2018
1 parent 7e9966b commit 28cedcf
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"license": "MIT",
"require": {
"php": ">=7.1",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/GuzzleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function __construct()
/**
* @inheritDoc
*/
public function createUri(string $uri): UriInterface
public function createUri(string $uri = ''): UriInterface
{
return new Uri($uri);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/LeagueUriAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class LeagueUriAdapter implements AdapterInterface
/**
* @inheritDoc
*/
public function createUri(string $uri): UriInterface
public function createUri(string $uri = ''): UriInterface
{
return Http::createFromString($uri);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/ZendDiactorosAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function __construct()
/**
* @inheritDoc
*/
public function createUri(string $uri): UriInterface
public function createUri(string $uri = ''): UriInterface
{
return new Uri($uri);
}
Expand Down
2 changes: 1 addition & 1 deletion src/UriFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private function getDefaultAdapters()
* @param UriFactoryInterface|null $factory
* @return UriInterface
*/
public function createUri(string $uri, UriFactoryInterface $factory = null): UriInterface
public function createUri(string $uri = '', UriFactoryInterface $factory = null): UriInterface
{
if (null !== $factory) {
return $factory->createUri($uri);
Expand Down
4 changes: 2 additions & 2 deletions src/UriFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use Psr\Http\Message\UriInterface;

interface UriFactoryInterface
interface UriFactoryInterface extends \Psr\Http\Message\UriFactoryInterface
{

/**
* @param string $uri
* @return UriInterface
*/
public function createUri(string $uri): UriInterface;
public function createUri(string $uri = ''): UriInterface;

/**
* @return UriFactoryInterface
Expand Down

0 comments on commit 28cedcf

Please sign in to comment.