Statuses   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 38
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 1
A getLead() 0 8 1
1
<?php
2
3
namespace Uon\Endpoints;
4
5
use Uon\Client;
6
7
/**
8
 * Class Statuses
9
 *
10
 * @package Uon\Endpoint
11
 */
12
class Statuses extends Client
13
{
14
    /**
15
     * Get statuses list
16
     *
17
     * @link https://api.u-on.ru/{key}/status.{_format}
18
     *
19
     * @param array|null $parameters List of parameters
20
     *
21
     * @return null|object|\Uon\Interfaces\ClientInterface
22
     */
23
    public function get(array $parameters = [])
24
    {
25
        // Set HTTP params
26
        $this->type     = 'get';
27
        $this->endpoint = 'status';
28
        $this->params   = $parameters;
29
30
        return $this->done();
31
    }
32
33
    /**
34
     * Get a list of statuses for leads
35
     *
36
     * @link https://api.u-on.ru/{key}/status_lead.{_format}
37
     *
38
     * @param array $parameters List of parameters
39
     *
40
     * @return null|object|\Uon\Interfaces\ClientInterface
41
     */
42
    public function getLead(array $parameters = [])
43
    {
44
        // Set HTTP params
45
        $this->type     = 'get';
46
        $this->endpoint = 'status_lead';
47
        $this->params   = $parameters;
48
49
        return $this->done();
50
    }
51
}
52