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

makePackageFromBinaryData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 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
}