Skip to content

Commit 1467264

Browse files
committed
add factory stub for phpstan
1 parent e8e2155 commit 1467264

6 files changed

+26
-5
lines changed

phpstan.neon.dist

+21
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ parameters:
3131
count: 1
3232
path: src/EmulatedHttpClient.php
3333

34+
# we still support the obsolete RequestFactory for BC but do not require the package anymore
35+
-
36+
message: "#^Call to method createRequest\\(\\) on an unknown class Http\\\\Message\\\\RequestFactory\\.$#"
37+
count: 1
38+
path: src/HttpMethodsClient.php
39+
40+
-
41+
message: "#^Class Http\\\\Message\\\\RequestFactory not found\\.$#"
42+
count: 4
43+
path: src/HttpMethodsClient.php
44+
45+
-
46+
message: "#^Parameter \\$requestFactory of method Http\\\\Client\\\\Common\\\\HttpMethodsClient\\:\\:__construct\\(\\) has invalid type Http\\\\Message\\\\RequestFactory\\.$#"
47+
count: 1
48+
path: src/HttpMethodsClient.php
49+
50+
-
51+
message: "#^Property Http\\\\Client\\\\Common\\\\HttpMethodsClient\\:\\:\\$requestFactory has unknown class Http\\\\Message\\\\RequestFactory as its type\\.$#"
52+
count: 1
53+
path: src/HttpMethodsClient.php
54+
3455
-
3556
message: "#^Anonymous function should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
3657
count: 1

tests/Plugin/AddPathPluginTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace tests\Http\Client\Common\Plugin;
3+
namespace Tests\Http\Client\Common\Plugin;
44

55
use Http\Client\Common\Plugin;
66
use Http\Client\Common\Plugin\AddPathPlugin;

tests/Plugin/RedirectPluginTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Plugin;
5+
namespace Tests\Http\Cient\Common\Plugin;
66

77
use Http\Client\Common\Exception\CircularRedirectionException;
88
use Http\Client\Common\Plugin\RedirectPlugin;

tests/PluginChainTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace tests\Http\Client\Common;
5+
namespace Tests\Http\Client\Common;
66

77
use Http\Client\Common\Exception\LoopException;
88
use Http\Client\Common\Plugin;

tests/PluginClientBuilderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace tests\Http\Client\Common;
5+
namespace Tests\Http\Client\Common;
66

77
use Http\Client\Common\Plugin;
88
use Http\Client\Common\PluginClient;

tests/PluginClientTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace tests\Http\Client\Common;
5+
namespace Tests\Http\Client\Common;
66

77
use Http\Client\Common\Plugin;
88
use Http\Client\Common\Plugin\HeaderAppendPlugin;

0 commit comments

Comments
 (0)