Skip to content

Commit ca23fe2

Browse files
committed
docs: Add documentation for converters
1 parent a644112 commit ca23fe2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ $project = new Project(
4242
* `asDateTimeString($value)` Converts input value to a date string including the timezone, but passes `null`.
4343
* `asString($value)` Converts input value to a string, but passes `null`.
4444

45+
### Converters
46+
* `blankAsNull($value)` Converts input value to `null`, if it is a blank string `''`.
47+
* `falseAsNull($value)` Converts input value to `null`, if it is a boolean `false`.
48+
* `falsyAsNull($value)` Converts input value to `null`, if it is a falsy value `false`, `''`, `0`, ...
49+
* `zeroAsNull($value)` Converts input value to `null`, if it is a zero `0` or `0.0`.
50+
4551
### Assertions
4652
* `notNull($value)` Throws an exception if the value is `null` otherwise it passes the original value.
4753

0 commit comments

Comments
 (0)