File tree 2 files changed +14
-8
lines changed
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ public function checkSystemVar($variable)
150
150
151
151
public function getSystemVars ($ variable = null )
152
152
{
153
- return $ this ->systemparser ->getValues ($ variable );
153
+ $ systemparse = $ this ->systemparser ;
154
+ return $ systemparse ::getValues ($ variable );
154
155
}
155
156
156
157
public function run ()
Original file line number Diff line number Diff line change @@ -17,16 +17,16 @@ public function __construct()
17
17
18
18
public function parse ()
19
19
{
20
- if (function_exists ( ' getenv ' )) {
21
- return getenv () ;
20
+ if (! empty ( $ _ENV )) {
21
+ return $ _ENV ;
22
22
}
23
23
24
- if (is_array ( $ _ENV )) {
25
- return $ _ENV ;
24
+ if (function_exists ( ' getenv ' )) {
25
+ return getenv () ;
26
26
}
27
27
}
28
28
29
- public function getValues ($ variable = null )
29
+ public static function getValues ($ variable = null )
30
30
{
31
31
if (!is_null ($ variable )) {
32
32
if (isset (self ::$ sysvar [$ variable ])) {
@@ -36,15 +36,20 @@ public function getValues($variable = null)
36
36
}
37
37
}
38
38
39
- return self :: $ sysvar ;
39
+ return static :: getAllEnvVariables () ;
40
40
}
41
41
42
- public function checkValue ($ variable )
42
+ public static function checkValue ($ variable )
43
43
{
44
44
if (isset (self ::$ sysvar [$ variable ])) {
45
45
return true ;
46
46
}
47
47
48
48
return false ;
49
49
}
50
+
51
+ private static function getAllEnvVariables ()
52
+ {
53
+ return static ::$ sysvar ;
54
+ }
50
55
}
You can’t perform that action at this time.
0 commit comments