1 | <?php |
||
2 | |||
3 | namespace ByTIC\Payments\Stripe\Tests; |
||
4 | |||
5 | use Omnipay\Common\Http\Client; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | use Symfony\Component\HttpFoundation\Request as HttpRequest; |
||
8 | |||
9 | /** |
||
10 | * Class AbstractTest |
||
11 | */ |
||
12 | abstract class AbstractTest extends TestCase |
||
13 | { |
||
14 | protected $object; |
||
15 | |||
16 | /** |
||
17 | * @var \Guzzle\Http\Client |
||
0 ignored issues
–
show
|
|||
18 | */ |
||
19 | protected $client; |
||
20 | |||
21 | /** |
||
22 | * @param $path |
||
23 | * @return HttpRequest |
||
24 | */ |
||
25 | protected function generateRequestFromFixtures($path) |
||
26 | { |
||
27 | $httpRequest = HttpRequest::createFromGlobals(); |
||
28 | $parameters = require $path; |
||
29 | |||
30 | $httpRequest->query->replace(isset($parameters['GET']) ? $parameters['GET'] : []); |
||
31 | $httpRequest->request->replace(isset($parameters['POST']) ? $parameters['POST'] : []); |
||
32 | return $httpRequest; |
||
33 | } |
||
34 | |||
35 | protected function setUp() : void |
||
36 | { |
||
37 | parent::setUp(); |
||
38 | $this->client = new Client(); |
||
0 ignored issues
–
show
It seems like
new Omnipay\Common\Http\Client() of type Omnipay\Common\Http\Client is incompatible with the declared type Guzzle\Http\Client of property $client .
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property. Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.. ![]() |
|||
39 | // $this->client->setConfig( |
||
40 | // [ |
||
41 | // 'curl.CURLOPT_SSL_VERIFYHOST' => false, |
||
42 | // 'curl.CURLOPT_SSL_VERIFYPEER' => false |
||
43 | // ] |
||
44 | // ); |
||
45 | // $this->client->setSslVerification(false, false); |
||
46 | } |
||
47 | } |
||
48 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths