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

Method readJSONInteger

lib/php/lib/Protocol/TJSONProtocol.php:344–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342 }
343
344 private function readJSONInteger()
345 {
346 $this->context_->read();
347
348 if ($this->context_->escapeNum()) {
349 $this->readJSONSyntaxChar(self::QUOTE);
350 }
351
352 $str = $this->readJSONNumericChars();
353
354 if ($this->context_->escapeNum()) {
355 $this->readJSONSyntaxChar(self::QUOTE);
356 }
357
358 if (!is_numeric($str)) {
359 throw new TProtocolException("Invalid data in numeric: " . $str, TProtocolException::INVALID_DATA);
360 }
361
362 return intval($str);
363 }
364
365 /**
366 * Identical to readJSONInteger but without the final cast.

Callers 15

readMessageBeginMethod · 0.95
readFieldBeginMethod · 0.95
readMapBeginMethod · 0.95
readListBeginMethod · 0.95
readSetBeginMethod · 0.95
readBoolMethod · 0.95
readByteMethod · 0.95
readI16Method · 0.95
readI32Method · 0.95
readI64Method · 0.95
readMessageBeginMethod · 0.95
readFieldBeginMethod · 0.95

Calls 4

readJSONSyntaxCharMethod · 0.95
readJSONNumericCharsMethod · 0.95
readMethod · 0.65
escapeNumMethod · 0.45

Tested by

no test coverage detected