Skip to content

Commit b541d63

Browse files
Merge branch '3.4' into 4.2
* 3.4: SCA: minor code tweaks [Intl] Update the ICU data to 64.1 [Bridge][Twig] DebugCommand - fix escaping and filter
2 parents 9a3bdfc + 7b33c7b commit b541d63

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Dotenv.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)