Passed
Push — main ( 36dc31...e0778d )
by Miaad
10:46
created

backgroundType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 49
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 describes the type of background.
9
 */
10
class backgroundType 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 = ['fill' => 'BPT\types\backgroundFill', 'document' => 'BPT\types\document'];
13
14
    /** Type of the background, could be `fill`, `wallpaper`, `pattern`, `chat_theme` */
15
    public string $type;
16
17
    /**
18
     * `pattern` and `fill` only. The background fill
19
     */
20
    public backgroundFill $fill;
21
22
    /**
23
     * `fill` and `wallpaper` only. Dimming of the background in dark themes, as a percentage; 0-100
24
     */
25
    public int $dark_theme_dimming;
26
27
    /**
28
     * `pattern` and `wallpaper` only. Document with the wallpaper
29
     */
30
    public document $document;
31
32
    /**
33
     * `wallpaper` only. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred
34
     * with radius 12
35
     */
36
    public bool $is_blurred;
37
38
    /**
39
     * `pattern` and `wallpaper` only. True, if the background moves slightly when the device is tilted
40
     */
41
    public bool $is_moving;
42
43
    /** `pattern` only. Intensity of the pattern when it is shown above the filled background; 0-100 */
44
    public int $intensity;
45
46
    /**
47
     * `pattern` only. True, if the background fill must be applied only to the pattern itself. All other pixels are
48
     * black in this case. For dark themes only
49
     */
50
    public bool $is_inverted;
51
52
    /** `chat_theme` only. Name of the chat theme, which is usually an emoji */
53
    public string $theme_name;
54
55
56
    public function __construct(stdClass|null $object = null) {
57
        if ($object != null) {
58
            parent::__construct($object, self::subs);
59
        }
60
    }
61
}