chore: cleanup dead code + format with Pint

- Remove unused FeaturesController (empty stubs, no routes)
- Remove ConvertSpatialFile CLI command (unused; service used in LayerManager)
- Remove MigrateGeojsonToFeatures CLI command (one-shot migration, not referenced)
- Remove .claude/worktrees/ (11 old agent worktrees from June)
- Apply Laravel Pint formatting across 219 files (style only, no functional changes)

Tests: 101 passing (319 assertions)
API routes: unchanged (8 routes intact)
This commit is contained in:
Javier Braña
2026-08-28 13:04:28 +02:00
parent 2dccd59385
commit 90630379fb
139 changed files with 2888 additions and 2510 deletions
@@ -2,9 +2,9 @@
namespace App\Notifications;
use App\Models\Feature;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use App\Models\Feature;
class FeatureCompletedNotification extends Notification
{
@@ -20,12 +20,12 @@ class FeatureCompletedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'feature_completed',
'feature_id' => $this->feature->id,
'project_id' => $this->feature->layer?->phase?->project_id,
'type' => 'feature_completed',
'feature_id' => $this->feature->id,
'project_id' => $this->feature->layer?->phase?->project_id,
'feature_name' => $this->feature->name,
'progress' => 100,
'message' => "Elemento '{$this->feature->name}' marcado como completado",
'progress' => 100,
'message' => "Elemento '{$this->feature->name}' marcado como completado",
];
}
}
@@ -2,10 +2,9 @@
namespace App\Notifications;
use App\Models\Inspection;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
use App\Models\Inspection;
class InspectionCompletedNotification extends Notification
{
@@ -21,13 +20,13 @@ class InspectionCompletedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'inspection_completed',
'type' => 'inspection_completed',
'inspection_id' => $this->inspection->id,
'project_id' => $this->inspection->project_id,
'feature_name' => $this->inspection->feature?->name ?? '—',
'project_id' => $this->inspection->project_id,
'feature_name' => $this->inspection->feature?->name ?? '—',
'template_name' => $this->inspection->template?->name ?? '—',
'result' => $this->inspection->result,
'message' => "Inspección completada en '{$this->inspection->feature?->name}': " . ($this->inspection->result ?? 'sin resultado'),
'result' => $this->inspection->result,
'message' => "Inspección completada en '{$this->inspection->feature?->name}': ".($this->inspection->result ?? 'sin resultado'),
];
}
}
@@ -2,9 +2,9 @@
namespace App\Notifications;
use App\Models\Inspection;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use App\Models\Inspection;
class InspectionDeletedNotification extends Notification
{
@@ -20,13 +20,13 @@ class InspectionDeletedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'inspection_deleted',
'type' => 'inspection_deleted',
'inspection_id' => $this->inspection->id,
'project_id' => $this->inspection->project_id,
'feature_name' => $this->inspection->feature?->name ?? '—',
'project_id' => $this->inspection->project_id,
'feature_name' => $this->inspection->feature?->name ?? '—',
'template_name' => $this->inspection->template?->name ?? '—',
'deleted_by' => $this->deletedBy,
'message' => "Inspección eliminada en '{$this->inspection->feature?->name}' por {$this->deletedBy}",
'deleted_by' => $this->deletedBy,
'message' => "Inspección eliminada en '{$this->inspection->feature?->name}' por {$this->deletedBy}",
];
}
}
}
@@ -2,9 +2,9 @@
namespace App\Notifications;
use App\Models\Inspection;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use App\Models\Inspection;
class InspectionUpdatedNotification extends Notification
{
@@ -20,14 +20,14 @@ class InspectionUpdatedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'inspection_updated',
'type' => 'inspection_updated',
'inspection_id' => $this->inspection->id,
'project_id' => $this->inspection->project_id,
'feature_name' => $this->inspection->feature?->name ?? '—',
'project_id' => $this->inspection->project_id,
'feature_name' => $this->inspection->feature?->name ?? '—',
'template_name' => $this->inspection->template?->name ?? '—',
'result' => $this->inspection->result,
'changes' => $this->changes,
'message' => "Inspección actualizada en '{$this->inspection->feature?->name}'",
'result' => $this->inspection->result,
'changes' => $this->changes,
'message' => "Inspección actualizada en '{$this->inspection->feature?->name}'",
];
}
}
}
@@ -20,11 +20,11 @@ class IssueAssignedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'issue_assigned',
'issue_id' => $this->issue->id,
'type' => 'issue_assigned',
'issue_id' => $this->issue->id,
'project_id' => $this->issue->project_id,
'priority' => $this->issue->priority,
'message' => "Se te ha asignado la incidencia '{$this->issue->title}'",
'priority' => $this->issue->priority,
'message' => "Se te ha asignado la incidencia '{$this->issue->title}'",
];
}
}
@@ -23,11 +23,11 @@ class IssueCommentedNotification extends Notification
$issue = $this->comment->issue;
return [
'type' => 'issue_commented',
'issue_id' => $this->comment->issue_id,
'type' => 'issue_commented',
'issue_id' => $this->comment->issue_id,
'project_id' => $issue?->project_id,
'author' => $this->comment->user?->name,
'message' => "{$this->comment->user?->name} comentó en '{$issue?->title}': " . Str::limit($this->comment->body, 60),
'author' => $this->comment->user?->name,
'message' => "{$this->comment->user?->name} comentó en '{$issue?->title}': ".Str::limit($this->comment->body, 60),
];
}
}
@@ -2,9 +2,9 @@
namespace App\Notifications;
use App\Models\Issue;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use App\Models\Issue;
class IssueReportedNotification extends Notification
{
@@ -20,12 +20,12 @@ class IssueReportedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'issue_reported',
'issue_id' => $this->issue->id,
'project_id' => $this->issue->project_id,
'type' => 'issue_reported',
'issue_id' => $this->issue->id,
'project_id' => $this->issue->project_id,
'feature_name' => $this->issue->feature?->name ?? '—',
'priority' => $this->issue->priority,
'message' => "Nuevo issue '{$this->issue->title}' (prioridad: {$this->issue->priority})",
'priority' => $this->issue->priority,
'message' => "Nuevo issue '{$this->issue->title}' (prioridad: {$this->issue->priority})",
];
}
}
@@ -20,18 +20,18 @@ class IssueStatusChangedNotification extends Notification
public function toArray($notifiable): array
{
$label = [
'open' => 'reabierta',
'open' => 'reabierta',
'in_review' => 'enviada a revisión',
'resolved' => 'resuelta',
'closed' => 'cerrada',
'resolved' => 'resuelta',
'closed' => 'cerrada',
][$this->status] ?? $this->status;
return [
'type' => 'issue_status_changed',
'issue_id' => $this->issue->id,
'type' => 'issue_status_changed',
'issue_id' => $this->issue->id,
'project_id' => $this->issue->project_id,
'status' => $this->status,
'message' => "La incidencia '{$this->issue->title}' ha sido {$label}",
'status' => $this->status,
'message' => "La incidencia '{$this->issue->title}' ha sido {$label}",
];
}
}
@@ -20,12 +20,12 @@ class IssueTaskAssignedNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'issue_task_assigned',
'issue_id' => $this->task->issue_id,
'task_id' => $this->task->id,
'type' => 'issue_task_assigned',
'issue_id' => $this->task->issue_id,
'task_id' => $this->task->id,
'project_id' => $this->task->issue?->project_id,
'due_date' => $this->task->due_date?->toDateString(),
'message' => "Se te ha asignado la tarea '{$this->task->title}'",
'due_date' => $this->task->due_date?->toDateString(),
'message' => "Se te ha asignado la tarea '{$this->task->title}'",
];
}
}
@@ -20,12 +20,12 @@ class IssueTaskOverdueNotification extends Notification
public function toArray($notifiable): array
{
return [
'type' => 'issue_task_overdue',
'issue_id' => $this->task->issue_id,
'task_id' => $this->task->id,
'type' => 'issue_task_overdue',
'issue_id' => $this->task->issue_id,
'task_id' => $this->task->id,
'project_id' => $this->task->issue?->project_id,
'due_date' => $this->task->due_date?->toDateString(),
'message' => "Tarea vencida: '{$this->task->title}' (venció el {$this->task->due_date?->format('d/m/Y')})",
'due_date' => $this->task->due_date?->toDateString(),
'message' => "Tarea vencida: '{$this->task->title}' (venció el {$this->task->due_date?->format('d/m/Y')})",
];
}
}