Skip to content

Commit 00c5173

Browse files
authored
Revert form request (#6229)
1 parent fd5dbfb commit 00c5173

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Request/FormRequest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ public function setContainer(ContainerInterface $container): static
104104
return $this;
105105
}
106106

107-
public function rules(): array
108-
{
109-
return [];
110-
}
111-
112107
/**
113108
* Get the validator instance for the request.
114109
*/
@@ -203,7 +198,7 @@ protected function getContextValidatorKey(string $key): string
203198
*/
204199
protected function getRules(): array
205200
{
206-
$rules = $this->rules();
201+
$rules = method_exists($this, 'rules') ? call_user_func_array([$this, 'rules'], []) : [];
207202
$scene = $this->getScene();
208203
if ($scene && isset($this->scenes[$scene]) && is_array($this->scenes[$scene])) {
209204
return Arr::only($rules, $this->scenes[$scene]);

0 commit comments

Comments
 (0)