Commit faf0f06
docs: improve assert() message to clarify its purpose
Added descriptive message to assert(class_exists($className)) to explain:
- This is an internal logic error, not invalid user input
- $className comes from ReflectionParameter type info, so it should always exist
- assert() is the appropriate tool for checking "impossible" conditions
- Can be disabled in production for performance, unlike explicit exceptions
This addresses code review concerns about assert() usage while maintaining
the correct semantic distinction between internal logic errors (assert)
and user input validation (exceptions).
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent f859c39 commit faf0f06
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
0 commit comments