MCPcopy Create free account
hub / github.com/apache/thrift / readI16

Method readI16

lib/php/lib/Protocol/TBinaryProtocol.php:352–362  ·  view source on GitHub ↗
(&$value)

Source from the content-addressed store, hash-verified

350 }
351
352 public function readI16(&$value)
353 {
354 $data = $this->trans_->readAll(2);
355 $arr = unpack('n', $data);
356 $value = $arr[1];
357 if ($value > 0x7fff) {
358 $value = 0 - (($value - 1) ^ 0xffff);
359 }
360
361 return 2;
362 }
363
364 public function readI32(&$value)
365 {

Callers 1

readFieldBeginMethod · 0.95

Calls 1

readAllMethod · 0.45

Tested by

no test coverage detected