add linter

This commit is contained in:
Romulus21
2024-02-18 23:30:50 +01:00
parent b53d378ec1
commit ebfc56eba3
34 changed files with 568 additions and 262 deletions

View File

@@ -48,7 +48,7 @@ class ToDoController extends Controller
$data['checked'] = $request->input('checked') ? now() : null;
$todo->update($data);
if ($request->user()->currentTimeTracker->to_do_id === $todo->id) {
if ($request->user()->currentTimeTracker?->to_do_id === $todo->id) {
$request->user()->stopCurrentTimeTracker();
}

View File

@@ -23,7 +23,8 @@ class ToDoRequest extends FormRequest
{
return [
'name' => ['string', 'min:3', 'max:255'],
'checked' => ['boolean'],
'description' => ['string', 'max:2000'],
'checked' => ['boolean', 'nullable'],
];
}
}

View File

@@ -18,6 +18,7 @@ class ToDoResource extends JsonResource
'id' => $this->id,
'user_id' => $this->user_id,
'name' => $this->name,
'description' => $this->description,
'checked' => $this->checked,
'duration' => $this->duration,
];