Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #30

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/Task/Database/Factories/TaskFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TaskFactory extends Factory
public function definition(): array
{
return [
'user_id' => User::factory()->create()->id,
'user_id' => User::factory()->create()->id,
'title' => fake()->title,
'description' => fake()->text,
'remind_date' => now(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Modules\Task\Enums\TaskPriorityEnum;
use Modules\Task\Enums\TaskStatusEnum;

return new class() extends Migration {
/**
Expand Down
4 changes: 2 additions & 2 deletions Modules/Task/Http/Controllers/TaskMarkAsDoneController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ public function __invoke(Task $task): \Illuminate\Http\JsonResponse
{
if ($task->status !== TaskStatusEnum::STATUS_ACTIVE->value) {
return response()->json([
'message' => 'You already done this task.'
'message' => 'You already done this task.',
], Response::HTTP_BAD_REQUEST);
}

$task->markAsDone();

return response()->json([
'data' => 'The task mark as done successfully.'
'data' => 'The task mark as done successfully.',
], Response::HTTP_OK);
}
}
2 changes: 1 addition & 1 deletion Modules/Task/Providers/TaskServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private function registerRoutes(): void
{
Route::middleware('api')
->prefix('api/'.config('app.version'))
->group(__DIR__ . '/../Routes/api.php');
->group(__DIR__.'/../Routes/api.php');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*/
Expand Down
Loading