We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4e710c commit e4bc4e8Copy full SHA for e4bc4e8
src/Responses/Moderations/CreateResponseResult.php
@@ -27,6 +27,10 @@ public static function from(array $attributes): self
27
$categories = [];
28
29
foreach (Category::cases() as $category) {
30
+ if (! isset($attributes['category_scores'][$category->value])) {
31
+ continue;
32
+ }
33
+
34
$categories[$category->value] = CreateResponseCategory::from([
35
'category' => $category->value,
36
'violated' => $attributes['categories'][$category->value],
0 commit comments