Page MenuHomePhabricator

Fix errors found by PHPStan
ClosedPublic

Authored by vrana on Feb 16 2017, 12:17 PM.
Tags
None
Referenced Files
F19833260: D17364.id41755.diff
Wed, Mar 11, 1:17 AM
F19817408: D17364.id.diff
Thu, Mar 5, 12:53 PM
F19677297: D17364.id41755.diff
Feb 8 2026, 1:44 PM
F19569663: D17364.id41755.diff
Feb 1 2026, 12:13 AM
F19569662: D17364.id41755.diff
Feb 1 2026, 12:13 AM
F19535771: D17364.diff
Jan 21 2026, 8:16 AM
F19535738: D17364.diff
Jan 21 2026, 8:07 AM
F19303257: D17364.diff
Dec 23 2025, 10:05 PM
Subscribers

Details

Test Plan

Ran phpstan analyze --autoload-file=src/__phutil_library_init__.php -c phpstan.neon -l 1 src/ with phpstan.neon containing:

parameters:
    excludes_analyse:
        - */__tests__/*

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Are you on PHP7? I think the test failure might be PHP7 specific since we don't see it on the server-side tests (which run on PHP5).

The root issue behind that test failure is T10929.

src/cache/PhutilKeyValueCacheStack.php
70–73

I believe this has zero use cases, but probably fine to keep.

src/internationalization/PhutilNumber.php
8–11

This doesn't seem like a static analysis error?

This revision is now accepted and ready to land.Feb 16 2017, 12:22 PM

(I think you still have commit access, but let me know if you hit issues.)

Yes, I'm on PHP 7, PHPStan requires it.

src/internationalization/PhutilNumber.php
8–11

It's called like this from src/daemon/PhutilDaemonHandle.php and src/daemon/PhutilDaemon.php.

This revision was automatically updated to reflect the committed changes.