Commit 910e8bc
Mark
- Add `class_exists`, `interface_exists`, `trait_exists`, and `enum_exists` to
`resources/functionMetadata.php` with `hasSideEffects => false`, matching the
existing `function_exists` entry
- When `rememberPossiblyImpureFunctionValues` was false, the type narrowing from
these functions was blocked in `TypeSpecifier::createForExpr()` because they
lacked metadata and defaulted to `hasSideEffects = maybe`
- Update `AutoloadSourceLocatorTest` to use the return value of `class_exists()`
to avoid the now-triggered `function.resultUnused` ruleclass_exists, interface_exists, trait_exists, and enum_exists as having no side effects in function metadata1 parent 0beee48 commit 910e8bc
4 files changed
Lines changed: 40 additions & 1 deletion
File tree
- resources
- tests/PHPStan
- Analyser
- data
- Reflection/BetterReflection/SourceLocator
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| 815 | + | |
815 | 816 | | |
816 | 817 | | |
817 | 818 | | |
| |||
910 | 911 | | |
911 | 912 | | |
912 | 913 | | |
| 914 | + | |
913 | 915 | | |
914 | 916 | | |
915 | 917 | | |
| |||
1190 | 1192 | | |
1191 | 1193 | | |
1192 | 1194 | | |
| 1195 | + | |
1193 | 1196 | | |
1194 | 1197 | | |
1195 | 1198 | | |
| |||
1723 | 1726 | | |
1724 | 1727 | | |
1725 | 1728 | | |
| 1729 | + | |
1726 | 1730 | | |
1727 | 1731 | | |
1728 | 1732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments