AbstractLib   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 31
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
    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