Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Make aggregateTotal return a float when a single type is requested #259

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

jessarcher
Copy link
Member

This PR improves the return value of the aggregateTotal method when only a single type is requested.

$total = Pulse::aggregateTotal('cache_hit', 'count');
// Before

Illuminate\Support\Collection {
  #items: array:1 [
    "cache_hit" => "12.00"
  ]
}

// After

12.0

The current return type is maintained when passing the first parameter as an array of types.

@taylorotwell taylorotwell merged commit e5dd810 into 1.x Dec 22, 2023
12 checks passed
@taylorotwell taylorotwell deleted the aggregate-total-improvements branch December 22, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants