()
| 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. |
no test coverage detected