Me::setIsInSearch()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace seregazhuk\HeadHunterApi\EndPoints;
4
5
class Me extends Endpoint
6
{
7
    const RESOURCE = 'me';
8
9
    /**
10
     * @return array
11
     */
12
    public function info()
13
    {
14
        return $this->getResource();
15
    }
16
17
    /**
18
     * @param bool $val
19
     */
20
    public function setIsInSearch($val = true)
21
    {
22
        $this->postResource('', ['is_in_search' => $val]);
23
    }
24
25
    /**
26
     * @param string $lastName
27
     * @param string $firstName
28
     * @param string $middleName
29
     * @return mixed
30
     */
31
    public function editName($lastName, $firstName, $middleName)
32
    {
33
        $data = [
34
            'last_name'   => $lastName,
35
            'first_name'  => $firstName,
36
            'middle_name' => $middleName
37
        ];
38
39
        return $this->postResource('', $data);
40
    }
41
}
42