Completed
Pull Request — master (#12)
by Sergey
02:44
created

Me   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A info() 0 4 1
A editName() 0 10 1
A setIsInSearch() 0 4 1
1
<?php
2
3
namespace seregazhuk\HeadHunterApi\EndPoints;
4
5
class Me extends Endpoint
6
{
7
    const RESOURCE = 'me';
8
9
    public function info()
10
    {
11
        return $this->getResource();
12
    }
13
14
    /**
15
     * @param bool $val
16
     */
17
    public function setIsInSearch($val = true)
18
    {
19
        $this->postResource('', ['is_in_search' => $val]);
20
    }
21
22
    /**
23
     * @param string $lastName
24
     * @param string $firstName
25
     * @param string $middleName
26
     */ 
27
    public function editName($lastName, $firstName, $middleName)
28
    {
29
        $data = [
30
            'last_name'   => $lastName,
31
            'first_name'  => $firstName,
32
            'middle_name' => $middleName
33
        ];
34
35
        $this->postResource('', $data);
36
    }
37
}
38