mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix tests
This commit is contained in:
@@ -36,21 +36,23 @@ declare(strict_types=1);
|
||||
|
||||
bcscale(12);
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param null $default
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
function envNonEmpty(string $key, $default = null)
|
||||
{
|
||||
$result = env($key, $default);
|
||||
if (is_string($result) && $result === '') {
|
||||
$result = $default;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
if (!function_exists('envNonEmpty')) {
|
||||
/**
|
||||
* @param string $key
|
||||
* @param null $default
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
function envNonEmpty(string $key, $default = null)
|
||||
{
|
||||
$result = env($key, $default);
|
||||
if (is_string($result) && $result === '') {
|
||||
$result = $default;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
realpath(__DIR__ . '/../')
|
||||
|
Reference in New Issue
Block a user