From d97ef3507d2710508dcf3911c0daa22d12bd10d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Wed, 14 May 2025 17:52:42 +0200 Subject: [PATCH] [Pelias] Fix potential issue with nullable properties --- src/Provider/Pelias/CHANGELOG.md | 6 ++++++ src/Provider/Pelias/Model/PeliasAddress.php | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Provider/Pelias/CHANGELOG.md b/src/Provider/Pelias/CHANGELOG.md index ea20dcc00..c92952b0f 100644 --- a/src/Provider/Pelias/CHANGELOG.md +++ b/src/Provider/Pelias/CHANGELOG.md @@ -2,6 +2,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +## 1.6.1 + +### Fixed + +- Fix nullable properties + ## 1.6.0 ### Added diff --git a/src/Provider/Pelias/Model/PeliasAddress.php b/src/Provider/Pelias/Model/PeliasAddress.php index d20abc503..14beb71f5 100644 --- a/src/Provider/Pelias/Model/PeliasAddress.php +++ b/src/Provider/Pelias/Model/PeliasAddress.php @@ -40,7 +40,7 @@ final class PeliasAddress extends Address private $name; /** - * @var float + * @var float|null */ private $confidence; @@ -75,7 +75,7 @@ public function withSource(?string $source): self return $new; } - public function getLayer(): string + public function getLayer(): ?string { return $this->layer; } @@ -101,12 +101,12 @@ public function withName(?string $name): self return $new; } - public function getConfidence(): float + public function getConfidence(): ?float { return $this->confidence; } - public function withConfidence(float $confidence): self + public function withConfidence(?float $confidence): self { $new = clone $this; $new->confidence = $confidence;