6
6
use Dotenv \Exception \InvalidPathException ;
7
7
8
8
/**
9
- * Loader .
9
+ * This is the loaded class .
10
10
*
11
- * Loads Variables by reading a file from disk and:
12
- * - stripping comments beginning with a `#`
13
- * - parsing lines that look shell variable setters, e.g `export key = value`, `key="value"`
11
+ * It's responsible for loading variables by reading a file from disk and:
12
+ * - stripping comments beginning with a `#`,
13
+ * - parsing lines that look shell variable setters, e.g `export key = value`, `key="value"`.
14
14
*/
15
15
class Loader
16
16
{
@@ -88,13 +88,13 @@ protected function ensureFileIsReadable()
88
88
* Normalise the given environment variable.
89
89
*
90
90
* Takes value as passed in by developer and:
91
- * - ensures we're dealing with a separate name and value, breaking apart the name string if needed
92
- * - cleaning the value of quotes
93
- * - cleaning the name of quotes
94
- * - resolving nested variables
91
+ * - ensures we're dealing with a separate name and value, breaking apart the name string if needed,
92
+ * - cleaning the value of quotes,
93
+ * - cleaning the name of quotes,
94
+ * - resolving nested variables.
95
95
*
96
- * @param $name
97
- * @param $value
96
+ * @param string $name
97
+ * @param string $value
98
98
*
99
99
* @return array
100
100
*/
@@ -245,7 +245,7 @@ protected function sanitiseVariableValue($name, $value)
245
245
* Look for {$varname} patterns in the variable value and replace with an existing
246
246
* environment variable.
247
247
*
248
- * @param $value
248
+ * @param string $value
249
249
*
250
250
* @return mixed
251
251
*/
@@ -321,13 +321,13 @@ public function getEnvironmentVariable($name)
321
321
* Set an environment variable.
322
322
*
323
323
* This is done using:
324
- * - putenv
325
- * - $_ENV
324
+ * - putenv,
325
+ * - $_ENV,
326
326
* - $_SERVER.
327
327
*
328
328
* The environment variable value is stripped of single and double quotes.
329
329
*
330
- * @param $name
330
+ * @param string $name
331
331
* @param string|null $value
332
332
*
333
333
* @return void
@@ -354,8 +354,8 @@ public function setEnvironmentVariable($name, $value = null)
354
354
* method for 3rd party code.
355
355
*
356
356
* This is done using:
357
- * - putenv
358
- * - unset($_ENV, $_SERVER)
357
+ * - putenv,
358
+ * - unset($_ENV, $_SERVER).
359
359
*
360
360
* @param string $name
361
361
*
0 commit comments