PHP 8.2.30
Preview: MockClientStrategy.php Size: 540 B
/home/byroehnu/easetack.com/vendor/php-http/discovery/src/Strategy/MockClientStrategy.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 [];
    }
}

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
7.73 KB lrw-rw-rw- 2024-10-02 11:20:13
Edit Download
3.86 KB lrw-rw-rw- 2024-10-02 11:20:13
Edit Download
613 B lrw-rw-rw- 2024-10-02 11:20:13
Edit Download
540 B lrw-rw-rw- 2024-10-02 11:20:13
Edit Download
2.19 KB lrw-rw-rw- 2024-10-02 11:20:13
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).