AbstractImageSize   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 51
c 0
b 0
f 0
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getWidth() 0 4 1
A getHeight() 0 4 1
A getForceCrop() 0 4 1
A getDisk() 0 4 1
A setDisk() 0 6 1
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