* Class CommentRepo
* @package BookStack\Repos
*/
-class CommentRepo {
+class CommentRepo
+{
/**
* @var Comment $comment
* @param array $data
* @return Comment
*/
- public function create (Entity $entity, $data = [])
+ public function create(Entity $entity, $data = [])
{
$userId = user()->id;
$comment = $this->comment->newInstance($data);
protected function getNextLocalId(Entity $entity)
{
$comments = $entity->comments(false)->orderBy('local_id', 'desc')->first();
- if ($comments === null) return 1;
+ if ($comments === null) {
+ return 1;
+ }
return $comments->local_id + 1;
}
-}
\ No newline at end of file
+}