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

JsonBinaryDecoderFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A makeJsonBinaryDecoder() 0 7 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