Completed
Push — master ( 15c40a...010522 )
by kacper
01:57
created

JsonBinaryDecoderFactory::makeJsonBinaryDecoder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
4
namespace MySQLReplication\JsonBinaryDecoder;
5
6
use MySQLReplication\BinaryDataReader\BinaryDataReader;
7
8
/**
9
 * Class JsonBinaryDecoderFactory
10
 * @package MySQLReplication\JsonBinaryDecoder
11
 */
12
class JsonBinaryDecoderFactory
13
{
14
    /**
15
     * @param string $jsonBinaryData
16
     * @return JsonBinaryDecoderService
17
     */
18
    public function makeJsonBinaryDecoder($jsonBinaryData)
19
    {
20
        return (new JsonBinaryDecoderService(
21
            new BinaryDataReader($jsonBinaryData),
22
            new JsonBinaryDecoderFormatter())
23
        );
24
    }
25
}
26