Skip to content

Commit 724f0a1

Browse files
gmponosNyholm
authored andcommitted
Added declare strict types (#137)
1 parent 53bddb2 commit 724f0a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+105
-2
lines changed

src/BatchClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Exception;

src/BatchClientInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

5-
use Http\Client\Exception;
67
use Http\Client\HttpClient;
78
use Http\Client\Common\Exception\BatchException;
89
use Psr\Http\Message\RequestInterface;

src/BatchResult.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Exception;

src/Deferred.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Exception;

src/EmulatedHttpAsyncClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\HttpAsyncClient;

src/EmulatedHttpClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\HttpAsyncClient;

src/Exception/BatchException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\TransferException;

src/Exception/CircularRedirectionException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\HttpException;

src/Exception/ClientErrorException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\HttpException;

src/Exception/HttpClientNotFoundException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\TransferException;

src/Exception/LoopException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\RequestException;

src/Exception/MultipleRedirectionException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\HttpException;

src/Exception/ServerErrorException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Exception;
46

57
use Http\Client\Exception\HttpException;

src/FlexibleHttpClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\HttpAsyncClient;

src/HttpAsyncClientDecorator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\HttpAsyncClient;

src/HttpAsyncClientEmulator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Exception;

src/HttpClientDecorator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Psr\Http\Client\ClientInterface;

src/HttpClientEmulator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Psr\Http\Message\RequestInterface;

src/HttpClientPool.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Common\HttpClientPool\HttpClientPoolItem;

src/HttpClientPool/HttpClientPool.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\HttpClientPool;
46

57
use Http\Client\Common\Exception\HttpClientNotFoundException;

src/HttpClientPool/HttpClientPoolItem.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\HttpClientPool;
46

57
use Http\Client\Common\FlexibleHttpClient;

src/HttpClientPool/LeastUsedClientPool.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\HttpClientPool;
46

57
use Http\Client\Common\Exception\HttpClientNotFoundException;

src/HttpClientPool/RandomClientPool.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\HttpClientPool;
46

57
use Http\Client\Common\Exception\HttpClientNotFoundException;

src/HttpClientPool/RoundRobinClientPool.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\HttpClientPool;
46

57
use Http\Client\Common\Exception\HttpClientNotFoundException;

src/HttpClientRouter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Exception\RequestException;

src/HttpClientRouterInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\HttpAsyncClient;

src/HttpMethodsClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Message\RequestFactory;

src/HttpMethodsClientInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Client\Exception;

src/Plugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common;
46

57
use Http\Promise\Promise;

src/Plugin/AddHostPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/AddPathPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/AuthenticationPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/BaseUriPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/ContentLengthPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/ContentTypePlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/CookiePlugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;
@@ -127,7 +129,7 @@ private function createCookie(RequestInterface $request, $setCookie)
127129
$name,
128130
$value
129131
),
130-
null,
132+
0,
131133
$e
132134
);
133135
}

src/Plugin/DecoderPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/ErrorPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Exception\ClientErrorException;

src/Plugin/HeaderAppendPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/HeaderDefaultsPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/HeaderRemovePlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/HeaderSetPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/HistoryPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/Journal.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Exception;

src/Plugin/QueryDefaultsPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/RedirectPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Exception\CircularRedirectionException;

src/Plugin/RequestMatcherPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

src/Plugin/RetryPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Http\Client\Common\Plugin;
46

57
use Http\Client\Common\Plugin;

0 commit comments

Comments
 (0)