Completed
Push — master ( 315749...e0be30 )
by Алексей
03:54
created

MessageEntry   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 27
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A to() 0 4 1
A withInlineKeyboard() 0 4 1
A text() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: akeinhell
5
 * Date: 06.11.2016
6
 * Time: 11:46
7
 */
8
9
namespace Telegram\Entry;
10
11
12
use Telegram\Base\BaseEntry;
13
14
class MessageEntry extends BaseEntry
15
{
16
    public static function create()
17
    {
18
        return new static();
19
    }
20
21
    /**
22
     * @param int $chatId
23
     *
24
     * @return $this
25
     */
26
    public function to($chatId)
27
    {
28
        return $this->set('to', $chatId);
29
    }
30
31
    public function withInlineKeyboard(InlineKeyboard $keyboard)
32
    {
33
        return $this->set('inline_keyboard', $keyboard->toArray());
34
    }
35
36
    public function text($text){
37
        return $this->set('text', $text);
38
    }
39
40
}