Commit ccba5af
Add getOrFail() shorthand to ParseResult for explicit strict key access
get(\$key, true) works but requires reading the boolean argument at
every call site to understand its intent. getOrFail() expresses the
strict contract directly in its name and returns a non-nullable string,
giving callers a cleaner type signature without requiring an assertion
or null-coalesce at the call site.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 46bb70c commit ccba5af
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
0 commit comments