Passed
Push — master ( 7e1a51...dce3a0 )
by Sergey
02:59
created

Organizations::endpoint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace seregazhuk\Favro\Api\Endpoints;
4
5
6
class Organizations extends CrudEndpoint
7
{
8
    /**
9
     * @param string $id
10
     * @return array
11
     */
12
    public function getById($id)
13
    {
14
        $this->headers['organizationId'] = $id;
15
16
        return parent::getById($id);
17
    }
18
19
    /**
20
     * @param string $itemId
21
     * @param array $attributes
22
     * @return mixed
23
     */
24
    public function update($itemId, array $attributes)
25
    {
26
        $this->headers['organizationId'] = $itemId;
27
28
        return parent::update($itemId, $attributes);
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function endpoint()
35
    {
36
        return 'organizations';
37
    }
38
}
39