diff --git a/app/Console/Commands/ImportGenData.php b/app/Console/Commands/ImportGenData.php index 81562841e0546e3cc7e4571a071a0f63d99e64ac..8cad1442c7b232abcf6ccc13d0b33834c978197c 100644 --- a/app/Console/Commands/ImportGenData.php +++ b/app/Console/Commands/ImportGenData.php @@ -87,7 +87,7 @@ public function handle(): int // Ask the user which tube should be associated with the generator data $this->newLine(); foreach ($tubes as $tube) { - $this->line($tube->id . ': ' . $tube->housing_model . ' SN: ' . $tube->housing_sn . ' ' . $tube->notes . ' Status:' . $tube->tube_status); + $this->line($tube->id.': '.$tube->housing_model.' SN: '.$tube->housing_sn.' '.$tube->notes.' Status:'.$tube->tube_status); $tubeChoice[] = $tube->id; } $tubeId = $this->choice( @@ -158,7 +158,7 @@ public function handle(): int $progressBar->finish(); $this->newLine(); - $this->info('Generator data for Survey ID: ' . $surveyId . ' (' . $machine->description . ') saved.'); + $this->info('Generator data for Survey ID: '.$surveyId.' ('.$machine->description.') saved.'); return 1; } diff --git a/app/Console/Commands/ImportN3TO10.php b/app/Console/Commands/ImportN3TO10.php index 21aff1dd935726db1c71c37ed05d44ff5a10bcc3..95dac082944021452fab33755d3ef1103302dc81 100644 --- a/app/Console/Commands/ImportN3TO10.php +++ b/app/Console/Commands/ImportN3TO10.php @@ -83,7 +83,7 @@ public function handle(): int // Ask the user which tube should be associated with the generator data $this->newLine(); foreach ($tubes as $tube) { - $this->line($tube->id . ': ' . $tube->housing_model . ' SN: ' . $tube->housing_sn . ' ' . $tube->notes . ' Status:' . $tube->tube_status); + $this->line($tube->id.': '.$tube->housing_model.' SN: '.$tube->housing_sn.' '.$tube->notes.' Status:'.$tube->tube_status); $tubeChoice[] = $tube->id; } $tubeId = $this->choice( @@ -135,7 +135,7 @@ public function handle(): int $progressBar->advance(); } - $this->info(' Leeds N3 data for Survey ID: ' . $surveyId . ' (' . $machine->description . ') saved.'); + $this->info(' Leeds N3 data for Survey ID: '.$surveyId.' ('.$machine->description.') saved.'); /* * Get Leeds TO10 data (C414:M426) diff --git a/app/Console/Commands/ImportSurveyReports.php b/app/Console/Commands/ImportSurveyReports.php index c172f32dde3c2503855640ed95ae4ab7516e77ab..3eeb0fc46c96946946f3960357f06d7f829d8919 100644 --- a/app/Console/Commands/ImportSurveyReports.php +++ b/app/Console/Commands/ImportSurveyReports.php @@ -41,19 +41,19 @@ public function handle(): void foreach ($surveys as $s) { // See if the report_file_path starts with 'public/SurveyReports' if (substr($s->report_file_path, 0, 20) == 'public/SurveyReports') { - $file = '/opt/www/raddb/public/storage/oldSurveyReports/' . substr($s->report_file_path, 21); + $file = '/opt/www/raddb/public/storage/oldSurveyReports/'.substr($s->report_file_path, 21); } if (substr($s->report_file_path, 0, 13) == 'SurveyReports') { - $file = '/opt/www/raddb/public/storage/oldSurveyreports/' . substr($s->report_file_path, 14); + $file = '/opt/www/raddb/public/storage/oldSurveyreports/'.substr($s->report_file_path, 14); } if (substr($s->report_file_path, 0, 4) == '2018') { - $file = '/opt/www/raddb/public/storage/oldSurveyReports/' . $s->report_file_path; + $file = '/opt/www/raddb/public/storage/oldSurveyReports/'.$s->report_file_path; } if (file_exists($file)) { $s->addMedia($file) ->preservingOriginal() ->toMediaCollection('survey_report', 'SurveyReports'); - $this->info($file . 'added to medialibrary'); + $this->info($file.'added to medialibrary'); } } } diff --git a/app/Console/Commands/LutAdd.php b/app/Console/Commands/LutAdd.php index 59461046cc1d3fcf5a2b1a0b278e264904d18abc..7771b5361e6b59768859c160975764d3e8614d9e 100644 --- a/app/Console/Commands/LutAdd.php +++ b/app/Console/Commands/LutAdd.php @@ -55,7 +55,7 @@ public function handle(): void $lut->location = text( label: 'Enter a new location', required: true, - validate: fn(string $value) => match (true) { + validate: fn (string $value) => match (true) { Str::length($value) > 100 => 'The location must be less than 100 characters', default => null } @@ -66,7 +66,7 @@ public function handle(): void $lut->manufacturer = text( label: 'Enter a new manufacturer', required: true, - validate: fn(string $value) => match (true) { + validate: fn (string $value) => match (true) { Str::length($value) > 50 => 'The manufacturer must be less than 50 characters', default => null } @@ -77,7 +77,7 @@ public function handle(): void $lut->modality = text( label: 'Enter a new modality', required: true, - validate: fn(string $value) => match (true) { + validate: fn (string $value) => match (true) { Str::length($value) > 25 => 'The modality must be less than 25 characters', default => null } @@ -88,7 +88,7 @@ public function handle(): void $lut->name = text( label: 'Enter a new tester\'s name', required: true, - validate: fn(string $value) => match (true) { + validate: fn (string $value) => match (true) { Str::length($value) > 25 => 'The name must be less than 25 characters', default => null } @@ -96,7 +96,7 @@ public function handle(): void $lut->initials = text( label: 'Enter tester\'s initials', required: true, - validate: fn(string $value) => match (true) { + validate: fn (string $value) => match (true) { Str::length($value) > 4 => 'The initials must be less than 4 characters', default => null } @@ -107,7 +107,7 @@ public function handle(): void $lut->test_type = text( label: 'Enter a new test type', required: true, - validate: fn(string $value) => match (true) { + validate: fn (string $value) => match (true) { Str::length($value) > 30 => 'The test type must be less than 30 characters', default => null } @@ -121,7 +121,7 @@ public function handle(): void if (is_object($lut)) { $lut->save(); - info('New ' . $table . ' entry saved.'); + info('New '.$table.' entry saved.'); } } } diff --git a/app/Console/Commands/LutDelete.php b/app/Console/Commands/LutDelete.php index c963cb2965e8e9a066354ed9fe8907a6c73b5396..38928514ba3dd90b99b033d35b060764501edc42 100644 --- a/app/Console/Commands/LutDelete.php +++ b/app/Console/Commands/LutDelete.php @@ -92,9 +92,9 @@ public function handle(): void $lut = $model::find(text(label: 'Enter the ID to remove', required: true)); // Ask for confirmation - if (confirm(label: 'Deleting from ' . $table . ' ID:' . $lut->id . ' Value: ' . $lut->$field, default: false)) { + if (confirm(label: 'Deleting from '.$table.' ID:'.$lut->id.' Value: '.$lut->$field, default: false)) { $lut->delete(); - info($table . ' ID:' . $lut->id . ' deleted.'); + info($table.' ID:'.$lut->id.' deleted.'); // Show the updated lookup table $this->showTable($table); diff --git a/app/Console/Commands/LutEdit.php b/app/Console/Commands/LutEdit.php index c4e8c7d7bf5da1e3dcbba3fcd70d0f01f67d3f77..df6ae71b00afed14d18383fe43b4c27842b1263a 100644 --- a/app/Console/Commands/LutEdit.php +++ b/app/Console/Commands/LutEdit.php @@ -84,7 +84,7 @@ public function handle(): void // Show the selected lookup table $id = select( - label: 'Select the ' . $field . ' to edit', + label: 'Select the '.$field.' to edit', options: $model::pluck($field, 'id'), scroll: 10 ); @@ -93,12 +93,12 @@ public function handle(): void $value = text(label: 'What should the new value be?', required: true); - if (confirm('Changing ' . $lut->$field . ' to ' . $value . '.', default: false)) { + if (confirm('Changing '.$lut->$field.' to '.$value.'.', default: false)) { $lut->$field = $value; // Need to validate this before saving $lut->save(); // Show the updated lookup table $this->showTable($table); - info($table . ' table ID: ' . $id . ' edited.'); + info($table.' table ID: '.$id.' edited.'); } else { info('No changes made.'); } diff --git a/app/Console/Commands/MachineEdit.php b/app/Console/Commands/MachineEdit.php index f2fffc9b47e2ad6b9267c7ac2dffd2a1af4ede08..c848d8c7216b698d18db3f336e69bdeee607d27b 100644 --- a/app/Console/Commands/MachineEdit.php +++ b/app/Console/Commands/MachineEdit.php @@ -56,7 +56,7 @@ public function handle(): int $machine = Machine::find( search( 'Search for the machine description to edit', - fn(string $value) => strlen($value) > 0 + fn (string $value) => strlen($value) > 0 ? Machine::active()->where('description', 'like', "%{$value}%")->orderBy('description')->pluck('description', 'id')->all() : [] ) diff --git a/app/Console/Commands/SurveyAdd.php b/app/Console/Commands/SurveyAdd.php index b898132064905b8e7f1bf0125ad1ee318081792a..8eb8d648094c4a4646db986f0f13db9ee3d68840 100644 --- a/app/Console/Commands/SurveyAdd.php +++ b/app/Console/Commands/SurveyAdd.php @@ -42,7 +42,7 @@ public function handle(): int // No machine ID was provided. Prompt the user to select a machine $testdate->machine_id = search( 'Search for the machine description to add a survey for', - fn(string $value) => strlen($value) > 0 + fn (string $value) => strlen($value) > 0 ? Machine::active()->where('description', 'like', "%{$value}%")->orderBy('description')->pluck('description', 'id')->all() : [] ); @@ -98,7 +98,7 @@ public function handle(): int // Save the survey $testdate->save(); - info('Survey ID ' . $testdate->id . ' has been added for ' . $testdate->machine->description . '.'); + info('Survey ID '.$testdate->id.' has been added for '.$testdate->machine->description.'.'); return 0; } diff --git a/app/Console/Commands/SurveyCancel.php b/app/Console/Commands/SurveyCancel.php index c7e30e5a19fc35314bf57cfbbafd32d4c22567a4..6463fb1ba63f7d81f5ce1dcc3035668db972fa02 100644 --- a/app/Console/Commands/SurveyCancel.php +++ b/app/Console/Commands/SurveyCancel.php @@ -53,7 +53,7 @@ public function handle(): int $survey = TestDate::find($survey_id); $survey->delete(); - info('Survey ID ' . $survey_id . ' has been deleted'); + info('Survey ID '.$survey_id.' has been deleted'); return 0; } diff --git a/app/Console/Commands/TubeAdd.php b/app/Console/Commands/TubeAdd.php index 021ae7ece6bc796198f089aa1c6557dd466758d0..25533e34c16ab31e207863655376a988c62f0e97 100644 --- a/app/Console/Commands/TubeAdd.php +++ b/app/Console/Commands/TubeAdd.php @@ -50,7 +50,7 @@ public function handle(): int // No machine ID was provided. Display a list of all the machines and ask for a machine ID to add the new tube to. $tube->machine_id = search( 'Search for the machine description to add a tube to', - fn(string $value) => strlen($value) > 0 + fn (string $value) => strlen($value) > 0 ? Machine::active()->where('description', 'like', "%{$value}%")->orderBy('description')->pluck('description', 'id')->all() : [] ); diff --git a/app/Console/Commands/TubeEdit.php b/app/Console/Commands/TubeEdit.php index 9f89b10595417e331d1bc75cb6f464781689236b..785c0333f2d814c95638a688b9c485d7a3887c51 100644 --- a/app/Console/Commands/TubeEdit.php +++ b/app/Console/Commands/TubeEdit.php @@ -56,7 +56,7 @@ public function handle(): int $machine = Machine::find( search( 'Search for the machine description to edit', - fn(string $value) => strlen($value) > 0 + fn (string $value) => strlen($value) > 0 ? Machine::active()->where('description', 'like', "%{$value}%")->orderBy('description')->pluck('description', 'id')->all() : [] ) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 735673db36b6a8aa5b44f73e3ca171bf72024a13..b1c35e93938ba38098fc7a1b3aaead4315413da2 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -27,7 +27,7 @@ protected function schedule(Schedule $schedule) */ protected function commands() { - $this->load(__DIR__ . '/Commands'); + $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } diff --git a/app/Http/Controllers/AnnReportController.php b/app/Http/Controllers/AnnReportController.php index 1a6b1a4b48f45d5ccac975991a81bb9f08d5b99e..29fd5971e97a2559e798203fa3a13ad7bf931ae9 100644 --- a/app/Http/Controllers/AnnReportController.php +++ b/app/Http/Controllers/AnnReportController.php @@ -138,14 +138,14 @@ public function annrep(int $year): View // Get a list of new installations during the specified year $newInstalls = Machine::with('modality', 'location') - ->whereBetween('install_date', [$year . '-01-01', $year . '-12-31']) + ->whereBetween('install_date', [$year.'-01-01', $year.'-12-31']) ->get(); // Get a list of machines removed during the specified year $removed = Machine::onlyTrashed() ->with('modality', 'location') - ->whereBetween('deleted_at', [$year . '-01-01', $year . '-12-31']) + ->whereBetween('deleted_at', [$year.'-01-01', $year.'-12-31']) ->get(); return view('ar.annrep', [ diff --git a/app/Http/Controllers/DashboardSurveyCalendarController.php b/app/Http/Controllers/DashboardSurveyCalendarController.php index 3da5a36a13c4a24bfa9179dbff953ae425a939c6..5acce13c66c64122f93e2ad96e20eb95cedb40ff 100644 --- a/app/Http/Controllers/DashboardSurveyCalendarController.php +++ b/app/Http/Controllers/DashboardSurveyCalendarController.php @@ -54,10 +54,10 @@ public function index(): View // Create a column chart \Lava::CalendarChart( - 'Daily survey count - ' . $y->years, + 'Daily survey count - '.$y->years, $surveyCalendar, [ - 'title' => 'Daily survey counts - ' . $y->years, + 'title' => 'Daily survey counts - '.$y->years, 'titleTextStyle' => [ 'fontSize' => 14, 'color' => 'black', ], diff --git a/app/Http/Controllers/DashboardSurveyCategoriesController.php b/app/Http/Controllers/DashboardSurveyCategoriesController.php index 0f9a9a6a81018c2718431181e1af8482e8af201c..7beaa540396f055251f50b835a4311f5ad85eb5e 100644 --- a/app/Http/Controllers/DashboardSurveyCategoriesController.php +++ b/app/Http/Controllers/DashboardSurveyCategoriesController.php @@ -56,11 +56,11 @@ public function index(): View // Create a pie chart \Lava::PieChart( - 'Yearly survey counts by test type - ' . $y->years, + 'Yearly survey counts by test type - '.$y->years, $surveyCategories, [ 'is3D' => true, - 'title' => 'Survey counts - ' . $y->years . ' (' . $chartData->sum() . ')', + 'title' => 'Survey counts - '.$y->years.' ('.$chartData->sum().')', 'titleTextStyle' => [ 'fontSize' => 14, 'color' => 'black', ], diff --git a/app/Http/Controllers/DashboardSurveyCountController.php b/app/Http/Controllers/DashboardSurveyCountController.php index 6f35a5b8ceb72af51c2f30b700b56c1c2e0069a8..674885a7a6d07aca67e3a3d1b2ab2fda40ccd6f3 100644 --- a/app/Http/Controllers/DashboardSurveyCountController.php +++ b/app/Http/Controllers/DashboardSurveyCountController.php @@ -66,10 +66,10 @@ public function index(): View // Create a column chart \Lava::ColumnChart( - 'Survey count - ' . $y->years, + 'Survey count - '.$y->years, $surveyCounts, [ - 'title' => 'Survey counts - ' . $y->years, + 'title' => 'Survey counts - '.$y->years, 'titleTextStyle' => [ 'fontSize' => 14, ], 'legend' => [ diff --git a/app/Http/Controllers/MachineController.php b/app/Http/Controllers/MachineController.php index 4b2761ce8a66460193909b1c8f8001734ff4065b..f1f947cc1b469624ff8977250ef52b12ab69e62c 100644 --- a/app/Http/Controllers/MachineController.php +++ b/app/Http/Controllers/MachineController.php @@ -99,7 +99,7 @@ public function store(UpdateMachineRequest $request, Machine $machine): Redirect if ($machine->save()) { $status = 'success'; - $message = 'New machine created: Machine ID ' . $machine->id . '.'; + $message = 'New machine created: Machine ID '.$machine->id.'.'; Log::info($message); } else { $status = 'fail'; @@ -202,7 +202,7 @@ public function update(UpdateMachineRequest $request, $id): RedirectResponse if ($machine->save()) { $status = 'success'; - $message = 'Machine ID ' . $machine->id . ' updated.'; + $message = 'Machine ID '.$machine->id.' updated.'; Log::info($message); } else { $status = 'fail'; @@ -248,19 +248,19 @@ public function destroy($id): RedirectResponse $tube->remove_date = date('Y-m-d'); $tube->save(); if ($tube->delete()) { - $message .= 'Tube ID ' . $tube->id . ' deleted.'; + $message .= 'Tube ID '.$tube->id.' deleted.'; } else { - $message .= 'Error deleting tube ID ' . $tube->id . '.'; + $message .= 'Error deleting tube ID '.$tube->id.'.'; } } if ($machine->delete()) { $status = 'success'; - $message .= 'Machine ID ' . $machine->id . ' deleted.'; + $message .= 'Machine ID '.$machine->id.' deleted.'; Log::info($message); } else { $status = 'fail'; - $message .= 'Error deleting machine ID ' . $machine->id . '.'; + $message .= 'Error deleting machine ID '.$machine->id.'.'; Log::error($message); } diff --git a/app/Http/Controllers/MachinePhotoController.php b/app/Http/Controllers/MachinePhotoController.php index 52a6d5ae1581fb3d93c7ab2263a9f56466638e1c..43ad85c14c496de4bf3186b2e80cb881b843079c 100644 --- a/app/Http/Controllers/MachinePhotoController.php +++ b/app/Http/Controllers/MachinePhotoController.php @@ -71,7 +71,7 @@ public function store(StoreMachinePhotoRequest $request): RedirectResponse ->toMediaCollection('machine_photos', 'MachinePhotos'); $status = 'success'; - $message .= 'Photo for machine ' . $machine->id . ' saved.'; + $message .= 'Photo for machine '.$machine->id.' saved.'; Log::info($message); } diff --git a/app/Http/Controllers/OpNoteController.php b/app/Http/Controllers/OpNoteController.php index 875c4d07d096d0855981d3ca003acb319dc71b78..94608179b1153872afe7ea938b7fa3c55f08a087 100644 --- a/app/Http/Controllers/OpNoteController.php +++ b/app/Http/Controllers/OpNoteController.php @@ -85,7 +85,7 @@ public function store(OpNoteStoreRequest $request, OpNote $opNote): RedirectResp if ($opNote->save()) { $status = 'success'; - $message = 'Operational note ' . $opNote->id . ' added.'; + $message = 'Operational note '.$opNote->id.' added.'; Log::info($message); } else { $status = 'fail'; @@ -160,7 +160,7 @@ public function update(OpNoteUpdateRequest $request, string $id): RedirectRespon if ($opNote->save()) { $status = 'success'; - $message = 'Operational note ' . $opNote->id . ' updated.'; + $message = 'Operational note '.$opNote->id.' updated.'; Log::info($message); } else { $status = 'fail'; diff --git a/app/Http/Controllers/RecommendationController.php b/app/Http/Controllers/RecommendationController.php index bfa2a5a84890e48ca358fd49a672a7347b865ea4..ccd39d8557eb68d56167b2a9b98f5105b4a7b38a 100644 --- a/app/Http/Controllers/RecommendationController.php +++ b/app/Http/Controllers/RecommendationController.php @@ -107,7 +107,7 @@ public function store(StoreRecommendationRequest $request, Recommendation $recom if ($recommendation->save()) { $status = 'success'; - $message .= 'Recommendation ' . $recommendation->id . ' added.'; + $message .= 'Recommendation '.$recommendation->id.' added.'; Log::info($message); } else { $status = 'fail'; @@ -188,7 +188,7 @@ public function update(UpdateRecommendationRequest $request, string $surveyID): if ($recommendation->save()) { $status = 'success'; - $message .= 'Recommendation ' . $recommendation->id . ' resolved.'; + $message .= 'Recommendation '.$recommendation->id.' resolved.'; Log::info($message); } else { $status = 'fail'; diff --git a/app/Http/Controllers/SurveyReportController.php b/app/Http/Controllers/SurveyReportController.php index 3946548bd5303f856d981d82bb507fb6ab077329..b3c75909060aa8967dccac6eec32589a9fb482bb 100644 --- a/app/Http/Controllers/SurveyReportController.php +++ b/app/Http/Controllers/SurveyReportController.php @@ -75,7 +75,7 @@ public function store(StoreSurveyReportRequest $request): RedirectResponse ]) ->toMediaCollection('survey_reports', 'SurveyReports'); $status = 'success'; - $message .= 'Survey report for ' . $request->surveyId . ' saved.'; + $message .= 'Survey report for '.$request->surveyId.' saved.'; Log::info($message); } diff --git a/app/Http/Controllers/TestDateController.php b/app/Http/Controllers/TestDateController.php index 1e56d97a0cd6aef9e6f070552ab30c074049670d..f7f73eefaa136c213529d5df7e58e4ef61030e38 100644 --- a/app/Http/Controllers/TestDateController.php +++ b/app/Http/Controllers/TestDateController.php @@ -92,7 +92,7 @@ public function store(UpdateTestDateRequest $request, TestDate $testdate): Redir if ($testdate->save()) { $status = 'success'; - $message .= 'Survey ' . $testdate->id . ' added.'; + $message .= 'Survey '.$testdate->id.' added.'; Log::info($message); } else { $status = 'fail'; @@ -162,7 +162,7 @@ public function update(UpdateTestDateRequest $request, $surveyId): RedirectRespo if ($testdate->save()) { $status = 'success'; - $message .= 'Survey ' . $testdate->id . ' edited.'; + $message .= 'Survey '.$testdate->id.' edited.'; Log::info($message); } else { $status = 'fail'; @@ -196,7 +196,7 @@ public function cancel(int $surveyId): RedirectResponse if (TestDate::findOrFail($surveyId)->delete()) { $status = 'success'; - $message .= 'Survey ' . $surveyId . ' canceled.'; + $message .= 'Survey '.$surveyId.' canceled.'; Log::info($message); } else { $status = 'fail'; diff --git a/app/Http/Controllers/TubeController.php b/app/Http/Controllers/TubeController.php index 0bfeb3fcd9d41f2cbd2fc773be095ae4890ba539..c9c32680f20bed0b45f260913d4872759ec20b80 100644 --- a/app/Http/Controllers/TubeController.php +++ b/app/Http/Controllers/TubeController.php @@ -85,7 +85,7 @@ public function store(StoreTubeRequest $request, Tube $tube): RedirectResponse if ($tube->save()) { $status = 'success'; - $message .= 'New tube saved for machine: ' . $tube->machine_id . '.'; + $message .= 'New tube saved for machine: '.$tube->machine_id.'.'; Log::info($message); } else { $status = 'fail'; @@ -161,7 +161,7 @@ public function update(UpdateTubeRequest $request, int $id): RedirectResponse if ($tube->save()) { $status = 'success'; - $message .= 'Tube ID ' . $tube->id . ' for machine ' . $tube->machine_id . ' updated.'; + $message .= 'Tube ID '.$tube->id.' for machine '.$tube->machine_id.' updated.'; Log::info($message); } else { $status = 'fail'; @@ -204,7 +204,7 @@ public function destroy(int $id): RedirectResponse // Delete and log the x-ray tube removal if ($tube->delete()) { $status = 'success'; - $message .= 'Tube ID ' . $tube->id . ' deleted.'; + $message .= 'Tube ID '.$tube->id.' deleted.'; Log::info($message); } else { $status = 'fail'; diff --git a/app/Livewire/CalibrationDatesTable.php b/app/Livewire/CalibrationDatesTable.php index 3f78ca9b074b7ad0d4d6b5960095a8086c9003d6..a3cb89998d50d79423f57c6c153b587bbf4feef7 100644 --- a/app/Livewire/CalibrationDatesTable.php +++ b/app/Livewire/CalibrationDatesTable.php @@ -33,19 +33,19 @@ public function columns(): array Column::make('Serial Number', 'serial_number'), Column::make('Description', 'description') ->format( - fn($value, $row, Column $column) => '' . $row->description . '' + fn ($value, $row, Column $column) => ''.$row->description.'' ) ->html(), DateColumn::make('Last calibration') ->label( - fn($row, Column $column) => TestDate::where('machine_id', $row->id) + fn ($row, Column $column) => TestDate::where('machine_id', $row->id) ->latest() ->first() ->test_date ?? '' )->outputFormat('Y-m-d'), Column::make('Age') ->label( - fn($row, Column $column) => Machine::find($row->id)->age + fn ($row, Column $column) => Machine::find($row->id)->age ), Column::make('Room', 'room'), ]; diff --git a/app/Livewire/MachineListTable.php b/app/Livewire/MachineListTable.php index 562f98049fee4bba9aaf085e3c2a392cd862d9a2..cdce761c3070f29531455d13d1a1246fb6e6deae 100644 --- a/app/Livewire/MachineListTable.php +++ b/app/Livewire/MachineListTable.php @@ -61,7 +61,7 @@ public function filters(): array ->orderBy('modality') ->get() ->keyBy('id') - ->map(fn($modality) => $modality->modality) + ->map(fn ($modality) => $modality->modality) ->toArray() ) ->filter(function (Builder $builder, string $value) { @@ -73,7 +73,7 @@ public function filters(): array ->orderBy('manufacturer') ->get() ->keyBy('id') - ->map(fn($manufacturer) => $manufacturer->manufacturer) + ->map(fn ($manufacturer) => $manufacturer->manufacturer) ->toArray() ) ->filter(function (Builder $builder, string $value) { @@ -85,7 +85,7 @@ public function filters(): array ->orderBy('location') ->get() ->keyBy('id') - ->map(fn($location) => $location->location) + ->map(fn ($location) => $location->location) ->toArray() ) ->filter(function (Builder $builder, string $value) { @@ -101,7 +101,7 @@ public function columns(): array Column::make('Description', 'description') ->searchable() ->format( - fn($value, $row, Column $column) => '' . $row->description . '' + fn ($value, $row, Column $column) => ''.$row->description.'' ) ->html(), Column::make('Modality', 'modality.modality') @@ -126,11 +126,11 @@ public function columns(): array Column::make('Room', 'room'), Column::make('Age') ->label( - fn($row, Column $column) => Machine::find($row->id)->age + fn ($row, Column $column) => Machine::find($row->id)->age ), Column::make('Edit') ->label( - fn($row, Column $column) => view('livewire-tables.edit-delete')->withRow($row) + fn ($row, Column $column) => view('livewire-tables.edit-delete')->withRow($row) ), ]; } diff --git a/app/Livewire/Opnotes/OperationalNotes.php b/app/Livewire/Opnotes/OperationalNotes.php index 642b5df4e0fea9152f379cdf5907b238c4211f8d..fc51ef482446c3570cfef37a3cc1df8fcf396b2e 100644 --- a/app/Livewire/Opnotes/OperationalNotes.php +++ b/app/Livewire/Opnotes/OperationalNotes.php @@ -59,7 +59,7 @@ public function deleteNote($id): void $this->opNotes = OpNote::where('machine_id', $this->selectedMachine)->get(); - session()->flash('message', 'Op note ' . $id . ' removed.'); + session()->flash('message', 'Op note '.$id.' removed.'); } /** diff --git a/app/Livewire/PendingSurveysTable.php b/app/Livewire/PendingSurveysTable.php index a1ae79eff856bad81fa502bcc4c046507255539c..131c9675646a20db8e85929c999b2343d7ceb689 100644 --- a/app/Livewire/PendingSurveysTable.php +++ b/app/Livewire/PendingSurveysTable.php @@ -32,11 +32,11 @@ public function columns(): array Column::make('Description', 'machine.description') ->searchable() ->format( - fn($value, $row, Column $column) => '' - . Machine::find(TestDate::find($row->id)->machine_id)->description - . '' + fn ($value, $row, Column $column) => '' + .Machine::find(TestDate::find($row->id)->machine_id)->description + .'' ) ->html(), DateColumn::make('Date scheduled', 'test_date') @@ -47,11 +47,11 @@ public function columns(): array Column::make('Survey Note', 'notes'), Column::make('Edit') ->label( - fn($row, Column $column) => view('livewire-tables.edit-survey')->withRow($row) + fn ($row, Column $column) => view('livewire-tables.edit-survey')->withRow($row) ), Column::make('Cancel') ->label( - fn($row, Column $column) => view('livewire-tables.cancel-survey')->withRow($row) + fn ($row, Column $column) => view('livewire-tables.cancel-survey')->withRow($row) ), ]; } diff --git a/app/Livewire/SurveyListTable.php b/app/Livewire/SurveyListTable.php index 9955c60bd84174eb3c33d386348ebe68c4d6c597..09b74eb750ddc6647838566495d78c240e2e14c8 100644 --- a/app/Livewire/SurveyListTable.php +++ b/app/Livewire/SurveyListTable.php @@ -40,7 +40,7 @@ public function columns(): array Column::make('Notes', 'notes'), Column::make('Survey Report') ->label( - fn($row, Column $column) => view('livewire-tables.survey-report-view') + fn ($row, Column $column) => view('livewire-tables.survey-report-view') ->withRow($row) ), ]; diff --git a/app/Livewire/SurveyScheduleTable.php b/app/Livewire/SurveyScheduleTable.php index 48fb723ff65b5b91ecb28d4f190b47d90d58eb55..881d8bdb1b6b0a21089c4dda5e32ba308c0ff266 100644 --- a/app/Livewire/SurveyScheduleTable.php +++ b/app/Livewire/SurveyScheduleTable.php @@ -32,7 +32,7 @@ public function columns(): array Column::make('Description', 'description') ->searchable() ->format( - fn($value, $row, Column $column) => '' . $row->description . '' + fn ($value, $row, Column $column) => ''.$row->description.'' ) ->html(), DateColumn::make('Previous', 'prevSurveyDate')