Completed
Push — master ( b1b76d...60afd2 )
by arto
03:07
created

AcceptEncoding   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A prefix() 0 4 1
A suffix() 0 4 1
1
<?php
2
/**
3
 * @author: stev leibelt <[email protected]>
4
 * @since: 2016-09-19
5
 */
6
namespace Net\Bazzline\Component\Curl\HeaderLine;
7
8
class AcceptEncoding extends AbstractHeaderLine
9
{
10
    /** @var string */
11
    private $prefix;
12
13
    /** @var string */
14
    private $suffix;
15
16
    /**
17
     * AcceptEncoding constructor.
18
     *
19
     * @param array|string[] $encodings - e.g. array('gzip', 'deflate')
20
     */
21
    public function __construct(array $encodings)
22
    {
23
        $this->prefix = 'Accept-Encoding';
24
        $this->suffix = implode($encodings);
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    protected function prefix()
31
    {
32
        return $this->prefix;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    protected function suffix()
39
    {
40
        return $this->suffix;
41
    }
42
}
43