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

MessageEntry::text()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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
}