Completed
Push — 2.x-dev ( 5228a9...7776d6 )
by Oscar
02:17
created

AbstractLib   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 30
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setCompressionQuality() 0 4 1
A setBackground() 0 4 1
A setAnimated() 0 4 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
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function setCompressionQuality($quality)
18
    {
19
        $this->quality = $quality;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function setBackground(array $background)
26
    {
27
        $this->background = $background;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function setAnimated($animated)
34
    {
35
        $this->animated = (boolean) $animated;
36
    }
37
}
38