* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ namespace PrestaShop\Module\PsAccounts\Type; use ReflectionClass; abstract class Enum { /** * @return array */ public static function cases() { return (new ReflectionClass(static::class))->getConstants(); } /** * @return array */ public static function values() { return array_values(static::cases()); } /** * @param mixed $value * @param bool $strict * * @return bool */ public static function includes($value, $strict = false) { return in_array($value, array_values(static::cases()), $strict); } }