Passed
Push — master ( 94d770...d9484a )
by Armando
02:57
created

InlineQueryResultsButton::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Longman\TelegramBot\Entities;
4
5
/**
6
 * Class InlineQueryResultsButton
7
 *
8
 * This entity represents a button to be shown above inline query results. You must use exactly one of the optional fields.
9
 *
10
 * @link https://core.telegram.org/bots/api#inlinequeryresultsbutton
11
 *
12
 * @method string     getText()           Label text on the button
13
 * @method WebAppInfo getWebApp()         Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.
14
 * @method string     getStartParameter() Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
15
 */
16
class InlineQueryResultsButton extends Entity
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    protected function subEntities(): array
22
    {
23
        return [
24
            'web_app' => WebAppInfo::class,
25
        ];
26
    }
27
}
28