Completed
Push — v3.x ( 8b6982 )
by Oscar
01:53
created

CommonTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 22
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0
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
declare(strict_types = 1);
3
4
namespace Imagecow\Adapters;
5
6
/**
7
 * Base class extended by other libraries with common methods and properties.
8
 */
9
trait CommonTrait
10
{
11
    private $quality = 86;
12
    private $background = [255, 255, 255];
13
    private $animated = false;
14
    private $progressive = false;
15
16
    public function setCompressionQuality(int $quality)
17
    {
18
        $this->quality = $quality;
19
    }
20
21
    public function setBackground(array $background)
22
    {
23
        $this->background = $background;
24
    }
25
26
    public function setAnimated(bool $animated)
27
    {
28
        $this->animated = $animated;
29
    }
30
}
31