Test Failed
Push — master ( b856ab...dd13ee )
by Jan
01:53
created

ResizableTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 9
c 1
b 0
f 0
dl 0
loc 50
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeight() 0 3 1
A setWidth() 0 5 1
A setHeight() 0 5 1
A getWidth() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace DiscordWebhook\Embed\Traits;
5
6
/**
7
 * Trait ResizableTrait
8
 *
9
 * @package DiscordWebhook\Embed\Traits
10
 * @author Scrummer <[email protected]>
11
 */
12
trait ResizableTrait
13
{
14
    /**
15
     * @var int|null
16
     */
17
    private $width;
18
19
    /**
20
     * @var int|null
21
     */
22
    private $height;
23
24
    /**
25
     * @return int|null
26
     */
27
    public function getWidth(): ?int
28
    {
29
        return $this->width;
30
    }
31
32
    /**
33
     * @param int|null $width
34
     *
35
     * @return self
36
     */
37
    public function setWidth(?int $width): self
38
    {
39
        $this->width = $width;
40
41
        return $this;
42
    }
43
44
    /**
45
     * @return int|null
46
     */
47
    public function getHeight(): ?int
48
    {
49
        return $this->height;
50
    }
51
52
    /**
53
     * @param int|null $height
54
     *
55
     * @return self
56
     */
57
    public function setHeight(?int $height): self
58
    {
59
        $this->height = $height;
60
61
        return $this;
62
    }
63
}
64