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

Api::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 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
}