Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
{
public function up(): void
{
Schema::create('announcements', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('body')->nullable();
$table->string('type')->default('info');
$table->json('panels')->nullable();
$table->timestamp('valid_from')->nullable();
$table->timestamp('valid_to')->nullable();
$table->timestamps();
});
if(!Schema::hasTable('announcements')) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix Pint style violation on the conditional (currently blocking CI).

Line 11 should follow Laravel/Pint spacing conventions; this is likely the single lint failure in the pipeline.

Suggested fix
-        if(!Schema::hasTable('announcements')) {
+        if (! Schema::hasTable('announcements')) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if(!Schema::hasTable('announcements')) {
if (! Schema::hasTable('announcements')) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@announcements/database/migrations/001_create_announcements_table.php` at line
11, The conditional spacing for the table-check is violating Pint rules; update
the if statement that calls Schema::hasTable('announcements') to follow
Laravel/Pint spacing (e.g. change "if(!Schema::hasTable('announcements')) {" to
"if (! Schema::hasTable('announcements')) {" or the project-preferred variant
"if (!Schema::hasTable('announcements')) {"), modifying the line that contains
Schema::hasTable('announcements') in the migration to match the linter's
expected spacing.

Schema::create('announcements', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('body')->nullable();
$table->string('type')->default('info');
$table->json('panels')->nullable();
$table->timestamp('valid_from')->nullable();
$table->timestamp('valid_to')->nullable();
$table->timestamps();
});
}
}

public function down(): void
Expand Down
Loading