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

Organizations   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getById() 0 6 1
A update() 0 6 1
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
}