Skip to content

Commit 7b24f2e

Browse files
committed
static analysis fixes
1 parent 7ce9b23 commit 7b24f2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Formatter/Specialised/JoltHttpOGMTranslator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private function translatePoint(string $value): PointInterface
171171
return new Cartesian3DPoint(
172172
(float) $coordinates[0],
173173
(float) $coordinates[1],
174-
(float) $coordinates[2],
174+
(float) ($coordinates[2] ?? 0.0),
175175
);
176176
}
177177
if ($srid === WGS84Point::SRID) {
@@ -184,7 +184,7 @@ private function translatePoint(string $value): PointInterface
184184
return new WGS843DPoint(
185185
(float) $coordinates[0],
186186
(float) $coordinates[1],
187-
(float) $coordinates[2],
187+
(float) ($coordinates[2] ?? 0.0),
188188
);
189189
}
190190
throw new UnexpectedValueException('A point with srid '.$srid.' has been returned, which has not been implemented.');
@@ -320,6 +320,7 @@ private function translateBinary(): Closure
320320
* @return Date|LocalDateTime|LocalTime|DateTime|Duration|Time
321321
*
322322
* @psalm-suppress ImpureMethodCall
323+
* @psalm-suppress ImpureFunctionCall
323324
* @psalm-suppress PossiblyFalseReference
324325
*/
325326
private function translateDateTime(string $datetime)

0 commit comments

Comments
 (0)