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

valkyrjaio / valkyrja-php / 30415744196
100%

Build:
DEFAULT BRANCH: 26.x
Ran 29 Jul 2026 02:04AM UTC
Jobs 1
Files 1138
Run time 2min
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

29 Jul 2026 02:02AM UTC coverage: 100.0%. Remained the same
30415744196

push

github

web-flow
[Dispatch] Fold the exhaustive match's last arm into default (#943)

# Description

`DispatchFactory::fromReflection()` used a `match (true)` whose five
`instanceof`
arms already covered every member of the parameter's union type. PHP
still
compiles an implicit `UnhandledMatchError` throw into an exhaustive
`match` with
no `default`, so two branches (and one path) in this method are
unreachable by
any input — no test can close them.

This is one of the two known unreachable-branch categories recorded in
the
architecture repo's `php/TODO.md`, and the prescribed remedy is to fold
the last
arm into `default`. `ReflectionFunction` is the only type left once the
four
preceding arms have been ruled out, so `default` is exactly equivalent
in
behavior — the `is_callable()` guard and its
`DispatchInvalidReflectionFunctionException` are untouched.

Verified per-shard (never merged — Xdebug builds a different branch map
for a
function depending on whether it ran, so merged shard data invents
branches):

```
composer phpunit-path-coverage-shard Dispatch
```

**`src/Valkyrja/Dispatch/Factory/DispatchFactory.php`: branches 14/16 →
14/14,
paths 6/7 → 6/6.**

## Types of changes

- [x] Improvement _(non-breaking change which improves code)_
- [ ] Bug fix _(non-breaking change which fixes an issue)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [ ] Deprecation _(breaking change which removes functionality)_
- [ ] Breaking change _(fix or feature that would cause existing
functionality to change)_
- [ ] Documentation improvement

## Changes

- **`src/Valkyrja/Dispatch/Factory/DispatchFactory.php`** — replaced the
final
`$reflection instanceof ReflectionFunction` arm of `fromReflection()`'s
`match (true)` with `default`, removing the unreachable
`UnhandledMatchError`
  branch, and noted in a comment why the arm is spelled that way.

1 of 0 new or added lines in 0 files covered. (NaN%)

12593 of 12593 relevant lines covered (100.0%)

23.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30415744196.1 29 Jul 2026 02:04AM UTC 1138
100.0
GitHub Action Run
Source Files on build 30415744196
  • Tree
  • List 1138
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30415744196
  • 677a4853 on github
  • Prev Build on 26.x (#30415702543)
  • Next Build on 26.x (#30415926697)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc