Passed
Branch master (e090ea)
by kacper
04:22
created

BinaryDataReaderFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A makePackageFromBinaryData() 0 7 1
1
<?php
2
3
namespace MySQLReplication\BinaryDataReader;
4
5
/**
6
 * Class BinaryDataReaderFactory
7
 * @package MySQLReplication\BinaryDataReader
8
 */
9
class BinaryDataReaderFactory
10
{
11
    /**
12
     * @param string $data
13
     * @return BinaryDataReader
14
     */
15 54
    public function makePackageFromBinaryData($data)
16
    {
17 54
        $packageBuilder = new BinaryDataReaderBuilder();
18 54
        $packageBuilder->withBinaryData($data);
19
20 54
        return $packageBuilder->build();
21
    }
22
}