@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
| 28 | 28 | $this->post = $repository->findPostByPath(URLDecode::getPiece(2)); |
| 29 | 29 | |
| 30 | - if($this->post == null) |
|
| 30 | + if ($this->post == null) |
|
| 31 | 31 | $this->eject(); |
| 32 | 32 | |
| 33 | 33 | $this->handle_comment_submit( |
| 34 | 34 | self::$BLOG_SITE_ID, |
| 35 | 35 | $this->post['path'], |
| 36 | - Loader::getRootUrl('blog') . $this->post['category'] . '/' . $this->post['path'] . '/', |
|
| 36 | + Loader::getRootUrl('blog').$this->post['category'].'/'.$this->post['path'].'/', |
|
| 37 | 37 | $this->post['title']); |
| 38 | 38 | |
| 39 | 39 | global $container; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $log_id = self::$DEPRECATED_BLOGS[$this->post['id']]; |
| 59 | 59 | $log = LogCollector::getById($log_id); |
| 60 | 60 | if (!empty($log)) { |
| 61 | - $log_url = Loader::getRootUrl('waterfalls') . "journal/{$log->alias}/"; |
|
| 61 | + $log_url = Loader::getRootUrl('waterfalls')."journal/{$log->alias}/"; |
|
| 62 | 62 | $this->set_canonical($log_url); |
| 63 | 63 | } |
| 64 | 64 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $keyword_array = array(); |
| 96 | 96 | $keywords = $this->tags; |
| 97 | 97 | |
| 98 | - foreach($keywords as $keyword) |
|
| 98 | + foreach ($keywords as $keyword) |
|
| 99 | 99 | { |
| 100 | 100 | $keyword_array[] = $keyword['tag']; |
| 101 | 101 | } |
@@ -109,16 +109,16 @@ discard block |
||
| 109 | 109 | private function get_series_posts() |
| 110 | 110 | { |
| 111 | 111 | $series_posts = $this->fetch_series_posts(); |
| 112 | - if(count($series_posts) < 1) |
|
| 112 | + if (count($series_posts) < 1) |
|
| 113 | 113 | return array(); |
| 114 | 114 | |
| 115 | 115 | $previous_post = new stdclass(); |
| 116 | 116 | $next_post = new stdclass(); |
| 117 | 117 | |
| 118 | 118 | $found_current_post = false; |
| 119 | - foreach($series_posts as $post_row) |
|
| 119 | + foreach ($series_posts as $post_row) |
|
| 120 | 120 | { |
| 121 | - if($post_row['post'] == $this->post['id']) |
|
| 121 | + if ($post_row['post'] == $this->post['id']) |
|
| 122 | 122 | { |
| 123 | 123 | $found_current_post = true; |
| 124 | 124 | continue; |
@@ -146,9 +146,9 @@ discard block |
||
| 146 | 146 | $post->title = $post_row['title']; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - $post->url = Loader::getRootUrl('blog') . "{$post_row['category']}/{$post_row['path']}/"; |
|
| 149 | + $post->url = Loader::getRootUrl('blog')."{$post_row['category']}/{$post_row['path']}/"; |
|
| 150 | 150 | |
| 151 | - if(!$found_current_post) |
|
| 151 | + if (!$found_current_post) |
|
| 152 | 152 | $previous_post = $post; |
| 153 | 153 | else |
| 154 | 154 | { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | private $series_posts; |
| 168 | 168 | private function fetch_series_posts() |
| 169 | 169 | { |
| 170 | - if(!isset($this->series_posts)) { |
|
| 170 | + if (!isset($this->series_posts)) { |
|
| 171 | 171 | global $container; |
| 172 | 172 | $repository = new Jacobemerick\Web\Domain\Blog\Series\MysqlSeriesRepository($container['db_connection_locator']); |
| 173 | 173 | $this->series_posts = $repository->getSeriesForPost($this->post['id']); |
@@ -178,14 +178,14 @@ discard block |
||
| 178 | 178 | private function get_related_posts() |
| 179 | 179 | { |
| 180 | 180 | $tag_array = array(); |
| 181 | - foreach($this->tags as $tag) |
|
| 181 | + foreach ($this->tags as $tag) |
|
| 182 | 182 | { |
| 183 | 183 | $tag_array[] = $tag['id']; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | $series_posts = $this->fetch_series_posts(); |
| 187 | 187 | $exclude_post_array = array(); |
| 188 | - foreach($series_posts as $series_post) |
|
| 188 | + foreach ($series_posts as $series_post) |
|
| 189 | 189 | { |
| 190 | 190 | $exclude_post_array[] = $series_post['post']; |
| 191 | 191 | } |
@@ -196,11 +196,11 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | $post_array = array(); |
| 198 | 198 | |
| 199 | - foreach($post_result as $post_row) |
|
| 199 | + foreach ($post_result as $post_row) |
|
| 200 | 200 | { |
| 201 | 201 | $post = new stdclass(); |
| 202 | 202 | $post->title = $post_row['title']; |
| 203 | - $post->url = Loader::getRootUrl('blog') . "{$post_row['category']}/{$post_row['path']}/"; |
|
| 203 | + $post->url = Loader::getRootUrl('blog')."{$post_row['category']}/{$post_row['path']}/"; |
|
| 204 | 204 | $post->category = ucwords(str_replace('-', ' ', $post_row['category'])); |
| 205 | 205 | $post->thumb = Content::instance('FetchFirstPhoto', $post_row['body'])->activate(); |
| 206 | 206 | $post->body = Content::instance('SmartTrim', $post_row['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG); |