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

PHPCSStandards / PHP_CodeSniffer / 8532137691 / 3
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: catch-per-3.0
DEFAULT BRANCH: master
Ran 03 Apr 2024 02:06AM UTC
Files 259
Run time 12s
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

03 Apr 2024 02:02AM UTC coverage: 68.53% (+0.03%) from 68.502%
8532137691.3

push

github

jrfnl
File::getMethodProperties(): skip over closure use statements

This PR improves performance of the `File::getMethodProperties()` method and prevents incorrect return type information for closures `use` clauses containing invalid variable imports in the `use` clause (defensive coding).

Closure `use` statements can only import plain variables, not properties or other more complex variables.

As things were, when such "illegal" variables were imported in a closure `use`, the information for the return type could get mangled.
While this would be a parse error, for the purposes of static analysis, the `File::getMethodProperties()` method should still handle this correctly.

This commit updates the `File::getMethodProperties()` method to always skip over the complete `use` clause, which prevents the issue and improves performance as the same time (less token walking).

Includes unit tests.

16554 of 24156 relevant lines covered (68.53%)

18.54 hits per line

Source Files on job php-7.2-custom-ini-false - 8532137691.3
  • Tree
  • List 259
  • Changed 7
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8532137691
  • ea478181 on github
  • Prev Job for on 4.0 (#8499857049.1)
  • Next Job for on 4.0 (#8582975589.3)
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