Skeleton is ready

This commit is contained in:
2026-01-05 16:33:20 +04:00
commit eeaf43ab5d
89 changed files with 2704 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Kernel\Object;
use BackedEnum;
class Enum
{
/**
* Extract values from an array of BackedEnum instances.
*
* @param array<int,BackedEnum> $enums
*
* @return array<int,int|string|float>
*/
public static function values(array $enums): array
{
return array_map(fn (BackedEnum $enum) => static::value($enum), $enums);
}
public static function value(BackedEnum $enum): int|string|float
{
return $enum->value;
}
}