Passed
Push — master ( a0ae72...f853f9 )
by Shahrad
02:06
created

WebAppData   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 10
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 TelegramBot\Entities;
4
5
use TelegramBot\Entity;
6
7
/**
8
 * Class WebAppData
9
 *
10
 * Contains data sent from a Web App to the bot.
11
 *
12
 * @link https://core.telegram.org/bots/api#webappdata
13
 *
14
 * @method string getData()         The data. Be aware that a bad client can send arbitrary data in this field.
15
 * @method string getButtonText()   Text of the web_app keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.
16
 *
17
 * @method User   getUser()     (Optional). The user who sent the query.
18
 * @method string getHash()     (Optional). Unique identifier for the validating
19
 **/
20
class WebAppData extends Entity
21
{
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function subEntities(): array
27
    {
28
        return [
29
            'user' => User::class,
30
        ];
31
    }
32
33
}
34