summaryrefslogtreecommitdiffstats
path: root/lib/private/comments
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-12-08 14:58:18 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-12-09 14:34:23 +0100
commit249dc4490f55c0a40ec8af0800bbce146b6e5eac (patch)
treef94696e4b6b466867f468804d10895a2faef6138 /lib/private/comments
parentdec1f1d24a9bcb710ca75b83d90251f1fe53967e (diff)
downloadnextcloud-server-249dc4490f55c0a40ec8af0800bbce146b6e5eac.tar.gz
nextcloud-server-249dc4490f55c0a40ec8af0800bbce146b6e5eac.zip
improve PHP doc and remove superflous by reference indicator
Diffstat (limited to 'lib/private/comments')
-rw-r--r--lib/private/comments/manager.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/comments/manager.php b/lib/private/comments/manager.php
index 184e37eb12a..a2b55c4ffdd 100644
--- a/lib/private/comments/manager.php
+++ b/lib/private/comments/manager.php
@@ -51,7 +51,8 @@ class Manager implements ICommentsManager {
* all necessary fields have a value assigned.
*
* @param IComment $comment
- * @return IComment
+ * @return IComment returns the same updated IComment instance as provided
+ * by parameter for convenience
* @throws \UnexpectedValueException
*/
protected function prepareCommentForDatabaseWrite(IComment $comment) {
@@ -406,14 +407,13 @@ class Manager implements ICommentsManager {
* Throws NotFoundException when a comment that is to be updated does not
* exist anymore at this point of time.
*
- * @param IComment &$comment
+ * @param IComment $comment
* @return bool
* @throws NotFoundException
* @since 9.0.0
*/
- public function save(IComment &$comment) {
- $comment = $this->prepareCommentForDatabaseWrite($comment);
- if($comment->getId() === '') {
+ public function save(IComment $comment) {
+ if($this->prepareCommentForDatabaseWrite($comment)->getId() === '') {
$result = $this->insert($comment);
} else {
$result = $this->update($comment);