Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: illuminate/collections
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v12.2.0
Choose a base ref
...
head repository: illuminate/collections
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v12.3.0
Choose a head ref
  • 4 commits
  • 1 file changed
  • 3 contributors

Commits on Mar 6, 2025

  1. Verified

    This commit was signed with the committer’s verified signature.
    mpalmi Mike Palmiotto
    Copy the full SHA
    f2f537d View commit details

Commits on Mar 12, 2025

  1. fix conflicts

    taylorotwell committed Mar 12, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    mpalmi Mike Palmiotto
    Copy the full SHA
    3a13fe2 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    mpalmi Mike Palmiotto
    Copy the full SHA
    223a302 View commit details

Commits on Mar 16, 2025

  1. [12.x] Types: EnumeratesValues Sum (#55044)

    * add failing type test
    
    * add failing type test for lazy collection
    
    * add conditional return type
    
    * make tests more specific
    liamduckett authored Mar 16, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0094b16 View commit details
Showing with 5 additions and 3 deletions.
  1. +5 −3 Traits/EnumeratesValues.php
8 changes: 5 additions & 3 deletions Traits/EnumeratesValues.php
Original file line number Diff line number Diff line change
@@ -342,7 +342,7 @@ public function value($key, $default = null)
*
* @template TEnsureOfType
*
* @param class-string<TEnsureOfType>|array<array-key, class-string<TEnsureOfType>>|scalar|'array'|'null' $type
* @param class-string<TEnsureOfType>|array<array-key, class-string<TEnsureOfType>>|'string'|'int'|'float'|'bool'|'array'|'null' $type
* @return static<TKey, TEnsureOfType>
*
* @throws \UnexpectedValueException
@@ -535,8 +535,10 @@ public function percentage(callable $callback, int $precision = 2)
/**
* Get the sum of the given values.
*
* @param (callable(TValue): mixed)|string|null $callback
* @return mixed
* @template TReturnType
*
* @param (callable(TValue): TReturnType)|string|null $callback
* @return ($callback is callable ? TReturnType : mixed)
*/
public function sum($callback = null)
{