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

@@ -6,7 +6,6 @@ use App\Repository\SargassumObservationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Jsor\Doctrine\PostGIS\Types\PostGISType;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
@@ -28,25 +27,25 @@ class SargassumObservation
private mixed $bbox = null;
#[ORM\Column]
private ?\DateTimeImmutable $detectedAt = null;
private \DateTimeImmutable $detectedAt;
#[ORM\Column(length: 50)]
private ?string $source = null;
private string $source;
#[ORM\Column(length: 100)]
private ?string $tileId = null;
private string $tileId;
#[ORM\Column]
private ?float $cloudCoverage = null;
private float $cloudCoverage;
#[ORM\Column]
private ?float $confidence = null;
private float $confidence;
#[ORM\Column]
private ?float $afaiMean = null;
private float $afaiMean;
#[ORM\Column]
private ?float $afaiStd = null;
private float $afaiStd;
#[ORM\Column(nullable: true)]
private ?float $coverageArea = null;
@@ -55,15 +54,23 @@ class SargassumObservation
private ?string $processingVersion = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
private \DateTimeImmutable $createdAt;
/** @var Collection<int, SargassumForecast> */
#[ORM\OneToMany(targetEntity: SargassumForecast::class, mappedBy: 'sourceObservation')]
private Collection $forecasts;
public function __construct()
{
$this->forecasts = new ArrayCollection();
$this->createdAt = new \DateTimeImmutable();
$this->detectedAt = new \DateTimeImmutable();
$this->source = '';
$this->tileId = '';
$this->cloudCoverage = 0.0;
$this->confidence = 0.0;
$this->afaiMean = 0.0;
$this->afaiStd = 0.0;
$this->createdAt = new \DateTimeImmutable();
$this->forecasts = new ArrayCollection();
}
public function getId(): ?Uuid { return $this->id; }
@@ -71,25 +78,25 @@ class SargassumObservation
public function setGeometry(mixed $geometry): static { $this->geometry = $geometry; return $this; }
public function getBbox(): mixed { return $this->bbox; }
public function setBbox(mixed $bbox): static { $this->bbox = $bbox; return $this; }
public function getDetectedAt(): ?\DateTimeImmutable { return $this->detectedAt; }
public function getDetectedAt(): \DateTimeImmutable { return $this->detectedAt; }
public function setDetectedAt(\DateTimeImmutable $detectedAt): static { $this->detectedAt = $detectedAt; return $this; }
public function getSource(): ?string { return $this->source; }
public function getSource(): string { return $this->source; }
public function setSource(string $source): static { $this->source = $source; return $this; }
public function getTileId(): ?string { return $this->tileId; }
public function getTileId(): string { return $this->tileId; }
public function setTileId(string $tileId): static { $this->tileId = $tileId; return $this; }
public function getCloudCoverage(): ?float { return $this->cloudCoverage; }
public function getCloudCoverage(): float { return $this->cloudCoverage; }
public function setCloudCoverage(float $cloudCoverage): static { $this->cloudCoverage = $cloudCoverage; return $this; }
public function getConfidence(): ?float { return $this->confidence; }
public function getConfidence(): float { return $this->confidence; }
public function setConfidence(float $confidence): static { $this->confidence = $confidence; return $this; }
public function getAfaiMean(): ?float { return $this->afaiMean; }
public function getAfaiMean(): float { return $this->afaiMean; }
public function setAfaiMean(float $afaiMean): static { $this->afaiMean = $afaiMean; return $this; }
public function getAfaiStd(): ?float { return $this->afaiStd; }
public function getAfaiStd(): float { return $this->afaiStd; }
public function setAfaiStd(float $afaiStd): static { $this->afaiStd = $afaiStd; return $this; }
public function getCoverageArea(): ?float { return $this->coverageArea; }
public function setCoverageArea(?float $coverageArea): static { $this->coverageArea = $coverageArea; return $this; }
public function getProcessingVersion(): ?string { return $this->processingVersion; }
public function setProcessingVersion(?string $processingVersion): static { $this->processingVersion = $processingVersion; return $this; }
public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; }
public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; }
/** @return Collection<int, SargassumForecast> */
public function getForecasts(): Collection { return $this->forecasts; }