Skip to content

Commit

Permalink
Return data directly without intermediate varaible [WEB-2960]
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgarwood authored and nikhiltri committed Jan 17, 2025
1 parent 1da4db8 commit 9594292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions app/Http/Requests/Twill/EventRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ public function __construct()
}
public function rulesForCreate()
{
$rules = [
return [
'title' => 'required',
];

return $rules;
}

public function rulesForUpdate()
{
$rules = [
return [
'start_time' => 'required',
'end_time' => 'required|time_greater_than',
'short_description' => 'required',
Expand All @@ -69,7 +67,5 @@ public function rulesForUpdate()
],
'test_emails' => 'emails',
];

return $rules;
}
}
8 changes: 2 additions & 6 deletions app/Http/Requests/Twill/ExhibitionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,16 @@ class ExhibitionRequest extends Request
{
public function rulesForCreate()
{
$rules = [
return [
'title' => 'required',
];

return $rules;
}

public function rulesForUpdate()
{
$rules = [
return [
'title' => 'required',
'list_description' => 'required',
];

return $rules;
}
}

0 comments on commit 9594292

Please sign in to comment.