CallbackQuery::answer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 12
rs 10
cc 1
nc 1
nop 4
1
<?php
2
3
4
namespace Sysbot\Telegram\ExtendedTypes;
5
6
7
use GuzzleHttp\Promise\PromiseInterface;
8
9
trait CallbackQuery
10
{
11
12
    use BaseType;
13
14
    public function answer(
15
        ?string $text = null,
16
        ?bool $showAlert = null,
17
        ?string $url = null,
18
        ?int $cacheTime = null
19
    ): PromiseInterface {
20
        return $this->api->answerCallbackQuery(
21
            callbackQueryId: $this->id,
22
            text: $text,
23
            showAlert: $showAlert,
24
            url: $url,
25
            cacheTime: $cacheTime
26
        );
27
    }
28
29
}