AbstractLib::setBackground()   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
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Imagecow\Libs;
4
5
/**
6
 * Base class extended by other libraries with common methods and properties.
7
 */
8
abstract class AbstractLib
9
{
10
    protected $quality = 86;
11
    protected $background = [255, 255, 255];
12
    protected $animated = false;
13
    protected $progressive = false;
14
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function setCompressionQuality($quality)
19
    {
20
        $this->quality = $quality;
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function setBackground(array $background)
27
    {
28
        $this->background = $background;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function setAnimated($animated)
35
    {
36
        $this->animated = (boolean) $animated;
37
    }
38
}
39