Commit 27c65a9
committed
Code Quality: Add
This ensures PHPStan is aware that passing a `WP_Error` instance to `is_wp_error()` will cause the function to return `true`. This reduces the total number of PHPStan errors at rule level 7 from 14,271 to 13,233 (-1,038 or -7.27%).
Developed in WordPress/wordpress-develop#11095
See #64238.
Built from https://develop.svn.wordpress.org/trunk@61774
git-svn-id: http://core.svn.wordpress.org/trunk@61080 1a063a9b-81f0-0310-95a4-ce76da25c4cd@phpstan-assert-if-true to is_wp_error().1 parent 4bbdf78 commit 27c65a9
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1798 | 1798 | | |
1799 | 1799 | | |
1800 | 1800 | | |
| 1801 | + | |
| 1802 | + | |
1801 | 1803 | | |
1802 | 1804 | | |
1803 | 1805 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments