Completed
Push — master ( 49b16a...bbcd37 )
by Sergey
13:21
created

Client   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __get() 0 4 1
1
<?php
2
3
namespace seregazhuk\HeadHunterApi;
4
5
use seregazhuk\HeadHunterApi\EndPoints\Me;
6
use seregazhuk\HeadHunterApi\EndPoints\Regions;
7
use seregazhuk\HeadHunterApi\EndPoints\Resumes;
8
use seregazhuk\HeadHunterApi\EndPoints\Comments;
9
use seregazhuk\HeadHunterApi\EndPoints\Artifacts;
10
use seregazhuk\HeadHunterApi\EndPoints\Vacancies;
11
use seregazhuk\HeadHunterApi\EndPoints\Employers;
12
use seregazhuk\HeadHunterApi\EndPoints\Industries;
13
use seregazhuk\HeadHunterApi\EndPoints\Negotiations;
14
use seregazhuk\HeadHunterApi\EndPoints\SavedSearches;
15
use seregazhuk\HeadHunterApi\EndPoints\Specializations;
16
use seregazhuk\HeadHunterApi\EndPoints\EndpointsContainer;
17
18
/**
19
 * Class Api
20
 * @property Vacancies $vacancies
21
 * @property Employers $employers
22
 * @property Regions $regions
23
 * @property Specializations $specializations
24
 * @property Industries $industries
25
 * @property Me $me
26
 * @property Resumes $resumes
27
 * @property Artifacts $artifacts
28
 * @property Negotiations $negotiations
29
 * @property SavedSearches $savedSearches
30
 * @property Comments $comments
31
 */
32
class Client {
33
34
    private $endpointsContainer;
35
36
    public function __construct(EndpointsContainer $endpointsContainer)
37
    {
38
        $this->endpointsContainer = $endpointsContainer;
39
    }
40
41
    public function __get($endpoint)
42
    {
43
        return $this->endpointsContainer->getEndpoint($endpoint);
44
    }
45
}