/**
* 判断数组索引顺序是否正常
*
* @param $array
*
* @return bool
* @throws ExceptionBiz
*/
public static function arrayIndexIsRight($array)
{
if (!is_array($array)) {
throw new ExceptionBiz(Errors::ERR_PARAM, '数组格式不正确');
}
$index = array_keys($array);
for ($i = 0; $i < count($index); $i++) {
if ($index[$i] != $i) {
return false;
}
}
return true;
}