Completed
Pull Request — master (#92)
by
unknown
06:47
created

MockClientStrategy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10

1 Method

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