public static function hasValue($value, bool $strict = true): bool
    {
        $validValues = static::getValues();

        if ($strict) {
            return in_array($value, $validValues, true);
        }

        return in_array((string) $value, array_map('strval', $validValues), true);
    }
public static function hasValue($value, bool $strict = true): bool
    {
        $validValues = static::getValues();

        if ($strict) {
            return in_array($value, $validValues, true);
        }

        return in_array((string) $value, array_map('strval', $validValues), true);
    }
public static function hasValue ( $ value , bool $ strict = true ) : bool { $ validValues = static :: getValues ( ) ; if ( $ strict ) { return in_array ( $ value , $ validValues , true ) ; } return in_array ( ( string ) $ value , array_map ( 'strval' , $ validValues ) , true ) ; }
Check that the enum contains a specific value

@param int|string $value
@param bool $strict (Optional, defaults to True)
@return bool
Check that the enum contains a specific value