Skip to content

Commit

Permalink
Change return getFileds
Browse files Browse the repository at this point in the history
  • Loading branch information
irvis committed Nov 10, 2016
1 parent 74a34ec commit 615178c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/iMega/Formatter/Formatter.php
Expand Up @@ -47,7 +47,7 @@ public function getValue($name, $value)
public function getDataCollection(array $values)
{
$ret = [];
foreach ($this->getFileds() as $name => $v) {
foreach ($this->getFileds() as $name) {
if (array_key_exists($name, $values)) {
$ret[$name] = $this->getData($name, $values[$name]);
} else {
Expand All @@ -62,7 +62,7 @@ public function getDataCollection(array $values)
public function getValueCollection(array $values)
{
$ret = [];
foreach ($this->getFileds() as $name => $v) {
foreach ($this->getFileds() as $name) {
if (array_key_exists($name, $values)) {
$ret[$name] = $this->getValue($name, $values[$name]);
} else {
Expand All @@ -78,7 +78,7 @@ public function getValueCollection(array $values)
*/
public function getFileds()
{
return $this->fields;
return array_keys($this->fields);
}

/**
Expand Down

0 comments on commit 615178c

Please sign in to comment.