forked from eatvio/eatvio-infra
make static analyse part
This commit is contained in:
@@ -9,21 +9,21 @@ use Illuminate\View\View;
|
||||
|
||||
class ChatMessage
|
||||
{
|
||||
public $id;
|
||||
public int $id;
|
||||
|
||||
public $payload;
|
||||
public int $payload;
|
||||
|
||||
public function __construct($id, $payload)
|
||||
public function __construct(int $id, int $payload)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->payload = $payload;
|
||||
}
|
||||
|
||||
public function someRandomFillFunction()
|
||||
public function someRandomFillFunction(): void
|
||||
{
|
||||
$users1 = User::all()->pluck('id');
|
||||
$users2 = User::all()->pluck('id');
|
||||
$faker = Faker\Factory::create();
|
||||
$faker = \Faker\Factory::create();
|
||||
|
||||
$users1->each(
|
||||
function ($user1, $key) use ($faker, $users2) {
|
||||
@@ -94,11 +94,11 @@ class ChatController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
// * @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(): void
|
||||
{
|
||||
ChatMessageUpdated::dispatch(new ChatMessage(time(), 'some text '.md5(time())));
|
||||
// ChatMessageUpdated::dispatch(new ChatMessage(time(), 'some text '.md5(time())));
|
||||
}
|
||||
|
||||
public function show(int $lastChatUser): View
|
||||
@@ -129,7 +129,7 @@ class ChatController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
private function makeChanName($from, $to)
|
||||
private function makeChanName(int $from = null, int $to = null): string
|
||||
{
|
||||
return (int) $from < (int) $to
|
||||
? $from.'_'.$to
|
||||
|
||||
Reference in New Issue
Block a user