Code Duplication    Length = 10-11 lines in 2 locations

sources/lib/Converter/PgBytea.php 2 locations

@@ 29-39 (lines=11) @@
26
    /**
27
     * @see Pomm\Converter\ConverterInterface
28
     */
29
    public function toPg($data, $type, Session $session)
30
    {
31
        return $data !== null
32
            ? sprintf(
33
                "%s '%s'",
34
                $type,
35
                $this->escapeByteString($session, $data)
36
            )
37
            : sprintf("NULL::%s", $type)
38
            ;
39
    }
40
41
    /**
42
     * @see Pomm\Converter\ConverterInterface
@@ 55-64 (lines=10) @@
52
    /**
53
     * @see Pomm\Converter\ConverterInterface
54
     */
55
    public function toPgStandardFormat($data, $type, Session $session)
56
    {
57
        return $data !== null
58
            ? sprintf(
59
                '%s',
60
                $this->escapeByteString($session, $data)
61
            )
62
            : null
63
            ;
64
    }
65
66
    /**
67
     * escapeByteString