add trend UX + PHPStan level 6 clean (0 errors)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-03 16:06:13 -04:00
parent 997e2d186c
commit 0d323b871b
26 changed files with 471 additions and 78 deletions

View File

@@ -36,33 +36,38 @@ class CoastalPoint
#[ORM\Column(length: 150)]
#[Groups(['spot:read'])]
private ?string $name = null;
private string $name;
#[ORM\Column(type: 'geometry', options: ['geometry_type' => 'POINT', 'srid' => 4326])]
private mixed $geometry = null;
#[ORM\Column(length: 30)]
#[Groups(['spot:read'])]
private ?string $type = null;
private string $type;
#[ORM\Column(length: 100)]
#[Groups(['spot:read'])]
private ?string $region = null;
private string $region;
/** @var Collection<int, ImpactScore> */
#[ORM\OneToMany(targetEntity: ImpactScore::class, mappedBy: 'coastalPoint')]
private Collection $impactScores;
/** @var Collection<int, UserFeedback> */
#[ORM\OneToMany(targetEntity: UserFeedback::class, mappedBy: 'coastalPoint')]
private Collection $feedbacks;
public function __construct()
{
$this->name = '';
$this->type = '';
$this->region = '';
$this->impactScores = new ArrayCollection();
$this->feedbacks = new ArrayCollection();
}
public function getId(): ?Uuid { return $this->id; }
public function getName(): ?string { return $this->name; }
public function getName(): string { return $this->name; }
public function setName(string $name): static { $this->name = $name; return $this; }
public function getGeometry(): mixed { return $this->geometry; }
public function setGeometry(mixed $geometry): static { $this->geometry = $geometry; return $this; }
@@ -82,9 +87,9 @@ class CoastalPoint
preg_match('/POINT\([^ ]+ ([^)]+)\)/', (string) $this->geometry, $m);
return isset($m[1]) ? (float) $m[1] : null;
}
public function getType(): ?string { return $this->type; }
public function getType(): string { return $this->type; }
public function setType(string $type): static { $this->type = $type; return $this; }
public function getRegion(): ?string { return $this->region; }
public function getRegion(): string { return $this->region; }
public function setRegion(string $region): static { $this->region = $region; return $this; }
/** @return Collection<int, ImpactScore> */