## Tasks - Move `WorkReportCommand::filterByMinDuration()` logic into `TimeEntryCollection` as a public, immutable method returning a new `TimeEntryCollection`. - Change `TimeEntryCollection::grouped()` to return `TimeEntryCollection` instead of `TimeEntry[]`, keeping it immutable (no mutation of `$this->items`). - Update `WorkReportCommand` and any other callers to consume the new APIs. - Adjust/extend tests to cover the new return types and behavior. ## Files - `src/TimeEntryCollection.php` - `src/Cli/WorkReportCommand.php` - `tests/` — relevant tests for both classes
Tasks
WorkReportCommand::filterByMinDuration()logic intoTimeEntryCollectionas a public, immutable method returning a newTimeEntryCollection.TimeEntryCollection::grouped()to returnTimeEntryCollectioninstead ofTimeEntry[], keeping it immutable (no mutation of$this->items).WorkReportCommandand any other callers to consume the new APIs.Files
src/TimeEntryCollection.phpsrc/Cli/WorkReportCommand.phptests/— relevant tests for both classes