From a785c9d1a31f88083b6a989f5c1df65b602a4429 Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 17 Feb 2025 16:51:03 +0100 Subject: [PATCH] php-cs-fixer --- src/Controller/TaskController.php | 2 +- src/Entity/Task.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/TaskController.php b/src/Controller/TaskController.php index 9165e06..4e4722c 100644 --- a/src/Controller/TaskController.php +++ b/src/Controller/TaskController.php @@ -110,7 +110,7 @@ class TaskController extends AbstractController $josmCommands = [ // Charge l’imagerie (fond OSM par défaut) 'imagery' => [ - (($project->hasImagery() and substr($project->getImagery(), 0, 4) === 'http') ? 'url' : 'id') => ($project->hasImagery() ? $project->getImagery() : 'osmfr'), + (($project->hasImagery() and 'http' === substr($project->getImagery(), 0, 4)) ? 'url' : 'id') => ($project->hasImagery() ? $project->getImagery() : 'osmfr'), ], ]; diff --git a/src/Entity/Task.php b/src/Entity/Task.php index aa8e2ca..49c9b99 100644 --- a/src/Entity/Task.php +++ b/src/Entity/Task.php @@ -166,11 +166,11 @@ class Task public function hasGeojson(): bool { - return ( + return isset($this->geojson) and !empty($this->geojson) - and ($this->geojson !== '{}') - ); + and ('{}' !== $this->geojson) + ; } public function getGeojson(): ?string