Skip to content

Commit 6ffeba3

Browse files
committed
document missing-value behavior on every method, add contract test
Every public method's docblock now ends with a one-line "Missing values (null or ...)" contract, so what happens to null and "" is always the last thing you read before the tags: - string manipulation and raw accessors: pass through / returned unchanged - math and date formatting: return null (non-numeric input does too) - conditional methods: skip the operation or apply the fallback - encoders: return "" (jsonEncode returns JSON literals instead, never empty output) - type conversions: cast to 0, 0.0, false, or "" Also in this pass: - class docblock summarizes the four rules as bullets, one per method group - examples moved above the contract line wherever they trailed it - converted the last two @example tags (numberFormat, percent) to indented code examples, one docblock format everywhere - add MissingValueContractTest: one table asserting every transformation against null and "" input, so the contract can't drift silently
1 parent ae33841 commit 6ffeba3

2 files changed

Lines changed: 199 additions & 77 deletions

File tree

0 commit comments

Comments
 (0)