Passed
Pull Request — develop (#1395)
by Armando
15:20 queued 05:20
created

InlineQueryResultsButton   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
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