pollAnswer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 23
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 an answer of a user in a non-anonymous poll.
9
 */
10
class pollAnswer 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...
11
    /** Keep all properties which has sub properties */
12
    private const subs = ['voter_chat' => 'BPT\types\chat', 'user' => 'BPT\types\user'];
13
14
    /** Unique poll identifier */
15
    public string $poll_id;
16
17
    /** Optional. The chat that changed the answer to the poll, if the voter is anonymous */
18
    public chat $voter_chat;
19
20
    /** Optional. The user that changed the answer to the poll, if the voter isn't anonymous */
21
    public user $user;
22
23
    /**
24
     * 0-based identifiers of chosen answer options. May be empty if the vote was retracted.
25
     * @var int[]
26
     */
27
    public array $option_ids;
28
29
30
    public function __construct(stdClass|null $object = null) {
31
        if ($object != null) {
32
            parent::__construct($object, self::subs);
33
        }
34
    }
35
}
36