fix: monter PHPStan à niveau 8 — corriger 2 bugs file_get_contents/json_encode
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -188,7 +188,11 @@ class IngestionService
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = json_decode(file_get_contents($geojsonPath), true);
|
||||
$contents = file_get_contents($geojsonPath);
|
||||
if ($contents === false) {
|
||||
return null;
|
||||
}
|
||||
$data = json_decode($contents, true);
|
||||
|
||||
if (empty($data['features'])) {
|
||||
return null;
|
||||
|
||||
@@ -45,7 +45,7 @@ class PushNotificationService
|
||||
'body' => sprintf('Score %d/100 — %s. Vérifiez avant de partir.', $score, ucfirst($level)),
|
||||
'url' => $this->appPublicUrl,
|
||||
'spotId' => (string) $spot->getId(),
|
||||
]);
|
||||
]) ?: null;
|
||||
|
||||
$expired = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user