@@ -64,9 +64,7 @@ |
||
64 | 64 | |
65 | 65 | // Convert key to a propertyname in $this |
66 | 66 | $propertyName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $itemKey)))); |
67 | - $propertyName = (property_exists($this, $propertyName)) ? $propertyName : |
|
68 | - (property_exists($this, lcfirst($propertyName)) ? lcfirst($propertyName) : |
|
69 | - preg_replace_callback('/([A-Z])/', function ($match) { |
|
67 | + $propertyName = (property_exists($this, $propertyName)) ? $propertyName : (property_exists($this, lcfirst($propertyName)) ? lcfirst($propertyName) : preg_replace_callback('/([A-Z])/', function ($match) { |
|
70 | 68 | return strtolower('_' . $match[1]); |
71 | 69 | }, lcfirst($propertyName)) |
72 | 70 | ); |