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

Organizations   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 33
rs 10

3 Methods

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