forked from eatvio/eatvio-infra
make static analyse part
This commit is contained in:
@@ -11,19 +11,19 @@ use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
class CalendarController extends Controller
|
||||
{
|
||||
public $weekStartsAt;
|
||||
public int $weekStartsAt;
|
||||
|
||||
public $weekEndsAt;
|
||||
public int $weekEndsAt;
|
||||
|
||||
public $startsAt;
|
||||
public Carbon $startsAt;
|
||||
|
||||
public $endsAt;
|
||||
public Carbon $endsAt;
|
||||
|
||||
public $gridStartsAt;
|
||||
public Carbon $gridStartsAt;
|
||||
|
||||
public $gridEndsAt;
|
||||
public Carbon $gridEndsAt;
|
||||
|
||||
public function __construct($initialYear = null, $initialMonth = null, $weekStartsAt = null)
|
||||
public function __construct(int $initialYear = null, int $initialMonth = null, int $weekStartsAt = null)
|
||||
{
|
||||
$this->weekStartsAt = $weekStartsAt ?? Carbon::MONDAY;
|
||||
$this->weekEndsAt = $this->weekStartsAt === Carbon::MONDAY
|
||||
@@ -38,7 +38,7 @@ class CalendarController extends Controller
|
||||
$this->calculateGridStartsEnds();
|
||||
}
|
||||
|
||||
public function calculateGridStartsEnds()
|
||||
public function calculateGridStartsEnds(): void
|
||||
{
|
||||
$this->gridStartsAt = $this->startsAt->clone()->startOfWeek($this->weekStartsAt);
|
||||
$this->gridEndsAt = $this->endsAt->clone()->endOfWeek($this->weekEndsAt);
|
||||
@@ -53,7 +53,7 @@ class CalendarController extends Controller
|
||||
$this->gridEndsAt
|
||||
);
|
||||
$filledDays = Diary::where('user_id', $curUser->id)
|
||||
->whereMonth('date', now()->month)
|
||||
->whereMonth('date', (string) now()->month)
|
||||
->get()
|
||||
->keyBy('date');
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@ class DiaryController extends Controller
|
||||
return view('diary.show', ['curDiary' => $diary, 'daysCount' => $daysCount]);
|
||||
}
|
||||
|
||||
public function edit($id): View
|
||||
public function edit(int $id): View
|
||||
{
|
||||
$curDiary = Diary::find($id);
|
||||
$daysCount = Diary::where('user_id', auth()->id())->count();
|
||||
@@ -47,7 +47,7 @@ class DiaryController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
public function update(Request $request, int $id): RedirectResponse
|
||||
{
|
||||
/* dd($request, $id, $request->input()); */
|
||||
$curDiary = Diary::find($id);
|
||||
|
||||
@@ -7,66 +7,31 @@ use Illuminate\Http\Request;
|
||||
|
||||
class FinanceController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(Request $request): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Finance $finance)
|
||||
public function show(Finance $finance): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(Finance $finance)
|
||||
public function edit(Finance $finance): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, Finance $finance)
|
||||
public function update(Request $request, Finance $finance): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Finance $finance)
|
||||
public function destroy(Finance $finance): void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class RegistrationStartController extends Controller
|
||||
{
|
||||
public function start()
|
||||
public function start(): RedirectResponse
|
||||
{
|
||||
session()->flush();
|
||||
|
||||
|
||||
@@ -8,67 +8,32 @@ use Illuminate\Http\Request;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(Request $request): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(User $user)
|
||||
public function show(User $user): void
|
||||
{
|
||||
/* return view('user.show', ['user' => $user]); */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(UserDetailz $userDetailz)
|
||||
public function edit(UserDetailz $userDetailz): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, UserDetailz $userDetailz)
|
||||
public function update(Request $request, UserDetailz $userDetailz): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(UserDetailz $userDetailz)
|
||||
public function destroy(UserDetailz $userDetailz): void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user