Manager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A preferences() 0 13 2
1
<?php
2
3
namespace seregazhuk\HeadHunterApi\EndPoints;
4
5
use seregazhuk\HeadHunterApi\Traits\ResolvesCurrentUser;
6
7
class Manager extends Endpoint
8
{
9
    use ResolvesCurrentUser;
10
11
    const RESOURCE = '/employers';
12
13
    /**
14
     * Get manager settings
15
     * @param integer $managerId
16
     * @return array
17
     */
18
    public function preferences($managerId = null)
19
    {
20
        $employerId = $this->getCurrentEmployerId();
21
        $managerId = $managerId ?: $this->getCurrentManagerId();
22
23
        $uri = str_replace(
24
            ['{employer_id}', '{manager_id}'],
25
            [$employerId, $managerId],
26
            '{employer_id}/managers/{manager_id}/settings'
27
        );
28
29
        return $this->getResource($uri);
30
    }
31
}