diff --git a/src/iMega/Formatter/Formatter.php b/src/iMega/Formatter/Formatter.php index 17ea413..e2c4542 100644 --- a/src/iMega/Formatter/Formatter.php +++ b/src/iMega/Formatter/Formatter.php @@ -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 { @@ -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 { @@ -78,7 +78,7 @@ public function getValueCollection(array $values) */ public function getFileds() { - return $this->fields; + return array_keys($this->fields); } /**