改名
This commit is contained in:
@@ -207,14 +207,14 @@ class HttpParams
|
|||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @param bool $isNeed
|
* @param bool $isNeed
|
||||||
* @return array|null
|
* @return mixed
|
||||||
* @throws RequestException
|
* @throws RequestException
|
||||||
*/
|
*/
|
||||||
private function required($name, $isNeed = false): ?array
|
private function required($name, $isNeed = false): mixed
|
||||||
{
|
{
|
||||||
$body = array_merge($this->body?? [], $this->socket ?? []);
|
$body = array_merge($this->body?? [], $this->socket ?? []);
|
||||||
|
|
||||||
$int = $body ?? NULL;
|
$int = $body[$name] ?? NULL;
|
||||||
if (is_null($int) && $isNeed === true) {
|
if (is_null($int) && $isNeed === true) {
|
||||||
throw new RequestException("You need to add request parameter $name");
|
throw new RequestException("You need to add request parameter $name");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user