From 1e302a9ea72824c850419b2045f8e62d75c15f1c Mon Sep 17 00:00:00 2001 From: kj Date: Sat, 19 Apr 2025 15:44:16 -0300 Subject: [PATCH] BREAKING CHANGE: Change unnecesary false return type. --- src/Libs/Request.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Libs/Request.php b/src/Libs/Request.php index a483a01..b2b29c9 100644 --- a/src/Libs/Request.php +++ b/src/Libs/Request.php @@ -94,7 +94,8 @@ class Request extends Neuron { $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 * - * @return false + * @return void */ - public function onInvalid(string $error): false + public function onInvalid(string $error): void { http_response_code(422); print($error); - return false; } }