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 @@ -33,7 +33,6 @@ final class Dotenv
3333 private $ lineno ;
3434 private $ data ;
3535 private $ end ;
36- private $ state ;
3736 private $ values ;
3837
3938 /**
@@ -111,27 +110,27 @@ public function parse($data, $path = '.env')
111110 $ this ->lineno = 1 ;
112111 $ this ->cursor = 0 ;
113112 $ this ->end = \strlen ($ this ->data );
114- $ this -> state = self ::STATE_VARNAME ;
113+ $ state = self ::STATE_VARNAME ;
115114 $ this ->values = [];
116115 $ name = '' ;
117116
118117 $ this ->skipEmptyLines ();
119118
120119 while ($ this ->cursor < $ this ->end ) {
121- switch ($ this -> state ) {
120+ switch ($ state ) {
122121 case self ::STATE_VARNAME :
123122 $ name = $ this ->lexVarname ();
124- $ this -> state = self ::STATE_VALUE ;
123+ $ state = self ::STATE_VALUE ;
125124 break ;
126125
127126 case self ::STATE_VALUE :
128127 $ this ->values [$ name ] = $ this ->lexValue ();
129- $ this -> state = self ::STATE_VARNAME ;
128+ $ state = self ::STATE_VARNAME ;
130129 break ;
131130 }
132131 }
133132
134- if (self ::STATE_VALUE === $ this -> state ) {
133+ if (self ::STATE_VALUE === $ state ) {
135134 $ this ->values [$ name ] = '' ;
136135 }
137136
You can’t perform that action at this time.
0 commit comments