Valinor/tests/Fixture/Enum/BackedIntegerEnum.php
Romain Canon 69ebd19ee8 feat: add support for wildcard in enumeration type
This notation can be used when several cases in an enum share a common
prefix.

```php
enum SomeEnum: string
{
    case FOO = 'foo';
    case BAR = 'bar';
    case BAZ = 'baz';
}

$mapper = (new MapperBuilder())->mapper();

$mapper->map('SomeEnum::BA*', 'foo'); // error
$mapper->map('SomeEnum::BA*', 'bar'); // ok
$mapper->map('SomeEnum::BA*', 'baz'); // ok
```
2022-10-04 20:44:55 +02:00

13 lines
169 B
PHP

<?php
declare(strict_types=1);
namespace CuyZ\Valinor\Tests\Fixture\Enum;
enum BackedIntegerEnum: int
{
case FOO = 42;
case BAR = 404;
case BAZ = 1337;
}