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

backgroundFill   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 29
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 way a background is filled based on the selected colors.
9
 */
10
class backgroundFill 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
14
    /** Type of the background fill, could be `solid`, `gradient`, `freeform_gradient` */
15
    public string $type;
16
17
    /** `solid` only. Solid The color of the background fill in the RGB24 format */
18
    public int $color;
19
20
    /** `gradient` only. Gradient Top color of the gradient in the RGB24 format */
21
    public int $top_color;
22
23
    /** `gradient` only. Gradient Bottom color of the gradient in the RGB24 format */
24
    public int $bottom_color;
25
26
    /** `gradient` only. Clockwise rotation angle of the background fill in degrees; 0-359 */
27
    public int $rotation_angle;
28
29
    /**
30
     * `freeform_gradient` only. A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format
31
     * @var int[]
32
     */
33
    public array $colors;
34
35
36
    public function __construct(stdClass|null $object = null) {
37
        if ($object != null) {
38
            parent::__construct($object, self::subs);
39
        }
40
    }
41
}
42