Passed
Push — master ( 1d5a7e...f5ffe9 )
by Brent
02:21
created

AbstractScaler::setMinWidth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Brendt\Image\Scaler;
4
5
use Brendt\Image\Config\DefaultConfigurator;
6
use Symfony\Component\Filesystem\Filesystem;
7
8
abstract class AbstractScaler implements Scaler
9
{
10
11
    /**
12
     * @var string
13
     */
14
    protected $sourcePath = '';
15
16
    /**
17
     * @var string
18
     */
19
    protected $publicPath = '';
20
21
    /**
22
     * @var boolean
23
     */
24
    protected $enableCache;
25
26
    /**
27
     * @var integer
28
     */
29
    protected $minFileSize;
30
31
    /**
32
     * @var integer
33
     */
34
    protected $minWidth;
35
36
    /**
37
     * @var float
38
     */
39
    protected $stepModifier;
40
41
    /**
42
     * @var Filesystem
43
     */
44
    protected $fs;
45
46
    /**
47
     * Scaler constructor.
48
     *
49
     * @param DefaultConfigurator $configurator
50
     */
51
    public function __construct(DefaultConfigurator $configurator) {
52
        $configurator->configureScaler($this);
53
54
        $this->fs = new Filesystem();
55
    }
56
57
    /**
58
     * @param mixed $sourcePath
59
     *
60
     * @return AbstractScaler
61
     */
62
    public function setSourcePath($sourcePath) {
63
        $this->sourcePath = $sourcePath;
64
65
        return $this;
66
    }
67
68
    /**
69
     * @param mixed $publicPath
70
     *
71
     * @return AbstractScaler
72
     */
73
    public function setPublicPath($publicPath) {
74
        $this->publicPath = $publicPath;
75
76
        return $this;
77
    }
78
79
    /**
80
     * @param mixed $enableCache
81
     *
82
     * @return AbstractScaler
83
     */
84
    public function setEnableCache($enableCache) {
85
        $this->enableCache = $enableCache;
86
87
        return $this;
88
    }
89
90
    /**
91
     * @param mixed $minFileSize
92
     *
93
     * @return AbstractScaler
94
     */
95
    public function setMinFileSize($minFileSize) {
96
        $this->minFileSize = $minFileSize;
97
98
        return $this;
99
    }
100
101
    /**
102
     * @param mixed $minWidth
103
     *
104
     * @return AbstractScaler
105
     */
106
    public function setMinWidth($minWidth) {
107
        $this->minWidth = $minWidth;
108
109
        return $this;
110
    }
111
112
    /**
113
     * @param mixed $stepModifier
114
     *
115
     * @return AbstractScaler
116
     */
117
    public function setStepModifier($stepModifier) {
118
        $this->stepModifier = $stepModifier;
119
120
        return $this;
121
    }
122
123
}
124