Browse Source

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

Jens 2 years ago
parent
commit
ef1ec46bad
1 changed files with 1 additions and 11 deletions
  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
  * @param string $envValue The environment variable to set
  * @return bool true on success or false on failure.
  * @return bool true on success or false on failure.
  */
  */
-function setEnvironmentValue(string $envKey, $envValue)
+function setenv(string $envKey, $envValue)
 {
 {
     $str = "{$envKey}={$envValue}";
     $str = "{$envKey}={$envValue}";
     return putenv($str);
     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
  * Encrypt the given value