Passed
Push — main ( 8c6c55...1af2d8 )
by Miaad
12:23 queued 14s
created

messageReactionUpdated   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
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 a change of a reaction on a message performed by a user.
9
 */
10
class messageReactionUpdated 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 = [
13
        'chat' => 'BPT\types\chat',
14
        'user' => 'BPT\types\user',
15
        'actor_chat' => 'BPT\types\chat',
16
        'array' => ['old_reaction' => 'BPT\types\reactionType', 'new_reaction' => 'BPT\types\reactionType'],
17
    ];
18
19
    /** The chat containing the message the user reacted to */
20
    public chat $chat;
21
22
    /** Unique identifier of the message inside the chat */
23
    public int $message_id;
24
25
    /** Optional. The user that changed the reaction, if the user isn't anonymous */
26
    public null|user $user = null;
27
28
    /** Optional. The chat on behalf of which the reaction was changed, if the user is anonymous */
29
    public null|chat $actor_chat = null;
30
31
    /** Date of the change in Unix time */
32
    public int $date;
33
34
    /**
35
     * Previous list of reaction types that were set by the user
36
     * @var reactionType[]
37
     */
38
    public array $old_reaction;
39
40
    /**
41
     * New list of reaction types that have been set by the user
42
     * @var reactionType[]
43
     */
44
    public array $new_reaction;
45
46
47
    public function __construct(stdClass|null $object = null) {
48
        if ($object != null) {
49
            parent::__construct($object, self::subs);
50
        }
51
    }
52
}
53