Passed
Push — main ( dd2f61...fe7ef9 )
by Miaad
11:01
created

inlineQueryResultsButton   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 28
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 a button to be shown above inline query results. You must use exactly one of the
9
 * optional fields.
10
 */
11
class inlineQueryResultsButton 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...
12
    /** Keep all properties which has sub properties */
13
    private const subs = ['web_app' => 'BPT\types\webAppInfo'];
14
15
    /** Label text on the button */
16
    public string $text;
17
18
    /**
19
     * Optional. Description of the Web App that will be launched when the user presses the button. The Web App will
20
     * be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.
21
     */
22
    public webAppInfo $web_app;
23
24
    /**
25
     * Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64
26
     * characters, only A-Z, a-z, 0-9, _ and - are allowed.Example: An inline bot that sends YouTube videos can ask
27
     * the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it
28
     * displays a 'Connect your YouTube account' button above the results, or even before showing any. The user
29
     * presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that
30
     * instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the
31
     * user can easily return to the chat where they wanted to use the bot's inline capabilities.
32
     */
33
    public string $start_parameter;
34
35
36
    public function __construct(stdClass|null $object = null) {
37
        if ($object != null) {
38
            parent::__construct($object, self::subs);
39
        }
40
    }
41
}
42