From 223c3e272df3199af1fbbf21a76b22ee7325b06e Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Sat, 19 Feb 2022 10:10:09 +0100 Subject: [PATCH] removes useless check --- src/Illuminate/Foundation/Http/FormRequest.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Illuminate/Foundation/Http/FormRequest.php b/src/Illuminate/Foundation/Http/FormRequest.php index ec757b65d57f..ec01119b0a2d 100644 --- a/src/Illuminate/Foundation/Http/FormRequest.php +++ b/src/Illuminate/Foundation/Http/FormRequest.php @@ -212,13 +212,7 @@ public function safe(array $keys = null) */ public function validated($key = null, $default = null) { - if (! is_null($key)) { - return data_get( - $this->validator->validated(), $key, $default - ); - } - - return $this->validator->validated(); + return data_get($this->validator->validated(), $key, $default); } /**