Skip to content

Commit

Permalink
removes useless check (#41115)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-ivona authored Feb 21, 2022
1 parent 502a505 commit a1671d4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Illuminate/Foundation/Http/FormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit a1671d4

Please sign in to comment.