Completed
Pull Request — master (#9)
by Sergey
07:18
created

Api   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 3
c 5
b 0
f 0
lcom 0
cbo 4
dl 0
loc 27
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
A __clone() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace seregazhuk\HeadHunterApi;
4
5
use seregazhuk\HeadHunterApi\Adapters\GuzzleHttpAdater;
6
use seregazhuk\HeadHunterApi\EndPoints\EndpointsContainer;
7
8
class Api
9
{
10
    /**
11
     * @param string|null $token
12
     * @return Client
13
     */
14
    public static function create($token = null)
15
    {
16
        $request = new Request(new GuzzleHttpAdater(), $token);
17
        $endpointsContainer = new EndpointsContainer($request);
18
        return new Client($endpointsContainer);
19
    }
20
21
    /**
22
     * @codeCoverageIgnore
23
     */
24
    private function __clone()
25
    {
26
    }
27
28
    /**
29
     * @codeCoverageIgnore
30
     */
31
    private function __construct()
32
    {
33
    }
34
}