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

valkyrjaio / ci-phpcsfixer-php / 27863556784
100%

Build:
DEFAULT BRANCH: 26.x
Ran 20 Jun 2026 06:58AM UTC
Jobs 1
Files 2
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

20 Jun 2026 06:57AM UTC coverage: 100.0%. Remained the same
27863556784

push

github

web-flow
[Tests] Add --path-coverage to PHPUnit test coverage (#81)

# Description

Adds `--path-coverage` to the local coverage script and teaches the
shared `@auto` ruleset to import global functions. In a namespaced file,
an unqualified builtin call (e.g. `strpos()`) compiles to a runtime
"does a namespace-local `strpos` exist?" lookup before falling back to
the global function. Xdebug models that fallback as a branch whose
namespace-local edge can never be taken — a permanently uncovered
phantom branch that also multiplies path counts. Importing the function
(`use function strpos;`) resolves the call at compile time and removes
the phantom branch, so consumers of the ruleset can reach 100% branch
coverage.

> **Note:** this ruleset change only takes effect for other repos once a
new `php-cs-fixer` package release is cut; until then the same two
fixers were applied manually (see the sindri/valkyrja PRs).

---

## 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/Fixer/Rules.php`** — added `native_function_invocation`
(`@all`, namespaced scope, strict) and `global_namespace_import`
(`import_functions: true`) so unqualified builtin calls become `use
function` imports, eliminating the namespace-fallback phantom branch;
documented the rationale inline
- **`.github/ci/phpunit/composer.json`** — added `--path-coverage` to
the `coverage` script

5 of 5 new or added lines in 1 file covered. (100.0%)

193 of 193 relevant lines covered (100.0%)

5.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27863556784.1 20 Jun 2026 06:58AM UTC 2
100.0
GitHub Action Run
Source Files on build 27863556784
  • Tree
  • List 2
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27863556784
  • 5a77fefd on github
  • Prev Build on 26.x (#27853553755)
  • Next Build on 26.x (#27895478077)
  • 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