File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ final class Dotenv
3434 private $ lineno ;
3535 private $ data ;
3636 private $ end ;
37- private $ state ;
3837 private $ values ;
3938
4039 /**
@@ -162,27 +161,27 @@ public function parse(string $data, string $path = '.env'): array
162161 $ this ->lineno = 1 ;
163162 $ this ->cursor = 0 ;
164163 $ this ->end = \strlen ($ this ->data );
165- $ this -> state = self ::STATE_VARNAME ;
164+ $ state = self ::STATE_VARNAME ;
166165 $ this ->values = [];
167166 $ name = '' ;
168167
169168 $ this ->skipEmptyLines ();
170169
171170 while ($ this ->cursor < $ this ->end ) {
172- switch ($ this -> state ) {
171+ switch ($ state ) {
173172 case self ::STATE_VARNAME :
174173 $ name = $ this ->lexVarname ();
175- $ this -> state = self ::STATE_VALUE ;
174+ $ state = self ::STATE_VALUE ;
176175 break ;
177176
178177 case self ::STATE_VALUE :
179178 $ this ->values [$ name ] = $ this ->lexValue ();
180- $ this -> state = self ::STATE_VARNAME ;
179+ $ state = self ::STATE_VARNAME ;
181180 break ;
182181 }
183182 }
184183
185- if (self ::STATE_VALUE === $ this -> state ) {
184+ if (self ::STATE_VALUE === $ state ) {
186185 $ this ->values [$ name ] = '' ;
187186 }
188187
You can’t perform that action at this time.
0 commit comments