Skip to content

Commit

Permalink
Merge pull request #30 from milwad-dev/analysis-JGYDKn
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
milwad-dev authored Nov 1, 2024
2 parents 52dba2a + 9781a9f commit 034f6c0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
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

0 comments on commit 034f6c0

Please sign in to comment.