Commit 89217e5 1 parent 4b7da60 commit 89217e5 Copy full SHA for 89217e5
File tree 4 files changed +16
-0
lines changed
4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ public static function validate(array $data): void
40
40
if (!array_key_exists ($ key , $ data )) {
41
41
throw new \Exception ("Missing key ' $ key' in Annotation " );
42
42
}
43
+
44
+ if (is_null ($ data [$ key ])) {
45
+ throw new \Exception ("Missing value for ' $ key' in Category " );
46
+ }
43
47
}
44
48
}
45
49
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ public static function validate(array $data): void
26
26
if (!array_key_exists ($ key , $ data )) {
27
27
throw new \Exception ("Missing key ' $ key' in Category " );
28
28
}
29
+
30
+ if (is_null ($ data [$ key ])) {
31
+ throw new \Exception ("Missing value for ' $ key' in Category " );
32
+ }
29
33
}
30
34
}
31
35
}
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ public static function validate(array $data): void
70
70
if (!array_key_exists ($ key , $ data )) {
71
71
throw new \Exception ("Missing key ' $ key' in Coco " );
72
72
}
73
+
74
+ if (is_null ($ data [$ key ])) {
75
+ throw new \Exception ("Missing value for ' $ key' in Coco " );
76
+ }
73
77
}
74
78
}
75
79
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ public static function validate(array $data): void
39
39
if (!array_key_exists ($ key , $ data )) {
40
40
throw new \Exception ("Missing key ' $ key' in Image " );
41
41
}
42
+
43
+ if (is_null ($ data [$ key ])) {
44
+ throw new \Exception ("Missing value for ' $ key' in Image " );
45
+ }
42
46
}
43
47
}
44
48
}
You can’t perform that action at this time.
0 commit comments