Issues (1)

src/Client.php (1 issue)

1
<?php
2
3
namespace Swis\Http\Fixture;
4
5
use Http\Mock\Client as MockClient;
6
use Psr\Http\Message\RequestInterface;
7
use Psr\Http\Message\ResponseInterface;
8
9
class Client extends MockClient
10
{
11
    /**
12
     * @var \Swis\Http\Fixture\ResponseBuilderInterface
13
     */
14
    protected $fixtureResponseBuilder;
15
16
    /**
17
     * @param \Swis\Http\Fixture\ResponseBuilderInterface                                   $fixtureResponseBuilder
18
     * @param \Http\Message\ResponseFactory|\Psr\Http\Message\ResponseFactoryInterface|null $responseFactory
0 ignored issues
show
The type Http\Message\ResponseFactory was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
     */
20 6
    public function __construct(ResponseBuilderInterface $fixtureResponseBuilder, $responseFactory = null)
21
    {
22 6
        parent::__construct($responseFactory);
23
24 6
        $this->fixtureResponseBuilder = $fixtureResponseBuilder;
25 1
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 6
    public function sendRequest(RequestInterface $request): ResponseInterface
31
    {
32 6
        $this->setDefaultResponse($this->fixtureResponseBuilder->build($request));
33
34 6
        return parent::sendRequest($request);
35
    }
36
}
37