Commit 73045c83 by Alexander Makarov

Simplified ArrayTrait::fields() default implementation since it works fine w/…

Simplified ArrayTrait::fields() default implementation since it works fine w/ just field names as values
parent d471f0ba
...@@ -70,9 +70,7 @@ trait ArrayableTrait ...@@ -70,9 +70,7 @@ trait ArrayableTrait
*/ */
public function fields() public function fields()
{ {
$fields = array_keys(Yii::getObjectVars($this)); return array_keys(Yii::getObjectVars($this));
return array_combine($fields, $fields);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment