BREAKING CHANGE: Change unnecesary false return type.
This commit is contained in:
parent
d0d0d4dc76
commit
1e302a9ea7
@ -94,7 +94,8 @@ class Request extends Neuron {
|
|||||||
$error = 'Error: validation failed of '.preg_replace('/\./', ' as ', Validator::$lastFailed, 1);
|
$error = 'Error: validation failed of '.preg_replace('/\./', ' as ', Validator::$lastFailed, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return static::onInvalid($error);
|
static::onInvalid($error);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,12 +139,11 @@ class Request extends Neuron {
|
|||||||
*
|
*
|
||||||
* @param string $error
|
* @param string $error
|
||||||
*
|
*
|
||||||
* @return false
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function onInvalid(string $error): false
|
public function onInvalid(string $error): void
|
||||||
{
|
{
|
||||||
http_response_code(422);
|
http_response_code(422);
|
||||||
print($error);
|
print($error);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user