MessageEntity   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 9
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the TelegramBot package.
5
 *
6
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Longman\TelegramBot\Entities;
13
14
/**
15
 * Class MessageEntity
16
 *
17
 * @link https://core.telegram.org/bots/api#messageentity
18
 *
19
 * @method string getType()          Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” ([email protected]), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
20
 * @method int    getOffset()        Offset in UTF-16 code units to the start of the entity
21
 * @method int    getLength()        Length of the entity in UTF-16 code units
22
 * @method string getUrl()           Optional. For "text_link" only, url that will be opened after user taps on the text
23
 * @method User   getUser()          Optional. For "text_mention" only, the mentioned user
24
 * @method string getLanguage()      Optional. For "pre" only, the programming language of the entity text
25
 * @method string getCustomEmojiId() Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker
26
 */
27
class MessageEntity extends Entity
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected function subEntities(): array
33
    {
34
        return [
35
            'user' => User::class,
36
        ];
37
    }
38
}
39