From 4a52b222390e56e2d4e2755fed1161df5edac2b7 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 4 Dec 2015 08:52:57 -0500 Subject: [PATCH] Applied fixes from StyleCI --- libraries/Forum/Posting.php | 4 ++-- libraries/Forum/Thread.php | 6 ++++-- libraries/Main.php | 4 ++-- sakura.php | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/libraries/Forum/Posting.php b/libraries/Forum/Posting.php index bc4fa23..bcde921 100644 --- a/libraries/Forum/Posting.php +++ b/libraries/Forum/Posting.php @@ -17,7 +17,7 @@ use Sakura\BBcode; class Posting { // Construct a new post action - public function __construct($forum, $thread = null) { - + public function __construct($forum, $thread = null) + { } } diff --git a/libraries/Forum/Thread.php b/libraries/Forum/Thread.php index a1ac56e..cb7a5b1 100644 --- a/libraries/Forum/Thread.php +++ b/libraries/Forum/Thread.php @@ -75,12 +75,14 @@ class Thread } // Get the opening post - public function firstPost() { + public function firstPost() + { return $this->posts() ? array_values($this->_posts)[0] : (new Post(0)); } // Get the last reply - public function lastPost() { + public function lastPost() + { return $this->posts() ? end($this->_posts) : (new Post(0)); } diff --git a/libraries/Main.php b/libraries/Main.php index ede297e..514e96d 100644 --- a/libraries/Main.php +++ b/libraries/Main.php @@ -777,10 +777,10 @@ class Main $parts = explode('', $text); $newStr = ''; - if(count($parts) > 1) { + if (count($parts) > 1) { foreach ($parts as $p) { $parts2 = explode('', $p); - if(count($parts2) > 1) { + if (count($parts2) > 1) { $code = str_replace('
', '', $parts2[0]); $code = str_replace('
', '', $code); $code = str_replace('
', '', $code); diff --git a/sakura.php b/sakura.php index ae255f6..e034f0b 100644 --- a/sakura.php +++ b/sakura.php @@ -28,7 +28,7 @@ if (version_compare(phpversion(), '5.4.0', '<')) { } // Include third-party libraries -if(!@include_once ROOT . 'vendor/autoload.php') { +if (!@include_once ROOT . 'vendor/autoload.php') { die('

Autoloader not found, did you run composer?

'); }