Skip to content

Commit

Permalink
fixup! chore: Cleanup methods to parse/transform values
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr committed Jul 30, 2024
1 parent ca3e986 commit 11f7d96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Db/RowCellSuper.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public static function fromRowData(array $row): RowCellSuper {
$instance = new static();

foreach ($row as $key => $value) {
$prop = ucfirst($instance->columnToProperty($key));
$setter = 'set' . $prop;
if (method_exists($instance, $setter)) {
$property = $instance->columnToProperty($key);
$setter = 'set' . ucfirst($property);
;
if (property_exists($instance, $property)) {
$instance->$setter($value);
}
}
Expand Down

0 comments on commit 11f7d96

Please sign in to comment.