chg: [periodic_notification] Sort Mitre Attack technique by occurence

pull/8625/head
Sami Mokaddem 2022-09-23 14:00:09 +02:00
parent 05e53afb06
commit 428e891204
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 1 deletions

View File

@ -207,7 +207,9 @@ $unique_tag_number = count($all_tag_amount);
arsort($attribute_types);
arsort($object_types);
arsort($all_tag_amount);
arsort($mitre_attack_techniques);
uasort($mitre_attack_techniques, function($tag1, $tag2) use ($all_tag_amount) {
return ($all_tag_amount[$tag1['Tag']['name']] < $all_tag_amount[$tag2['Tag']['name']]) ? 1 : -1;
});
array_splice($attribute_types, 10);
array_splice($object_types, 10);