Merge pull request #7 from flashwave/analysis-qvD0N8

i am a bad
This commit is contained in:
flash 2015-12-04 14:53:16 +01:00
commit 917afbdb22
4 changed files with 9 additions and 7 deletions

View file

@ -17,7 +17,7 @@ use Sakura\BBcode;
class Posting class Posting
{ {
// Construct a new post action // Construct a new post action
public function __construct($forum, $thread = null) { public function __construct($forum, $thread = null)
{
} }
} }

View file

@ -75,12 +75,14 @@ class Thread
} }
// Get the opening post // Get the opening post
public function firstPost() { public function firstPost()
{
return $this->posts() ? array_values($this->_posts)[0] : (new Post(0)); return $this->posts() ? array_values($this->_posts)[0] : (new Post(0));
} }
// Get the last reply // Get the last reply
public function lastPost() { public function lastPost()
{
return $this->posts() ? end($this->_posts) : (new Post(0)); return $this->posts() ? end($this->_posts) : (new Post(0));
} }