Completed
Push — master ( b1bd72...501a41 )
by Sergey
12:53
created

Organizations::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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