Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
34 | 2 | public function __construct(array $config, Factory $clientFactory = null) |
|
35 | { |
||
36 | 2 | if (! $clientFactory) { |
|
37 | 2 | $clientFactory = new Factory(); |
|
38 | 2 | } |
|
39 | |||
40 | 2 | $clientConfig = array(); |
|
41 | |||
42 | 2 | if (isset($config['timeout'])) { |
|
43 | 2 | $clientConfig ['timeout'] = $config['timeout']; |
|
44 | 2 | } |
|
45 | |||
46 | 2 | $mapFactory = new FileSystemMapFactory(); |
|
47 | 2 | $this->map = $mapFactory->create($config['maps']); |
|
48 | 2 | $this->defaultClient = $clientFactory->create($config['default_client'], $clientConfig); |
|
49 | 2 | } |
|
50 | |||
65 |