# decalog/4.4.0/includes/libraries/http/discovery/Strategy/MockClientStrategy.php

DecaLog, version 4.4.0. 25 lines.

- Page: https://pluginprobe.com/plugins/decalog/4.4.0/code/includes/libraries/http/discovery/Strategy/MockClientStrategy.php
- Raw: https://pluginprobe.com/plugins/decalog/4.4.0/raw/includes/libraries/http/discovery/Strategy/MockClientStrategy.php
- Modified: 2024-05-13T07:42:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/decalog/4.4.0/code/includes/libraries/http/discovery/Strategy/MockClientStrategy.php#L10-L20`.

```php
<?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
{
    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 [];
    }
}

```
