1 | <?php |
||
18 | class BatchClient implements HttpClient |
||
19 | { |
||
20 | /** |
||
21 | * @var HttpClient|ClientInterface |
||
22 | */ |
||
23 | private $client; |
||
24 | |||
25 | /** |
||
26 | * @param HttpClient|ClientInterface $client |
||
27 | */ |
||
28 | 2 | public function __construct($client) |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | 2 | public function sendRequest(RequestInterface $request) |
|
44 | |||
45 | /** |
||
46 | * Send several requests. |
||
47 | * |
||
48 | * You may not assume that the requests are executed in a particular order. If the order matters |
||
49 | * for your application, use sendRequest sequentially. |
||
50 | * |
||
51 | * @param RequestInterface[] The requests to send |
||
52 | * |
||
53 | * @return BatchResult Containing one result per request |
||
54 | * |
||
55 | * @throws BatchException If one or more requests fails. The exception gives access to the |
||
56 | * BatchResult with a map of request to result for success, request to |
||
57 | * exception for failures |
||
58 | */ |
||
59 | 2 | public function sendRequests(array $requests) |
|
78 | } |
||
79 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.