1 | <?php |
||
22 | final class PluginClientFactory |
||
23 | { |
||
24 | /** |
||
25 | * @var Collector |
||
26 | */ |
||
27 | private $collector; |
||
28 | |||
29 | /** |
||
30 | * @var Formatter |
||
31 | */ |
||
32 | private $formatter; |
||
33 | |||
34 | /** |
||
35 | * @var Stopwatch |
||
36 | */ |
||
37 | private $stopwatch; |
||
38 | |||
39 | 8 | public function __construct(Collector $collector, Formatter $formatter, Stopwatch $stopwatch) |
|
45 | |||
46 | /** |
||
47 | * @param HttpClient|ClientInterface|HttpAsyncClient $client |
||
48 | * @param Plugin[] $plugins |
||
49 | * @param array $options { |
||
50 | * |
||
51 | * @var string $client_name to give client a name which may be used when displaying client information like in |
||
52 | * the HTTPlugBundle profiler. |
||
53 | * } |
||
54 | * |
||
55 | * @see PluginClient constructor for PluginClient specific $options. |
||
56 | * |
||
57 | * @return PluginClient |
||
58 | */ |
||
59 | 5 | public function createClient($client, array $plugins = [], array $options = []) |
|
75 | } |
||
76 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.