mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-11 21:38:39 +00:00
28 lines
577 B
PHP
Executable File
28 lines
577 B
PHP
Executable File
<?php
|
|
|
|
namespace Http\Discovery\Strategy;
|
|
|
|
use Http\Client\HttpAsyncClient;
|
|
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)
|
|
{
|
|
if (is_a(HttpClient::class, $type, true) || is_a(HttpAsyncClient::class, $type, true)) {
|
|
return [['class' => Mock::class, 'condition' => Mock::class]];
|
|
}
|
|
|
|
return [];
|
|
}
|
|
}
|