Merge branch 'master' of github.com:flashwave/sakura

This commit is contained in:
flash 2015-12-04 15:19:34 +01:00
commit fd6baecb7d
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));
} }