2 Commits
2.2.4 ... 2.2.5

Author SHA1 Message Date
4ccc38ffac Merge branch 'develop' into release 2022-09-12 17:39:15 -03:00
ef1603bc4b FIX: Check for missing getters and setters 2022-09-12 17:39:00 -03:00

View File

@ -151,6 +151,9 @@ abstract class Repository implements RepositoryInterface
{
foreach ($this->getRequired() as $column) {
$m = $this->getMethod($column, false);
if (!method_exists($model, $m)) {
continue;
}
$model->{$m}($data[$column]);
}
foreach ($this->getOptional() as $column) {
@ -158,6 +161,9 @@ abstract class Repository implements RepositoryInterface
continue;
}
$m = $this->getMethod($column, false);
if (!method_exists($model, $m)) {
continue;
}
$model->{$m}($data[$column]);
}
return $model;
@ -169,6 +175,9 @@ abstract class Repository implements RepositoryInterface
continue;
}
$m = $this->getMethod($column);
if (!method_exists($model, $m)) {
continue;
}
$val = $model->{$m}();
$data[$column] = $val;
}
@ -217,6 +226,9 @@ abstract class Repository implements RepositoryInterface
foreach ($this->getColumns() as $col) {
if (isset($data[$col])) {
$m = $this->getMethod($col, false);
if (!method_exists($model, $m)) {
continue;
}
$model->{$m}($data[$col]);
}
}