diff --git a/src/Generator.php b/src/Generator.php index 38cdd00..8055cb2 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -3,6 +3,7 @@ use DirectoryIterator; use Exception; use App; +use Traversable; class Generator { @@ -281,10 +282,10 @@ private function adjustArray(array $arr) foreach ($arr as $key => $val) { $key = $this->removeEscapeCharacter($this->adjustString($key)); - if (is_string($val)) { - $res[$key] = $this->removeEscapeCharacter($this->adjustString($val)); - } else { + if (is_array($val)) { $res[$key] = $this->adjustArray($val); + } else { + $res[$key] = $this->removeEscapeCharacter($this->adjustString($val)); } } return $res;