Completed
Push — master ( 5c6f77...9539a1 )
by Mr
25s queued 11s
created

Chat::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Uon\Endpoints;
4
5
use Uon\Client;
6
7
/**
8
 * Class Chat
9
 *
10
 * @package Uon\Endpoint
11
 */
12
class Chat extends Client
13
{
14
    /**
15
     * Send message from manager to another manager or tourist
16
     *
17
     * @link https://api.u-on.ru/{key}/chat-message/create.{_format}
18
     *
19
     * @param array $parameters List of parameters []
20
     *
21
     * @return null|object|\Uon\Interfaces\ClientInterface
22
     */
23
    public function create(array $parameters)
24
    {
25
        // Set HTTP params
26
        $this->type     = 'post';
27
        $this->endpoint = 'chat-message/create';
28
        $this->params   = $parameters;
29
30
        return $this->done();
31
    }
32
}
33