Skip to content

Commit

Permalink
UHF-10631: Replace random function to pass Sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrsky committed Sep 24, 2024
1 parent 0c338ed commit 980d723
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function schema(FieldStorageDefinitionInterface $field_definition)
public static function generateSampleValue(FieldDefinitionInterface $field_definition): array {
$values = parent::generateSampleValue($field_definition);

$values['score'] = mt_rand() / mt_getrandmax();
$values['score'] = random_int(0, 100) / 100;

return $values;
}
Expand Down

0 comments on commit 980d723

Please sign in to comment.