writeAccessAllowed::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object represents a service message about a user allowing a bot to write messages after adding it to the
9
 * attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the
10
 * method requestWriteAccess.
11
 */
12
class writeAccessAllowed 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...
13
    /** Keep all properties which has sub properties */
14
    private const subs = [];
15
16
    /**
17
     * Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by
18
     * the method requestWriteAccess
19
     */
20
    public bool $from_request;
21
22
    /** Optional. Name of the Web App, if the access was granted when the Web App was launched from a link */
23
    public string $web_app_name;
24
25
    /** Optional. True, if the access was granted when the bot was added to the attachment or side menu */
26
    public bool $from_attachment_menu;
27
28
29
    public function __construct(stdClass|null $object = null) {
30
        if ($object != null) {
31
            parent::__construct($object, self::subs);
32
        }
33
    }
34
}
35