From c754e88e68363dddb9e3650915ad069fde68259c Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Sat, 5 Oct 2024 13:22:26 -0300 Subject: [PATCH] Update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8cc6566..98b310d 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ PureEnum::fromMeta('color', 'purple'); // throws ValueError PureEnum::fromMeta('isOdd'); // CasesCollection[PureEnum::One, PureEnum::Three] PureEnum::fromMeta('shape', fn(string $shape) => in_array($shape, ['square', 'circle'])); // CasesCollection[PureEnum::One, PureEnum::Three] PureEnum::tryFromMeta('color', 'red'); // CasesCollection[PureEnum::One] -PureEnum::fromMeta('color', 'purple'); // null +PureEnum::tryFromMeta('color', 'purple'); // null PureEnum::tryFromMeta('isOdd'); // CasesCollection[PureEnum::One, PureEnum::Three] PureEnum::tryFromMeta('shape', fn(string $shape) => in_array($shape, ['square', 'circle'])); // CasesCollection[PureEnum::One, PureEnum::Three] @@ -189,6 +189,7 @@ BackedEnum::fromMeta('color', 'red'); // CasesCollection[BackedEnum::One] BackedEnum::fromMeta('isOdd'); // CasesCollection[PureEnum::One, PureEnum::Three] BackedEnum::fromMeta('shape', fn(string $shape) => in_array($shape, ['square', 'circle'])); // CasesCollection[BackedEnum::One, BackedEnum::Three] BackedEnum::tryFromMeta('color', 'red'); // CasesCollection[BackedEnum::One] +BackedEnum::tryFromMeta('color', 'purple'); // null BackedEnum::tryFromMeta('isOdd'); // CasesCollection[PureEnum::One, PureEnum::Three] BackedEnum::tryFromMeta('shape', fn(string $shape) => in_array($shape, ['square', 'circle'])); // CasesCollection[BackedEnum::One, BackedEnum::Three] ```