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

linkPreviewOptions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 32
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
 * Describes the options used for link preview generation.
9
 */
10
class linkPreviewOptions 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
    /** Optional. True, if the link preview is disabled */
15
    public null|bool $is_disabled = null;
16
17
    /** Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used */
18
    public null|string $url = null;
19
20
    /**
21
     * Optional. True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't
22
     * explicitly specified or media size change isn't supported for the preview
23
     */
24
    public null|bool $prefer_small_media = null;
25
26
    /**
27
     * Optional. True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't
28
     * explicitly specified or media size change isn't supported for the preview
29
     */
30
    public null|bool $prefer_large_media = null;
31
32
    /**
33
     * Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be
34
     * shown below the message text
35
     */
36
    public null|bool $show_above_text = null;
37
38
39
    public function __construct(stdClass|null $object = null) {
40
        if ($object != null) {
41
            parent::__construct($object, self::subs);
42
        }
43
    }
44
}
45