mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Reintroduce Webklex IMAP for ticket processing as PHP-IMAP is no longer being developed. This is optional for now and considered beta can be found in cron/ticket_email_parser.php
This commit is contained in:
27
plugins/vendor/illuminate/collections/functions.php
vendored
Normal file
27
plugins/vendor/illuminate/collections/functions.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Support;
|
||||
|
||||
if (! function_exists('Illuminate\Support\enum_value')) {
|
||||
/**
|
||||
* Return a scalar value for the given value that might be an enum.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @template TValue
|
||||
* @template TDefault
|
||||
*
|
||||
* @param TValue $value
|
||||
* @param TDefault|callable(TValue): TDefault $default
|
||||
* @return ($value is empty ? TDefault : mixed)
|
||||
*/
|
||||
function enum_value($value, $default = null)
|
||||
{
|
||||
return match (true) {
|
||||
$value instanceof \BackedEnum => $value->value,
|
||||
$value instanceof \UnitEnum => $value->name,
|
||||
|
||||
default => $value ?? value($default),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user