From 5b09aa1af18f011c284c4f376cda201da61053b8 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Wed, 8 Jan 2025 16:04:28 +0100 Subject: [PATCH] Fix exception messages --- src/Coco.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Coco.php b/src/Coco.php index 11c6236..30d508d 100644 --- a/src/Coco.php +++ b/src/Coco.php @@ -85,7 +85,7 @@ public function validateCategoriesInData(): void foreach ($this->annotations as $annotation) { if (!in_array($annotation->category_id, $categoryIds)) { - throw new \Exception("Invalid category ID '{$annotation['category_id']}' in annotation '{$annotation['id']}'"); + throw new \Exception("Invalid category ID '{$annotation->category_id}' in annotation '{$annotation->id}'"); } } } @@ -98,7 +98,7 @@ public function validateImagesInData(): void foreach ($this->annotations as $annotation) { if (!in_array($annotation->image_id, $imageIds)) { - throw new \Exception("Invalid image ID '{$annotation['image_id']}' in annotation '{$annotation['id']}'"); + throw new \Exception("Invalid image ID '{$annotation->image_id}' in annotation '{$annotation->id}'"); } } }