From 7fe9f79d0e2c11abd5d1faac3e06b8d103698787 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 13 Mar 2024 09:00:45 +0100 Subject: [PATCH] remove dead code --- src/Loader/functions.php | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/Loader/functions.php diff --git a/src/Loader/functions.php b/src/Loader/functions.php deleted file mode 100644 index 7e74f28..0000000 --- a/src/Loader/functions.php +++ /dev/null @@ -1,38 +0,0 @@ - $value) { - if (is_array($value)) { - $container[$key] = loadEnVars($value); - } else { - $data = getenv($value); - - if (false === $data) { - $data = $defaults[$value] ?? null; - } - - if (str_ends_with($key, '_at') && ctype_digit($data)) { - $date = new \DateTime(); - $date->setTimestamp((int) $data); - $data = $date; - } elseif (str_starts_with($key, 'is_')) { - if (in_array(strtolower($data), ['1', 'true', 'yes'])) { - $data = true; - } elseif (in_array(strtolower($data), ['0', 'false', 'no'])) { - $data = false; - } else { - $data = $defaults[$value] ?? false; - } - } - - $container[$key] = $data; - } - } - - return $container; -}