diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-08-17 22:07:23 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-08-17 22:27:55 +0200 |
commit | c08a1e6455101184f833f14544fd83f115de2777 (patch) | |
tree | 3b2f79a6edb69f659e96a9231f88d57a47b010db /lib | |
parent | 4c79d34980a6e21ee9942f7ec41e604509fc3062 (diff) | |
download | nextcloud-server-c08a1e6455101184f833f14544fd83f115de2777.tar.gz nextcloud-server-c08a1e6455101184f833f14544fd83f115de2777.zip |
according to PHPDoc this function shall return the entity
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/appframework/db/mapper.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/public/appframework/db/mapper.php b/lib/public/appframework/db/mapper.php index a23149e796b..03f0fe3aa75 100644 --- a/lib/public/appframework/db/mapper.php +++ b/lib/public/appframework/db/mapper.php @@ -125,6 +125,7 @@ abstract class Mapper { * Updates an entry in the db from an entity * @throws \InvalidArgumentException if entity has no id * @param Entity $entity the entity that should be created + * @return Entity the saved entity with the set id */ public function update(Entity $entity){ // if entity wasn't changed it makes no sense to run a db query @@ -142,7 +143,7 @@ abstract class Mapper { // get updated fields to save, fields have to be set using a setter to // be saved - // dont update the id field + // do not update the id field unset($properties['id']); $columns = ''; @@ -171,6 +172,8 @@ abstract class Mapper { array_push($params, $id); $this->execute($sql, $params); + + return $entity; } |