You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 14ad31b
Browse filesBrowse the repository at this point in the historyBrowse files
Add setShouldNotImplyOppositeCase() on SpecifiedTypes to replace FAUX function call workarounds
- Add `shouldNotImplyOppositeCase` flag to `SpecifiedTypes` with `@api`-tagged
setter and getter methods, propagated through all immutable-copy operations
(setAlwaysOverwriteTypes, setRootExpr, setNewConditionalExpressionHolders,
removeExpr, intersectWith, unionWith, normalize)
- Check the flag in `ImpossibleCheckTypeHelper::findSpecifiedType()` to return
null early, preventing false "always true/false" reports when sureTypes are
side effects of a check rather than its determining condition
- Replace `FAUX_FUNCTION` rootExpr in `StrContainingTypeSpecifyingExtension`
with `setShouldNotImplyOppositeCase()`
- Replace `__PHPSTAN_FAUX_CONSTANT` rootExpr in
`ArrayKeyExistsFunctionTypeSpecifyingExtension` with
`setShouldNotImplyOppositeCase()`
- Use the flag for equality assertions in `TypeSpecifier::specifyTypesFromAsserts()`
instead of setting rootExpr to the call expression
- Remove unused imports (Arg, BooleanAnd, NotIdentical, String_, Name,
Identical, ConstFetch) from the two extension files
Closesphpstan/phpstan#14705
0 commit comments