AbstractEncoder::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Vectorface\SnappyRouter\Encoder;
4
5
use Vectorface\SnappyRouter\Response\AbstractResponse;
6
7
/**
8
 * An abstract base class for all encoders. Extend this class to implement a
9
 * custom encoder.
10
 * @copyright Copyright (c) 2014, VectorFace, Inc.
11
 * @author Dan Bruce <[email protected]>
12
 */
13
abstract class AbstractEncoder implements EncoderInterface
14
{
15
    // an array of options for the encoder
16
    private $options;
17
18
    /**
19
     * Constructor for the encoder.
20
     * @param array $options An array of encoder options.
21
     */
22 33
    public function __construct($options = array())
23
    {
24 33
        $this->options = (array)$options;
25 33
    }
26
}
27