Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix(LocalizedString): fix array conversion of locales for LocalizedSt…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
Jens Schulze committed Oct 12, 2015
1 parent feb3729 commit ea50790
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Model/Common/LocalizedString.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,21 @@ public function __toString()
*/
public function toArray()
{
return $this->values;
$values = $this->values;

$data = [];
foreach ($values as $key => $value) {
$data[str_replace('_', '-', $key)] = $value;
}
return $data;
}

/**
* @return array
*/
public function jsonSerialize()
{
$values = $this->toArray();

$data = [];
foreach ($values as $key => $value) {
$data[str_replace('_', '-', $key)] = $value;
}
return $data;
return $this->toArray();
}

/**
Expand Down

0 comments on commit ea50790

Please # to comment.