Total Complexity | 5 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class OptimusDriver implements DriverInterface |
||
9 | { |
||
10 | /** |
||
11 | * The Optimus instance. |
||
12 | * |
||
13 | * @var \Jenssegers\Optimus\Optimus |
||
14 | */ |
||
15 | protected $optimus; |
||
16 | |||
17 | /** |
||
18 | * Create a new Optimus driver instance. |
||
19 | * |
||
20 | * @param array $config |
||
21 | * |
||
22 | * @throws \InvalidArgumentException |
||
23 | */ |
||
24 | 20 | public function __construct(array $config) |
|
34 | 4 | ); |
|
35 | 4 | } |
|
36 | |||
37 | /** |
||
38 | * Encode the data. |
||
39 | * |
||
40 | * @param int $data |
||
41 | * @return int |
||
42 | */ |
||
43 | 4 | public function encode($data) |
|
44 | { |
||
45 | 4 | return $this->optimus->encode($data); |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * Decode the data. |
||
50 | * |
||
51 | * @param int $data |
||
52 | * @return int |
||
53 | */ |
||
54 | 4 | public function decode($data) |
|
57 | } |
||
58 | } |
||
59 |