Skip to content

Commit 88c0d39

Browse files
committed
Update CLAUDE.md
1 parent 6fb48d8 commit 88c0d39

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

CLAUDE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,6 @@ When adding or editing PHPDoc comments in this codebase, follow these guidelines
399399
- Use imperative voice without "Returns the..." preambles when a brief note suffices. Prefer `/** Replaces unresolved TemplateTypes with their bounds. */` over a multi-line block.
400400
- Preserve `@api` and type tags on their own lines, with no redundant description alongside them.
401401

402-
### UnionTypeMethodReflection and IntersectionTypeMethodReflection parity
403-
404-
When methods are called on union types (`Foo|Bar`), the resolved method reflection is a `UnionTypeMethodReflection` that wraps the individual method reflections. Similarly, `IntersectionTypeMethodReflection` handles intersection types. These two classes must maintain feature parity for things like `getAsserts()`, `getSelfOutType()`, etc.
405-
406-
**Critical distinction for `getAsserts()`**: Intersection types use `Assertions::intersectWith()` which concatenates all assert tags — this is correct because both assertions must hold simultaneously, so `specifyTypesFromAsserts` intersects the sureTypes (e.g., `list & non-empty-array = non-empty-list`). Union types must use `Assertions::unionWith()` which groups assertions by the same parameter/condition and **unions their types** — this is correct because only one union member's assertion applies at runtime (e.g., `string | int` not `string & int = never`). Assertions that don't have a matching counterpart in the other union member are dropped since they cannot be guaranteed.
407-
408-
The `Assertions::intersectWith()` method merges assertion tag lists by concatenation. The `Assertions::unionWith()` method groups assertions by parameter identity (parameter name + if-condition + negated + equality) and unions the asserted types via `TypeCombinator::union()`.
409-
410402
## Important dependencies
411403

412404
- `nikic/php-parser` ^5.7.0 - PHP AST parsing

0 commit comments

Comments
 (0)