AspireCloud/app/Utils/Config.php
2025-10-25 13:15:51 -06:00

22 lines
478 B
PHP

<?php
declare(strict_types=1);
namespace App\Utils;
class Config
{
/** @return string[] */
public static function stringList(string $input, string $delimiter = ','): array
{
return collect(explode($delimiter, $input))
->map(fn(string $item) => trim($item))
->filter(fn(string $item) => $item !== '')
->values()
->toArray();
}
private function __construct()
{
// not instantiable
}
}