forked from eatvio/eatvio-infra
static analisys refactoryn, View types added
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Events\ChatMessageUpdated;
|
||||
use App\Models\Chat;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class ChatMessage
|
||||
{
|
||||
@@ -57,12 +58,7 @@ class ChatMessage
|
||||
|
||||
class ChatController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(): View
|
||||
{
|
||||
// $_ = "from_user_id to_user_id";
|
||||
$curUserId = Auth()->user()->id;
|
||||
@@ -106,23 +102,7 @@ class ChatController extends Controller
|
||||
ChatMessageUpdated::dispatch(new ChatMessage(time(), 'some text '.md5(time())));
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Models\Chat $chat
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(int $lastChatUser)
|
||||
public function show(int $lastChatUser): View
|
||||
{
|
||||
$lastChatUser = User::find($lastChatUser);
|
||||
// $_ = "from_user_id to_user_id";
|
||||
@@ -150,33 +130,6 @@ class ChatController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(chat $chat)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, chat $chat)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(chat $chat)
|
||||
{
|
||||
}
|
||||
|
||||
private function makeChanName($from, $to)
|
||||
{
|
||||
return (int) $from < (int) $to
|
||||
|
||||
Reference in New Issue
Block a user