• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tito10047 / php-calendar / 28422459339
84%
main: 84%

Build:
Build:
LAST BUILD BRANCH: v2.0.0-beta.1
DEFAULT BRANCH: main
Ran 30 Jun 2026 05:27AM UTC
Jobs 1
Files 19
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 05:25AM UTC coverage: 83.161%. First build
28422459339

push

github

tito10047
refactor: split disable model into three layers across Calendar and CalendarConfig

Previously disableDaysByName() computed concrete dates from the current grid
and stored them alongside date-specific disabledDays. This caused two problems:
- The weekday rule was lost after nextPeriod() navigation (only the concrete
  dates survived, and they belonged to the old period).
- enableDays() could only un-do a date-specific disable, not a name-pattern one.

New model — three ordered layers evaluated in Calendar::resolveEnabled():
  1. enabledDays  (DateTimeImmutable[]) — highest priority: explicit exception,
     always enabled regardless of patterns below
  2. disabledDays (DateTimeImmutable[]) — date-specific: public holidays etc.
  3. disabledDayNames (DayName[])        — structural: weekday pattern (weekends)

disableDaysByName() now stores DayName values instead of iterating the grid.
enableDays() removes from disabledDays AND adds to enabledDays so it works
as an override for both date-specific and name-pattern disables.
disableDays() removes the date from enabledDays (last write wins).

nextPeriod() / prevPeriod() preserve disabledDayNames (structural, period-
independent) and reset disabledDays + enabledDays (period-specific).
withDate() preserves all three layers.

CalendarConfig gains disabledDayNames and enabledDays fields; all three
contribute to cacheKey() in a sorted, order-independent manner.
Calendar::fromConfig() maps all three fields.

CalendarInterface is updated to expose getDisabledDayNames() and
getEnabledDays() alongside the existing getDisabledDays().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

116 of 118 new or added lines in 2 files covered. (98.31%)

642 of 772 relevant lines covered (83.16%)

7.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
98.34
src/Calendar.php
Jobs
ID Job ID Ran Files Coverage
1 28422459339.1 30 Jun 2026 05:27AM UTC 19
83.16
GitHub Action Run
Source Files on build 28422459339
  • Tree
  • List 19
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 581a0971 on github
  • Next Build on feature/v2-roadmap (#28423919883)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc