WakatimeClientFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createForConfig() 0 9 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