File tree 29 files changed +87
-88
lines changed
29 files changed +87
-88
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,6 @@ return PhpCsFixer\Config::create()
19
19
],
20
20
'no_empty_phpdoc ' => true ,
21
21
'no_superfluous_phpdoc_tags ' => true ,
22
+ 'single_line_throw ' => false ,
22
23
])
23
24
->setFinder ($ finder );
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common ;
4
4
5
- use Http \Client \HttpClient ;
6
- use Psr \Http \Message \RequestInterface ;
7
- use Psr \Http \Message \ResponseInterface ;
8
- use PhpSpec \ObjectBehavior ;
9
5
use Http \Client \Common \BatchClient ;
10
6
use Http \Client \Common \BatchResult ;
11
- use Http \Client \Exception \HttpException ;
12
7
use Http \Client \Common \Exception \BatchException ;
8
+ use Http \Client \Exception \HttpException ;
9
+ use Http \Client \HttpClient ;
10
+ use PhpSpec \ObjectBehavior ;
11
+ use Psr \Http \Message \RequestInterface ;
12
+ use Psr \Http \Message \ResponseInterface ;
13
13
14
14
class BatchClientSpec extends ObjectBehavior
15
15
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common ;
4
4
5
+ use Http \Client \Common \BatchResult ;
5
6
use Http \Client \Exception ;
7
+ use PhpSpec \ObjectBehavior ;
6
8
use Psr \Http \Message \RequestInterface ;
7
9
use Psr \Http \Message \ResponseInterface ;
8
- use PhpSpec \ObjectBehavior ;
9
- use Http \Client \Common \BatchResult ;
10
10
11
11
class BatchResultSpec extends ObjectBehavior
12
12
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common ;
4
4
5
- use Http \Client \HttpClient ;
6
- use Psr \Http \Message \RequestInterface ;
7
- use Psr \Http \Message \ResponseInterface ;
8
- use PhpSpec \ObjectBehavior ;
9
5
use Http \Client \Common \EmulatedHttpAsyncClient ;
6
+ use Http \Client \Exception \TransferException ;
10
7
use Http \Client \HttpAsyncClient ;
8
+ use Http \Client \HttpClient ;
11
9
use Http \Client \Promise \HttpFulfilledPromise ;
12
- use Http \Client \Exception \TransferException ;
13
10
use Http \Client \Promise \HttpRejectedPromise ;
11
+ use PhpSpec \ObjectBehavior ;
12
+ use Psr \Http \Message \RequestInterface ;
13
+ use Psr \Http \Message \ResponseInterface ;
14
14
15
15
class EmulatedHttpAsyncClientSpec extends ObjectBehavior
16
16
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common ;
4
4
5
+ use Http \Client \Common \EmulatedHttpClient ;
6
+ use Http \Client \Exception ;
5
7
use Http \Client \Exception \TransferException ;
6
8
use Http \Client \HttpAsyncClient ;
7
9
use Http \Client \HttpClient ;
8
10
use Http \Promise \Promise ;
11
+ use PhpSpec \ObjectBehavior ;
9
12
use Psr \Http \Message \RequestInterface ;
10
13
use Psr \Http \Message \ResponseInterface ;
11
- use PhpSpec \ObjectBehavior ;
12
- use Http \Client \Common \EmulatedHttpClient ;
13
- use Http \Client \Exception ;
14
14
15
15
class EmulatedHttpClientSpec extends ObjectBehavior
16
16
{
Original file line number Diff line number Diff line change 3
3
namespace spec \Http \Client \Common \Exception ;
4
4
5
5
use Http \Client \Common \BatchResult ;
6
+ use Http \Client \Common \Exception \BatchException ;
6
7
use Http \Client \Exception ;
7
8
use PhpSpec \ObjectBehavior ;
8
- use Http \Client \Common \Exception \BatchException ;
9
9
10
10
class BatchExceptionSpec extends ObjectBehavior
11
11
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common ;
4
4
5
+ use Http \Client \Common \FlexibleHttpClient ;
5
6
use Http \Client \HttpAsyncClient ;
6
7
use Http \Client \HttpClient ;
7
8
use Http \Promise \Promise ;
9
+ use PhpSpec \ObjectBehavior ;
8
10
use Psr \Http \Message \RequestInterface ;
9
11
use Psr \Http \Message \ResponseInterface ;
10
- use PhpSpec \ObjectBehavior ;
11
- use Http \Client \Common \FlexibleHttpClient ;
12
12
13
13
class FlexibleHttpClientSpec extends ObjectBehavior
14
14
{
Original file line number Diff line number Diff line change 3
3
namespace spec \Http \Client \Common \HttpClientPool ;
4
4
5
5
use Http \Client \Exception ;
6
+ use Http \Client \Exception \RequestException ;
6
7
use Http \Client \Exception \TransferException ;
7
8
use Http \Client \HttpAsyncClient ;
8
9
use Http \Client \HttpClient ;
12
13
use Prophecy \Argument ;
13
14
use Psr \Http \Message \RequestInterface ;
14
15
use Psr \Http \Message \ResponseInterface ;
15
- use Http \Client \Exception \RequestException ;
16
16
17
17
class HttpClientPoolItemSpec extends ObjectBehavior
18
18
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \HttpClientPool ;
4
4
5
+ use Http \Client \Common \Exception \HttpClientNotFoundException ;
5
6
use Http \Client \Common \HttpClientPool \HttpClientPoolItem ;
7
+ use Http \Client \Common \HttpClientPool \LeastUsedClientPool ;
8
+ use Http \Client \Exception \HttpException ;
6
9
use Http \Client \HttpAsyncClient ;
7
10
use Http \Client \HttpClient ;
8
11
use Http \Promise \Promise ;
9
12
use PhpSpec \ObjectBehavior ;
10
13
use Prophecy \Argument ;
11
14
use Psr \Http \Message \RequestInterface ;
12
15
use Psr \Http \Message \ResponseInterface ;
13
- use Http \Client \Common \HttpClientPool \LeastUsedClientPool ;
14
- use Http \Client \Common \Exception \HttpClientNotFoundException ;
15
- use Http \Client \Exception \HttpException ;
16
16
17
17
class LeastUsedClientPoolSpec extends ObjectBehavior
18
18
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \HttpClientPool ;
4
4
5
+ use Http \Client \Common \Exception \HttpClientNotFoundException ;
5
6
use Http \Client \Common \HttpClientPool \HttpClientPoolItem ;
7
+ use Http \Client \Common \HttpClientPool \RandomClientPool ;
8
+ use Http \Client \Exception \HttpException ;
6
9
use Http \Client \HttpAsyncClient ;
7
10
use Http \Client \HttpClient ;
8
11
use Http \Promise \Promise ;
9
12
use PhpSpec \ObjectBehavior ;
10
13
use Prophecy \Argument ;
11
14
use Psr \Http \Message \RequestInterface ;
12
15
use Psr \Http \Message \ResponseInterface ;
13
- use Http \Client \Common \HttpClientPool \RandomClientPool ;
14
- use Http \Client \Common \Exception \HttpClientNotFoundException ;
15
- use Http \Client \Exception \HttpException ;
16
16
17
17
class RandomClientPoolSpec extends ObjectBehavior
18
18
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \HttpClientPool ;
4
4
5
+ use Http \Client \Common \Exception \HttpClientNotFoundException ;
5
6
use Http \Client \Common \HttpClientPool \HttpClientPoolItem ;
7
+ use Http \Client \Common \HttpClientPool \RoundRobinClientPool ;
8
+ use Http \Client \Exception \HttpException ;
6
9
use Http \Client \HttpAsyncClient ;
7
10
use Http \Client \HttpClient ;
8
11
use Http \Promise \Promise ;
9
12
use PhpSpec \ObjectBehavior ;
10
13
use Prophecy \Argument ;
11
14
use Psr \Http \Message \RequestInterface ;
12
15
use Psr \Http \Message \ResponseInterface ;
13
- use Http \Client \Common \HttpClientPool \RoundRobinClientPool ;
14
- use Http \Client \Common \Exception \HttpClientNotFoundException ;
15
- use Http \Client \Exception \HttpException ;
16
16
17
17
class RoundRobinClientPoolSpec extends ObjectBehavior
18
18
{
Original file line number Diff line number Diff line change 4
4
5
5
use Http \Client \Common \Exception \HttpClientNoMatchException ;
6
6
use Http \Client \Common \HttpClientRouter ;
7
- use Http \Message \ RequestMatcher ;
7
+ use Http \Client \ Common \ HttpClientRouterInterface ;
8
8
use Http \Client \HttpAsyncClient ;
9
9
use Http \Client \HttpClient ;
10
+ use Http \Message \RequestMatcher ;
10
11
use Http \Promise \Promise ;
12
+ use PhpSpec \ObjectBehavior ;
11
13
use Psr \Http \Message \RequestInterface ;
12
14
use Psr \Http \Message \ResponseInterface ;
13
- use PhpSpec \ObjectBehavior ;
14
- use Http \Client \Common \HttpClientRouterInterface ;
15
15
16
16
class HttpClientRouterSpec extends ObjectBehavior
17
17
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \AddHostPlugin ;
7
+ use PhpSpec \ObjectBehavior ;
5
8
use Psr \Http \Message \RequestInterface ;
6
9
use Psr \Http \Message \UriInterface ;
7
- use PhpSpec \ObjectBehavior ;
8
- use Http \Client \Common \Plugin \AddHostPlugin ;
9
- use Http \Client \Common \Plugin ;
10
10
11
11
class AddHostPluginSpec extends ObjectBehavior
12
12
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \AddPathPlugin ;
7
+ use PhpSpec \ObjectBehavior ;
5
8
use Psr \Http \Message \RequestInterface ;
6
9
use Psr \Http \Message \UriInterface ;
7
- use PhpSpec \ObjectBehavior ;
8
- use Http \Client \Common \Plugin \AddPathPlugin ;
9
- use Http \Client \Common \Plugin ;
10
10
11
11
class AddPathPluginSpec extends ObjectBehavior
12
12
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \AuthenticationPlugin ;
5
7
use Http \Message \Authentication ;
6
8
use Http \Promise \Promise ;
7
- use Psr \Http \Message \RequestInterface ;
8
9
use PhpSpec \ObjectBehavior ;
9
10
use Prophecy \Argument ;
10
- use Http \Client \Common \Plugin \AuthenticationPlugin ;
11
- use Http \Client \Common \Plugin ;
11
+ use Psr \Http \Message \RequestInterface ;
12
12
13
13
class AuthenticationPluginSpec extends ObjectBehavior
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \BaseUriPlugin ;
7
+ use PhpSpec \ObjectBehavior ;
5
8
use Psr \Http \Message \RequestInterface ;
6
9
use Psr \Http \Message \UriInterface ;
7
- use PhpSpec \ObjectBehavior ;
8
- use Http \Client \Common \Plugin \BaseUriPlugin ;
9
- use Http \Client \Common \Plugin ;
10
10
11
11
class BaseUriPluginSpec extends ObjectBehavior
12
12
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \ContentLengthPlugin ;
5
7
use PhpSpec \Exception \Example \SkippingException ;
6
- use Psr \Http \Message \RequestInterface ;
7
- use Psr \Http \Message \StreamInterface ;
8
8
use PhpSpec \ObjectBehavior ;
9
9
use Prophecy \Argument ;
10
- use Http \Client \ Common \ Plugin \ ContentLengthPlugin ;
11
- use Http \Client \ Common \ Plugin ;
10
+ use Psr \ Http \Message \ RequestInterface ;
11
+ use Psr \ Http \Message \ StreamInterface ;
12
12
13
13
class ContentLengthPluginSpec extends ObjectBehavior
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \CookiePlugin ;
7
+ use Http \Client \Exception \TransferException ;
5
8
use Http \Client \Promise \HttpFulfilledPromise ;
9
+ use Http \Client \Promise \HttpRejectedPromise ;
6
10
use Http \Message \Cookie ;
7
11
use Http \Message \CookieJar ;
8
12
use Http \Promise \Promise ;
13
+ use PhpSpec \ObjectBehavior ;
9
14
use Psr \Http \Message \RequestInterface ;
10
15
use Psr \Http \Message \ResponseInterface ;
11
16
use Psr \Http \Message \UriInterface ;
12
- use PhpSpec \ObjectBehavior ;
13
- use Http \Client \Common \Plugin \CookiePlugin ;
14
- use Http \Client \Common \Plugin ;
15
- use Http \Client \Promise \HttpRejectedPromise ;
16
- use Http \Client \Exception \TransferException ;
17
17
18
18
class CookiePluginSpec extends ObjectBehavior
19
19
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Plugin ;
6
+ use Http \Client \Common \Plugin \DecoderPlugin ;
5
7
use Http \Client \Promise \HttpFulfilledPromise ;
6
- use Psr \Http \Message \RequestInterface ;
7
- use Psr \Http \Message \ResponseInterface ;
8
- use Psr \Http \Message \StreamInterface ;
8
+ use Http \Message \Encoding \DecompressStream ;
9
+ use Http \Message \Encoding \GzipDecodeStream ;
9
10
use PhpSpec \Exception \Example \SkippingException ;
10
11
use PhpSpec \ObjectBehavior ;
11
12
use Prophecy \Argument ;
12
- use Http \Client \Common \Plugin \DecoderPlugin ;
13
- use Http \Client \Common \Plugin ;
14
- use Http \Message \Encoding \GzipDecodeStream ;
15
- use Http \Message \Encoding \DecompressStream ;
13
+ use Psr \Http \Message \RequestInterface ;
14
+ use Psr \Http \Message \ResponseInterface ;
15
+ use Psr \Http \Message \StreamInterface ;
16
16
17
17
class DecoderPluginSpec extends ObjectBehavior
18
18
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
+ use Http \Client \Common \Exception \ClientErrorException ;
6
+ use Http \Client \Common \Exception \ServerErrorException ;
7
+ use Http \Client \Common \Plugin ;
8
+ use Http \Client \Common \Plugin \ErrorPlugin ;
5
9
use Http \Client \Promise \HttpFulfilledPromise ;
6
- use Psr \Http \Message \RequestInterface ;
7
- use Psr \Http \Message \ResponseInterface ;
10
+ use Http \Client \Promise \HttpRejectedPromise ;
8
11
use PhpSpec \ObjectBehavior ;
9
12
use Prophecy \Argument ;
10
- use Http \Client \Common \Plugin \ErrorPlugin ;
11
- use Http \Client \Common \Plugin ;
12
- use Http \Client \Promise \HttpRejectedPromise ;
13
- use Http \Client \Common \Exception \ClientErrorException ;
14
- use Http \Client \Common \Exception \ServerErrorException ;
13
+ use Psr \Http \Message \RequestInterface ;
14
+ use Psr \Http \Message \ResponseInterface ;
15
15
16
16
class ErrorPluginSpec extends ObjectBehavior
17
17
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
- use Http \Client \Exception \ TransferException ;
5
+ use Http \Client \Common \ Plugin ;
6
6
use Http \Client \Common \Plugin \Journal ;
7
+ use Http \Client \Exception \TransferException ;
7
8
use Http \Client \Promise \HttpFulfilledPromise ;
8
9
use Http \Client \Promise \HttpRejectedPromise ;
9
- use Psr \Http \Message \RequestInterface ;
10
- use Psr \Http \Message \ResponseInterface ;
11
10
use PhpSpec \ObjectBehavior ;
12
11
use Prophecy \Argument ;
13
- use Http \Client \Common \Plugin ;
12
+ use Psr \Http \Message \RequestInterface ;
13
+ use Psr \Http \Message \ResponseInterface ;
14
14
15
15
class HistoryPluginSpec extends ObjectBehavior
16
16
{
Original file line number Diff line number Diff line change 3
3
namespace spec \Http \Client \Common \Plugin ;
4
4
5
5
use Http \Client \Common \Plugin ;
6
- use Psr \ Http \Message \ RequestInterface ;
6
+ use Http \Client \ Common \ Plugin \ QueryDefaultsPlugin ;
7
7
use PhpSpec \ObjectBehavior ;
8
+ use Psr \Http \Message \RequestInterface ;
8
9
use Psr \Http \Message \UriInterface ;
9
- use Http \Client \Common \Plugin \QueryDefaultsPlugin ;
10
10
11
11
class QueryDefaultsPluginSpec extends ObjectBehavior
12
12
{
You can’t perform that action at this time.
0 commit comments