Code Duplication    Length = 8-8 lines in 2 locations

src/FallbackStrategy/HttpClients.php 2 locations

@@ 18-25 (lines=8) @@
15
    public static function findOneByType($type)
16
    {
17
        switch ($type) {
18
            case 'Http\Client\HttpAsyncClient':
19
                $clients = ['Http\Adapter\Guzzle6\Client'];
20
                foreach ($clients as $class) {
21
                    if (class_exists($class)) {
22
                        return $class;
23
                    }
24
                }
25
                break;
26
            case 'Http\Client\HttpClient':
27
                $clients = ['Http\Adapter\Guzzle6\Client', 'Http\Adapter\Guzzle5\Client'];
28
                foreach ($clients as $class) {
@@ 26-33 (lines=8) @@
23
                    }
24
                }
25
                break;
26
            case 'Http\Client\HttpClient':
27
                $clients = ['Http\Adapter\Guzzle6\Client', 'Http\Adapter\Guzzle5\Client'];
28
                foreach ($clients as $class) {
29
                    if (class_exists($class)) {
30
                        return $class;
31
                    }
32
                }
33
                break;
34
        }
35
36
        return false;