Skip to content

Wrong return types in Calendar #48

@garak

Description

@garak

Calendar class uses PeriodInterface as return type for getYear, getMonth, getWeek.
Such method should return, respectively, Year, Month, Week, that are implementing \Iterator.
With the current code, a call to foreach (new Calendar)->getMonth() is marked as invalid by phpstorm ("Can not iterate PeriodInterface").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions