瀏覽代碼

(Refactor) Remove getEnvironmentValue, rename setEnvironmentValue to setenv to match php defaults

Jens 2 年之前
父節點
當前提交
ef1ec46bad
共有 1 個文件被更改,包括 1 次插入11 次删除
  1. 1 11
      public/install/functions.php

+ 1 - 11
public/install/functions.php

@@ -129,22 +129,12 @@ function checkExtensions(): array
  * @param string $envValue The environment variable to set
  * @return bool true on success or false on failure.
  */
-function setEnvironmentValue(string $envKey, $envValue)
+function setenv(string $envKey, $envValue)
 {
     $str = "{$envKey}={$envValue}";
     return putenv($str);
 }
 
-/**
- * Gets the variable from the env file
- * @param string $envKey The environment variable to look for
- * @return array|false|string Returns the value if found, otherwise returns false.
- */
-function getEnvironmentValue(string $envKey): array|false|string
-{
-    return getenv($envKey);
-}
-
 
 /**
  * Encrypt the given value