From 3810ec98c42849ec887bd28a7db98316fa1bf386 Mon Sep 17 00:00:00 2001 From: EwelinaSkrzypacz Date: Tue, 17 Dec 2024 09:19:40 +0100 Subject: [PATCH] - fix - change method name from data() to getData() --- app/Http/Controllers/EquipmentController.php | 4 ++-- app/Http/Controllers/EquipmentLabelController.php | 2 +- app/Http/Controllers/HolidayController.php | 4 ++-- app/Http/Controllers/OvertimeRequestController.php | 2 +- app/Http/Controllers/TechnologyController.php | 2 +- app/Http/Controllers/UserHistoryController.php | 4 ++-- app/Http/Controllers/VacationLimitController.php | 2 +- app/Http/Controllers/VacationRequestController.php | 2 +- app/Http/Requests/EquipmentLabelRequest.php | 2 +- app/Http/Requests/EquipmentRequest.php | 2 +- app/Http/Requests/HolidayRequest.php | 2 +- app/Http/Requests/OvertimeRequestRequest.php | 2 +- app/Http/Requests/TechnologyRequest.php | 2 +- app/Http/Requests/UserHistoryRequest.php | 2 +- app/Http/Requests/VacationLimitRequest.php | 2 +- app/Http/Requests/VacationRequestRequest.php | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/Http/Controllers/EquipmentController.php b/app/Http/Controllers/EquipmentController.php index 8fd19b93..6cbb675d 100644 --- a/app/Http/Controllers/EquipmentController.php +++ b/app/Http/Controllers/EquipmentController.php @@ -122,7 +122,7 @@ public function store( ): RedirectResponse { $this->authorize("manageEquipment"); - EquipmentItem::query()->create($request->data()); + EquipmentItem::query()->create($request->getData()); return redirect() ->route("equipment-items.index") @@ -157,7 +157,7 @@ public function update( ): RedirectResponse { $this->authorize("manageUsers"); - $equipmentItem->update($request->data()); + $equipmentItem->update($request->getData()); return redirect() ->route("equipment-items.index") diff --git a/app/Http/Controllers/EquipmentLabelController.php b/app/Http/Controllers/EquipmentLabelController.php index eaebc473..6dfb88a5 100644 --- a/app/Http/Controllers/EquipmentLabelController.php +++ b/app/Http/Controllers/EquipmentLabelController.php @@ -33,7 +33,7 @@ public function store(EquipmentLabelRequest $request): RedirectResponse { $this->authorize("manageEquipment"); - $label = EquipmentLabel::query()->create($request->data()); + $label = EquipmentLabel::query()->create($request->getData()); return redirect() ->back() diff --git a/app/Http/Controllers/HolidayController.php b/app/Http/Controllers/HolidayController.php index 968f0829..8052177f 100644 --- a/app/Http/Controllers/HolidayController.php +++ b/app/Http/Controllers/HolidayController.php @@ -48,7 +48,7 @@ public function store(HolidayRequest $request): RedirectResponse { $this->authorize("manageHolidays"); - Holiday::query()->create($request->data()); + Holiday::query()->create($request->getData()); return redirect() ->route("holidays.index") @@ -74,7 +74,7 @@ public function update(HolidayRequest $request, Holiday $holiday): RedirectRespo { $this->authorize("manageHolidays"); - $holiday->update($request->data()); + $holiday->update($request->getData()); return redirect() ->route("holidays.index") diff --git a/app/Http/Controllers/OvertimeRequestController.php b/app/Http/Controllers/OvertimeRequestController.php index 9274c666..fdce13f3 100644 --- a/app/Http/Controllers/OvertimeRequestController.php +++ b/app/Http/Controllers/OvertimeRequestController.php @@ -159,7 +159,7 @@ public function store(OvertimeRequestRequest $request, CreateAction $createActio { $this->authorize("canUseOvertimeRequestFunctionality", $request->user()); - $overtimeRequest = $createAction->execute($request->data(), $request->user()); + $overtimeRequest = $createAction->execute($request->getData(), $request->user()); return redirect() ->route("overtime.requests.show", $overtimeRequest) diff --git a/app/Http/Controllers/TechnologyController.php b/app/Http/Controllers/TechnologyController.php index e935e072..b1026eed 100644 --- a/app/Http/Controllers/TechnologyController.php +++ b/app/Http/Controllers/TechnologyController.php @@ -33,7 +33,7 @@ public function store(TechnologyRequest $request): RedirectResponse { $this->authorize("manageResumes"); - $technology = Technology::query()->create($request->data()); + $technology = Technology::query()->create($request->getData()); return redirect() ->back() diff --git a/app/Http/Controllers/UserHistoryController.php b/app/Http/Controllers/UserHistoryController.php index 5e52ae6d..aa1832dc 100644 --- a/app/Http/Controllers/UserHistoryController.php +++ b/app/Http/Controllers/UserHistoryController.php @@ -45,7 +45,7 @@ public function store(UserHistoryRequest $request, User $user): RedirectResponse { $this->authorize("manageUsers"); - $user->histories()->create($request->data()); + $user->histories()->create($request->getData()); return redirect() ->route("users.history", $user) @@ -67,7 +67,7 @@ public function update(UserHistoryRequest $request, UserHistory $history): Redir { $this->authorize("manageUsers"); - $history->update($request->data()); + $history->update($request->getData()); return redirect() ->route("users.history", $history->user_id) diff --git a/app/Http/Controllers/VacationLimitController.php b/app/Http/Controllers/VacationLimitController.php index f24c1a1e..b150b496 100644 --- a/app/Http/Controllers/VacationLimitController.php +++ b/app/Http/Controllers/VacationLimitController.php @@ -55,7 +55,7 @@ public function update(VacationLimitRequest $request): RedirectResponse { $this->authorize("manageVacationLimits"); - foreach ($request->data() as $limit) { + foreach ($request->getData() as $limit) { VacationLimit::query()->updateOrCreate( [ "user_id" => $limit["user"], diff --git a/app/Http/Controllers/VacationRequestController.php b/app/Http/Controllers/VacationRequestController.php index b77f9e01..74a389c2 100644 --- a/app/Http/Controllers/VacationRequestController.php +++ b/app/Http/Controllers/VacationRequestController.php @@ -260,7 +260,7 @@ public function store(VacationRequestRequest $request, CreateAction $createActio $this->authorize("skipRequestFlow"); } - $vacationRequest = $createAction->execute($request->data(), $request->user()); + $vacationRequest = $createAction->execute($request->getData(), $request->user()); return redirect() ->route("vacation.requests.show", $vacationRequest) diff --git a/app/Http/Requests/EquipmentLabelRequest.php b/app/Http/Requests/EquipmentLabelRequest.php index 8652eed0..20afcb75 100644 --- a/app/Http/Requests/EquipmentLabelRequest.php +++ b/app/Http/Requests/EquipmentLabelRequest.php @@ -20,7 +20,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { return [ "name" => $this->get("name"), diff --git a/app/Http/Requests/EquipmentRequest.php b/app/Http/Requests/EquipmentRequest.php index 5ba60e39..2ce7f7e9 100644 --- a/app/Http/Requests/EquipmentRequest.php +++ b/app/Http/Requests/EquipmentRequest.php @@ -22,7 +22,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { return [ "id_number" => $this->get("idNumber"), diff --git a/app/Http/Requests/HolidayRequest.php b/app/Http/Requests/HolidayRequest.php index 955fb966..06d40360 100644 --- a/app/Http/Requests/HolidayRequest.php +++ b/app/Http/Requests/HolidayRequest.php @@ -21,7 +21,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { $date = $this->get("date"); diff --git a/app/Http/Requests/OvertimeRequestRequest.php b/app/Http/Requests/OvertimeRequestRequest.php index 9c32cd62..0136d54e 100644 --- a/app/Http/Requests/OvertimeRequestRequest.php +++ b/app/Http/Requests/OvertimeRequestRequest.php @@ -22,7 +22,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { return [ "user_id" => $this->get("user"), diff --git a/app/Http/Requests/TechnologyRequest.php b/app/Http/Requests/TechnologyRequest.php index 598677fd..58cfd1f1 100644 --- a/app/Http/Requests/TechnologyRequest.php +++ b/app/Http/Requests/TechnologyRequest.php @@ -20,7 +20,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { return [ "name" => $this->get("name"), diff --git a/app/Http/Requests/UserHistoryRequest.php b/app/Http/Requests/UserHistoryRequest.php index 973f876f..e26b90aa 100644 --- a/app/Http/Requests/UserHistoryRequest.php +++ b/app/Http/Requests/UserHistoryRequest.php @@ -22,7 +22,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { return [ "from" => $this->get("from"), diff --git a/app/Http/Requests/VacationLimitRequest.php b/app/Http/Requests/VacationLimitRequest.php index e021b3db..9fcff026 100644 --- a/app/Http/Requests/VacationLimitRequest.php +++ b/app/Http/Requests/VacationLimitRequest.php @@ -19,7 +19,7 @@ public function rules(): array ]; } - public function data(): Collection + public function getData(): Collection { return $this->collect("items"); } diff --git a/app/Http/Requests/VacationRequestRequest.php b/app/Http/Requests/VacationRequestRequest.php index 4dca727c..ddf48587 100644 --- a/app/Http/Requests/VacationRequestRequest.php +++ b/app/Http/Requests/VacationRequestRequest.php @@ -23,7 +23,7 @@ public function rules(): array ]; } - public function data(): array + public function getData(): array { return [ "user_id" => $this->get("user"),