Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Only handle arrays as arrays in translation files (#107)
Browse files Browse the repository at this point in the history
* Fix array handling

* Only handle arrays
  • Loading branch information
netpok authored Feb 9, 2020
1 parent 79a7025 commit 8f47124
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use DirectoryIterator;
use Exception;
use App;
use Traversable;

class Generator
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8f47124

Please sign in to comment.