mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-24 12:09:02 -05:00
refactor: better php8 usage
- Change simple property init and assign to constructor promotion - Remove unused variable in catch() - Change docs types to union types, where possible
This commit is contained in:
@@ -27,10 +27,8 @@ class ChatBotController extends Controller
|
||||
* Display a listing of the Bots resource.
|
||||
*
|
||||
* @param null $hash
|
||||
*
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index($hash = null)
|
||||
public function index($hash = null): \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$bots = Bot::orderBy('position', 'ASC')->get();
|
||||
|
||||
@@ -42,12 +40,10 @@ class ChatBotController extends Controller
|
||||
/**
|
||||
* Show the form for editing the specified Bot resource.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function edit(Request $request, $id)
|
||||
public function edit(Request $request, $id): \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$user = $request->user();
|
||||
$bot = Bot::findOrFail($id);
|
||||
@@ -61,9 +57,7 @@ class ChatBotController extends Controller
|
||||
/**
|
||||
* Update the specified Bot resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
|
||||
Reference in New Issue
Block a user