-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #473 from php-http/strict-typing
Declare parameter and return types
- Loading branch information
Showing
26 changed files
with
137 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,14 @@ | |
namespace Http\HttplugBundle\ClientFactory; | ||
|
||
use Http\Adapter\Guzzle6\Client; | ||
use Psr\Http\Client\ClientInterface; | ||
|
||
/** | ||
* @author Tobias Nyholm <[email protected]> | ||
*/ | ||
final class Guzzle6Factory implements ClientFactory | ||
{ | ||
public function createClient(array $config = []) | ||
public function createClient(array $config = []): ClientInterface | ||
{ | ||
if (!class_exists('Http\Adapter\Guzzle6\Client')) { | ||
throw new \LogicException('To use the Guzzle6 adapter you need to install the "php-http/guzzle6-adapter" package.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,14 @@ | |
namespace Http\HttplugBundle\ClientFactory; | ||
|
||
use Http\Adapter\Guzzle7\Client; | ||
use Psr\Http\Client\ClientInterface; | ||
|
||
/** | ||
* @author Tobias Nyholm <[email protected]> | ||
*/ | ||
final class Guzzle7Factory implements ClientFactory | ||
{ | ||
public function createClient(array $config = []) | ||
public function createClient(array $config = []): ClientInterface | ||
{ | ||
if (!class_exists('Http\Adapter\Guzzle7\Client')) { | ||
throw new \LogicException('To use the Guzzle7 adapter you need to install the "php-http/guzzle7-adapter" package.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,14 @@ | |
namespace Http\HttplugBundle\ClientFactory; | ||
|
||
use Http\Adapter\React\Client; | ||
use Psr\Http\Client\ClientInterface; | ||
|
||
/** | ||
* @author Tobias Nyholm <[email protected]> | ||
*/ | ||
final class ReactFactory implements ClientFactory | ||
{ | ||
public function createClient(array $config = []) | ||
public function createClient(array $config = []): ClientInterface | ||
{ | ||
if (!class_exists('Http\Adapter\React\Client')) { | ||
throw new \LogicException('To use the React adapter you need to install the "php-http/react-adapter" package.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,14 @@ | |
namespace Http\HttplugBundle\ClientFactory; | ||
|
||
use Http\Client\Socket\Client; | ||
use Psr\Http\Client\ClientInterface; | ||
|
||
/** | ||
* @author Tobias Nyholm <[email protected]> | ||
*/ | ||
final class SocketFactory implements ClientFactory | ||
{ | ||
public function createClient(array $config = []) | ||
public function createClient(array $config = []): ClientInterface | ||
{ | ||
if (!class_exists('Http\Client\Socket\Client')) { | ||
throw new \LogicException('To use the Socket client you need to install the "php-http/socket-client" package.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.