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:
@@ -1,5 +1,5 @@
|
|||||||
parameters:
|
parameters:
|
||||||
level: 6
|
level: 8
|
||||||
paths:
|
paths:
|
||||||
- src
|
- src
|
||||||
symfony:
|
symfony:
|
||||||
|
|||||||
@@ -188,7 +188,11 @@ class IngestionService
|
|||||||
return null;
|
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'])) {
|
if (empty($data['features'])) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class PushNotificationService
|
|||||||
'body' => sprintf('Score %d/100 — %s. Vérifiez avant de partir.', $score, ucfirst($level)),
|
'body' => sprintf('Score %d/100 — %s. Vérifiez avant de partir.', $score, ucfirst($level)),
|
||||||
'url' => $this->appPublicUrl,
|
'url' => $this->appPublicUrl,
|
||||||
'spotId' => (string) $spot->getId(),
|
'spotId' => (string) $spot->getId(),
|
||||||
]);
|
]) ?: null;
|
||||||
|
|
||||||
$expired = [];
|
$expired = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user