Skip to content

Commit

Permalink
[Review] Switch to array_keys
Browse files Browse the repository at this point in the history
Co-authored-by: Casey Peel <[email protected]>
  • Loading branch information
jchaffraix and cpeel authored Oct 9, 2024
1 parent 2bef2be commit 928e806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pinc/Activity.inc
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ function get_user_scores(string $username, array $criteria): array
$user_obj = $username == User::current_username() ? User::load_current() : new User($username);

$user_scores = [];
foreach ($criteria as $criterion_code => $_) {
foreach (array_keys($criteria) as $criterion_code) {
$user_scores[$criterion_code] = get_user_score($user_obj, $criterion_code);
}
return $user_scores;
Expand Down

0 comments on commit 928e806

Please sign in to comment.