From 4273689e9f37adadef2d514714fadcc38582b87c Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 3 Dec 2015 17:13:18 +0100 Subject: [PATCH] fix usage of empty --- lib/private/comments/manager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/private/comments/manager.php b/lib/private/comments/manager.php index bb0782c77f..12b90a063d 100644 --- a/lib/private/comments/manager.php +++ b/lib/private/comments/manager.php @@ -55,11 +55,11 @@ class Manager implements ICommentsManager { * @throws \UnexpectedValueException */ protected function prepareCommentForDatabaseWrite(IComment $comment) { - if( empty($comment->getActorType()) - || empty($comment->getActorId()) - || empty($comment->getObjectType()) - || empty($comment->getObjectId()) - || empty($comment->getVerb()) + if( !$comment->getActorType() + || !$comment->getActorId() + || !$comment->getObjectType() + || !$comment->getObjectId() + || !$comment->getVerb() ) { throw new \UnexpectedValueException('Actor, Object and Verb information must be provided for saving'); } @@ -430,7 +430,7 @@ class Manager implements ICommentsManager { $result = $this->update($comment); } - if($result && !empty($comment->getParentId())) { + if($result && !!$comment->getParentId()) { $this->updateChildrenInformation( $comment->getParentId(), $comment->getCreationDateTime()