[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Mon Jan 4 17:33:58 UTC 2021
#52217: Fix code issues identified by PHPStan
------------------------------+-----------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: coding-standards |
------------------------------+-----------------------------
In #51423 several issues were identified with function argument types that
were detected by PHPStan.
There are other issues that PHPStan detects too such as potentially
undefined variables, functions called with incorrect number of parameters,
access to undefined properties, and more as you increase the level of
checking performed.
We can scan core using the level 1 checks and catch quite a few low
hanging fruit, and then go from there.
Follow-up task: Consider whether it's beneficial to add PHPStan (or Psalm
or Phan) analysis to the build tooling and CI.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list