From 3c5828b1a787bffa6e886a4952741e4bcaeb43b9 Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Tue, 20 Jul 2021 12:29:11 -0600 Subject: A bit of code cleanup --- includes/model/Post.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'includes/model/Post.php') diff --git a/includes/model/Post.php b/includes/model/Post.php index 1b64490..46a0af0 100755 --- a/includes/model/Post.php +++ b/includes/model/Post.php @@ -78,8 +78,8 @@ class Post $this->has_value = true; } - public function has_value() - { + public function has_value(): bool + { return $this->has_value; } @@ -175,8 +175,7 @@ class Post $posts = array(); foreach ($result as $row) { - $post = new Post(); - $post->get_from_database($row['post_id']); + $post = new Post($row['post_id']); array_push($posts, $post); } -- cgit v1.2.3