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:
HDVinnie
2021-05-15 22:41:28 -04:00
parent 041927202c
commit 3407075214
174 changed files with 237 additions and 1365 deletions
@@ -25,8 +25,6 @@ class ChatStatusController extends Controller
{
/**
* ChatController Constructor.
*
* @param \App\Repositories\ChatRepository $chatRepository
*/
public function __construct(private ChatRepository $chatRepository)
{
@@ -34,10 +32,8 @@ class ChatStatusController extends Controller
/**
* Chat Management.
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
{
$chatstatuses = $this->chatRepository->statuses();
@@ -49,7 +45,6 @@ class ChatStatusController extends Controller
/**
* Store A New Chat Status.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\RedirectResponse
*/
@@ -79,9 +74,7 @@ class ChatStatusController extends Controller
/**
* Update A Chat Status.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\ChatStatus $id
*
* @return \Illuminate\Http\RedirectResponse
*/
public function update(Request $request, $id)