CallbackQuery   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A answer() 0 12 1
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
}