proximityAlertTriggered::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object represents the content of a service message, sent whenever a user in the chat triggers a proximity
9
 * alert set by another user.
10
 */
11
class proximityAlertTriggered 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 of properties which has sub properties */
13
    private const subs = ['traveler' => 'BPT\types\user', 'watcher' => 'BPT\types\user'];
14
15
    /** User that triggered the alert */
16
    public user $traveler;
17
18
    /** User that set the alert */
19
    public user $watcher;
20
21
    /** The distance between the users */
22
    public int $distance;
23
24
25
    public function __construct(stdClass|null $object = null) {
26
        if ($object != null) {
27
            parent::__construct($object, self::subs);
28
        }
29
    }
30
}
31