diff options
Diffstat (limited to 'core/namespace/ORM')
-rw-r--r-- | core/namespace/ORM/Entity.php | 5 | ||||
-rw-r--r-- | core/namespace/ORM/EntityInterface.php | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/core/namespace/ORM/Entity.php b/core/namespace/ORM/Entity.php index a19b1f4..592aeb5 100644 --- a/core/namespace/ORM/Entity.php +++ b/core/namespace/ORM/Entity.php @@ -19,13 +19,12 @@ abstract class Entity implements EntityInterface { #=============================================================================== # Set attribute #=============================================================================== - public function set(string $attribute, $value) { + public function set(string $attribute, $value): void { if($this->{$attribute} !== $value) { + $this->{$attribute} = $value; !in_array($attribute, $this->_modified) && array_push($this->_modified, $attribute); } - - return $this->{$attribute} = $value; } #=============================================================================== diff --git a/core/namespace/ORM/EntityInterface.php b/core/namespace/ORM/EntityInterface.php index 68c9588..db503e7 100644 --- a/core/namespace/ORM/EntityInterface.php +++ b/core/namespace/ORM/EntityInterface.php @@ -3,7 +3,7 @@ namespace ORM; interface EntityInterface { public function get(string $attribute); - public function set(string $attribute, $value); + public function set(string $attribute, $value): void; public function getID(): int; public function getAll(array $exclude = []): array; |