Rename user methods

This commit is contained in:
Toby Zerner 2018-08-24 21:59:47 +09:30
parent d51a779241
commit 5778edb5ef
2 changed files with 4 additions and 4 deletions

View File

@ -743,7 +743,7 @@ class User extends AbstractModel
*
* @return $this
*/
public function refreshCommentsCount()
public function refreshCommentCount()
{
$this->comment_count = $this->posts()->count();
@ -755,7 +755,7 @@ class User extends AbstractModel
*
* @return $this
*/
public function refreshDiscussionsCount()
public function refreshDiscussionCount()
{
$this->discussion_count = $this->discussions()->count();

View File

@ -69,7 +69,7 @@ class UserMetadataUpdater
$user = $post->user;
if ($user && $user->exists) {
$user->refreshCommentsCount()->save();
$user->refreshCommentCount()->save();
}
}
@ -78,7 +78,7 @@ class UserMetadataUpdater
$user = $discussion->user;
if ($user && $user->exists) {
$user->refreshDiscussionsCount()->save();
$user->refreshDiscussionCount()->save();
}
}
}