File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ use DevCoder\DotEnv;
18
18
19
19
echo getenv('APP_ENV');
20
20
// dev
21
- echo getenv('DATABASE_DNS')
21
+ echo getenv('DATABASE_DNS');
22
22
// mysql:host=localhost;dbname=test;
23
23
```
24
24
Ideal for small project
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function __construct(string $path, array $options = [])
42
42
$ this ->processOptions ($ options );
43
43
}
44
44
45
- private function processOptions (array $ options )
45
+ private function processOptions (array $ options ) : void
46
46
{
47
47
$ this ->options = array_merge ([
48
48
static ::PROCESS_BOOLEANS => true
@@ -52,10 +52,8 @@ private function processOptions(array $options)
52
52
/**
53
53
* Processes the $path of the instances and parses the values into $_SERVER and $_ENV, also returns all the data that has been read.
54
54
* Skips empty and commented lines.
55
- *
56
- * @return array The values that have been loaded into ENV
57
55
*/
58
- public function load () :array
56
+ public function load () : void
59
57
{
60
58
if (!is_readable ($ this ->path )) {
61
59
throw new \RuntimeException (sprintf ('%s file is not readable ' , $ this ->path ));
@@ -81,11 +79,9 @@ public function load() :array
81
79
$ loaded [$ name ] = $ value ;
82
80
}
83
81
}
84
-
85
- return $ loaded ;
86
82
}
87
83
88
- private function processValue ($ value ) {
84
+ private function processValue (string $ value ) {
89
85
$ trimmedValue = trim ($ value );
90
86
91
87
if (!empty ($ this ->options [static ::PROCESS_BOOLEANS ])) {
You can’t perform that action at this time.
0 commit comments