From a5438ab2d27dcaaef189b4362f765ea6fb4c0c28 Mon Sep 17 00:00:00 2001 From: cesarLima1 Date: Thu, 6 Jun 2024 15:06:56 -0400 Subject: [PATCH] [TM-617] make lint fix --- app/Helpers/GeometryHelper.php | 2 +- app/Http/Controllers/V2/Dashboard/CountryDataController.php | 1 + .../Controllers/V2/Dashboard/ProjectListExportController.php | 2 +- app/Models/V2/Projects/Project.php | 4 ++-- app/Models/V2/Projects/ProjectReport.php | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Helpers/GeometryHelper.php b/app/Helpers/GeometryHelper.php index eca5040eb..55c25234c 100644 --- a/app/Helpers/GeometryHelper.php +++ b/app/Helpers/GeometryHelper.php @@ -18,7 +18,7 @@ public function centroidOfProject($projectUuid) $polyIds = $project->sitePolygons()->pluck('poly_id')->toArray(); if (empty($polyIds)) { - return null; + return null; } $centroids = PolygonGeometry::selectRaw('ST_AsGeoJSON(ST_Centroid(geom)) AS centroid') diff --git a/app/Http/Controllers/V2/Dashboard/CountryDataController.php b/app/Http/Controllers/V2/Dashboard/CountryDataController.php index 533ff5ec5..48fcb98d2 100644 --- a/app/Http/Controllers/V2/Dashboard/CountryDataController.php +++ b/app/Http/Controllers/V2/Dashboard/CountryDataController.php @@ -80,6 +80,7 @@ public function getProjectData(string $uuid) if (! $project) { Log::error("Project not found for project with UUID: $uuid"); + return response()->json(['error' => 'Project not found'], 404); } $countSitePolygons = $project->total_site_polygons; diff --git a/app/Http/Controllers/V2/Dashboard/ProjectListExportController.php b/app/Http/Controllers/V2/Dashboard/ProjectListExportController.php index 16336cf90..1aa65a7af 100644 --- a/app/Http/Controllers/V2/Dashboard/ProjectListExportController.php +++ b/app/Http/Controllers/V2/Dashboard/ProjectListExportController.php @@ -57,6 +57,6 @@ public function exportCsv($request) 'Content-Type' => 'text/csv', 'Content-Disposition' => 'attachment; filename=activeProject.csv', ]); - + } } diff --git a/app/Models/V2/Projects/Project.php b/app/Models/V2/Projects/Project.php index c4ca52300..9350d5cd0 100644 --- a/app/Models/V2/Projects/Project.php +++ b/app/Models/V2/Projects/Project.php @@ -135,7 +135,7 @@ class Project extends Model implements MediaModel, AuditableContract, EntityMode 'proposed_num_nurseries', 'proj_boundary', 'states', - 'proj_impact_biodiv' + 'proj_impact_biodiv', ]; public $fileConfiguration = [ @@ -503,4 +503,4 @@ public function getTotalSitePolygonsAttribute() { return $this->sitePolygons()->count(); } -} \ No newline at end of file +} diff --git a/app/Models/V2/Projects/ProjectReport.php b/app/Models/V2/Projects/ProjectReport.php index 03b7118ab..6a740cc22 100644 --- a/app/Models/V2/Projects/ProjectReport.php +++ b/app/Models/V2/Projects/ProjectReport.php @@ -23,7 +23,6 @@ use App\Models\V2\User; use App\Models\V2\Workdays\Workday; use App\Models\V2\Workdays\WorkdayDemographic; -use App\StateMachines\ReportStatusStateMachine; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model;