Completed
Push — master ( 5d7f79...9c70e0 )
by Sergey
02:25
created

Resumes   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 3
dl 0
loc 45
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A mine() 0 4 1
A history() 0 4 1
A publish() 0 4 1
A conditions() 0 4 1
A delete() 0 4 1
1
<?php
2
3
namespace seregazhuk\HeadHunterApi\EndPoints;
4
5
use seregazhuk\HeadHunterApi\Traits\HasView;
6
use seregazhuk\HeadHunterApi\Traits\Searchable;
7
8
class Resumes extends Endpoint
9
{
10
    const RESOURCE = 'resumes';
11
12
    use HasView, Searchable;
13
14
    public function mine()
15
    {
16
        return $this->getResource('mine');
17
    }
18
19
    /**
20
     * @param string $id
21
     * @return array
22
     */
23
    public function history($id)
24
    {
25
        return $this->getResource($id . '/views');
26
    }
27
28
    /**
29
     * Updates resume publish date
30
     *
31
     * @param string $id
32
     * @return array
33
     */
34
    public function publish($id)
35
    {
36
        return $this->postResource($id . '/publish');
37
    }
38
39
    /**
40
     * @param string $id
41
     * @return array
42
     */
43
    public function conditions($id)
44
    {
45
        return $this->getResource($id . '/conditions');
46
    }
47
48
    public function delete($id)
49
    {
50
        return $this->deleteResource($id);
51
    }
52
}