Making PHPStan happy
This commit is contained in:
parent
1961d423a7
commit
a88f703367
|
@ -0,0 +1 @@
|
||||||
|
tags
|
|
@ -290,10 +290,11 @@ class jzonParser
|
||||||
++$this->c;
|
++$this->c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$str_num = substr($this->in, $start, $this->c - $start);
|
||||||
if($is_float)
|
if($is_float)
|
||||||
$out = 1*substr($this->in, $start, $this->c - $start);
|
$out = floatval($str_num);
|
||||||
else
|
else
|
||||||
$out = (int)(1*substr($this->in, $start, $this->c - $start));
|
$out = intval($str_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parse_true(&$out)
|
private function parse_true(&$out)
|
||||||
|
@ -340,7 +341,7 @@ function jzon_parse($str)
|
||||||
return $res;
|
return $res;
|
||||||
|
|
||||||
//NOTE: only allowing extension implementation if versions match
|
//NOTE: only allowing extension implementation if versions match
|
||||||
if(JZON_EXT_VERSION === JZON_VERSION)
|
if(defined('JZON_EXT_VERSION') && JZON_EXT_VERSION === JZON_VERSION)
|
||||||
{
|
{
|
||||||
list($ok, $err, $err_pos, $res) = jzon_parse_c($str);
|
list($ok, $err, $err_pos, $res) = jzon_parse_c($str);
|
||||||
if(!$ok)
|
if(!$ok)
|
||||||
|
|
Loading…
Reference in New Issue