AbstractImageSize::getWidth()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gcsc\LaravelMultisizeImage\ImageSizes;
4
5
abstract class AbstractImageSize implements ImageSizeInterface
6
{
7
    protected $disk = 'local';
8
    protected $width;
9
    protected $height;
10
    protected $force_crop;
11
12
    /**
13
     * AbstractImageSize constructor.
14
     * @param $width
15
     * @param $height
16
     * @param $force_crop
17
     */
18
    public function __construct($width, $height, $force_crop)
19
    {
20
        $this->width = $width;
21
        $this->height = $height;
22
        $this->force_crop = $force_crop;
23
    }
24
25
    public function getWidth()
26
    {
27
        return $this->width;
28
    }
29
30
    public function getHeight()
31
    {
32
        return $this->height;
33
    }
34
35
    public function getForceCrop()
36
    {
37
        return $this->force_crop;
38
    }
39
40
    public function getDisk()
41
    {
42
        return $this->disk;
43
    }
44
45
    /**
46
     * @param string $disk
47
     * @return AbstractImageSize
48
     */
49
    public function setDisk(string $disk): self
50
    {
51
        $this->disk = $disk;
52
53
        return $this;
54
    }
55
}
56