blob: ea464cf0b34092cf3f2c871a4c490c3bd855d91a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Http\Discovery\Strategy;
use Http\Client\HttpClient;
use Http\Mock\Client as Mock;
/**
* Find the Mock client.
*
* @author Sam Rapaport <me@samrapdev.com>
*/
final class MockClientStrategy implements DiscoveryStrategy
{
/**
* {@inheritdoc}
*/
public static function getCandidates($type)
{
return ($type === HttpClient::class)
? [['class' => Mock::class, 'condition' => Mock::class]]
: [];
}
}
|