messageEntity   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 40
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 2
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
9
 * @method self setType(string $value)
10
 * @method self setOffset(int $value)
11
 * @method self setLength(int $value)
12
 * @method self setUrl(string $value)
13
 * @method self setUser(user $value)
14
 * @method self setLanguage(string $value)
15
 * @method self setCustom_emoji_id(string $value)
16
 */
17
class messageEntity extends types {
0 ignored issues
show
Bug introduced by
The type BPT\types\types was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
    /** Keep all properties which has sub properties */
19
    private const subs = ['user' => 'BPT\types\user'];
20
21
    /**
22
     * Type of the entity. Currently, can be “mention” (username), “hashtag” (#hashtag), “cashtag”
23
     * ($USD), “bot_command” (/startjobs_bot), “url” (https://telegram.org), “email”
24
     * (do-not-replytelegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic
25
     * text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler
26
     * message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block
27
     * quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text
28
     * URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
29
     */
30
    public string $type;
31
32
    /** Offset in UTF-16 code units to the start of the entity */
33
    public int $offset;
34
35
    /** Length of the entity in UTF-16 code units */
36
    public int $length;
37
38
    /** Optional. For “text_link” only, URL that will be opened after user taps on the text */
39
    public string $url;
40
41
    /** Optional. For “text_mention” only, the mentioned user */
42
    public user $user;
43
44
    /** Optional. For “pre” only, the programming language of the entity text */
45
    public string $language;
46
47
    /**
48
     * Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to
49
     * get full information about the sticker
50
     */
51
    public string $custom_emoji_id;
52
53
54
    public function __construct(stdClass|null $object = null) {
55
        if ($object != null) {
56
            parent::__construct($object, self::subs);
57
        }
58
    }
59
}
60