Code Duplication    Length = 7-7 lines in 3 locations

src/MySQL/Protocol/Support/BinarySupport.php 3 locations

@@ 200-206 (lines=7) @@
197
     * @param bool $l Little-endian, defaults to false.
198
     * @return int
199
     */
200
    public static function getWord(&$p, $l = false)
201
    {
202
        $r = static::bytes2int(static::binarySubstr($p, 0, 2), !!$l);
203
        $p = static::binarySubstr($p, 2);
204
205
        return intval($r);
206
    }
207
208
    /**
209
     * Get word (2 bytes).
@@ 232-238 (lines=7) @@
229
     * @param bool $l Little-endian, defaults to false.
230
     * @return int
231
     */
232
    public static function getDWord(&$p, $l = false)
233
    {
234
        $r = static::bytes2int(static::binarySubstr($p, 0, 4), !!$l);
235
        $p = static::binarySubstr($p, 4);
236
237
        return intval($r);
238
    }
239
240
    /**
241
     * Parse quadro word (8 bytes).
@@ 247-253 (lines=7) @@
244
     * @param bool $l Little-endian, defaults to false.
245
     * @return int
246
     */
247
    public static function getQword(&$p, $l = false)
248
    {
249
        $r = static::bytes2int(static::binarySubstr($p, 0, 8), !!$l);
250
        $p = static::binarySubstr($p, 8);
251
252
        return intval($r);
253
    }
254
255
    /**
256
     * Get quadro word (8 bytes).