WakatimeClientFactory::createForConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace Kallencode\Wakatime;
4
5
class WakatimeClientFactory
6
{
7
8
    public static function createForConfig(array $config) : WakatimeClient
9
    {
10
        $guzzleClient = new \GuzzleHttp\Client;
11
12
        $baseUrl = $config['baseUrl'];
13
        $apiKey = $config['apiKey'];
14
15
        return new WakatimeClient($guzzleClient, $baseUrl, $apiKey);
16
    }
17
}
18