@@ -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 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $keyword_array = array(); |
97 | 97 | $keywords = $this->tags; |
98 | 98 | |
99 | - foreach($keywords as $keyword) |
|
99 | + foreach ($keywords as $keyword) |
|
100 | 100 | { |
101 | 101 | $keyword_array[] = $keyword['tag']; |
102 | 102 | } |
@@ -110,16 +110,16 @@ discard block |
||
110 | 110 | private function get_series_posts() |
111 | 111 | { |
112 | 112 | $series_posts = $this->fetch_series_posts(); |
113 | - if(count($series_posts) < 1) |
|
113 | + if (count($series_posts) < 1) |
|
114 | 114 | return array(); |
115 | 115 | |
116 | 116 | $previous_post = new stdclass(); |
117 | 117 | $next_post = new stdclass(); |
118 | 118 | |
119 | 119 | $found_current_post = false; |
120 | - foreach($series_posts as $post_row) |
|
120 | + foreach ($series_posts as $post_row) |
|
121 | 121 | { |
122 | - if($post_row['post'] == $this->post['id']) |
|
122 | + if ($post_row['post'] == $this->post['id']) |
|
123 | 123 | { |
124 | 124 | $found_current_post = true; |
125 | 125 | continue; |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | $post->title = $post_row['title']; |
149 | 149 | } |
150 | 150 | |
151 | - $post->url = Loader::getRootUrl('blog') . "{$post_row['category']}/{$post_row['path']}/"; |
|
151 | + $post->url = Loader::getRootUrl('blog')."{$post_row['category']}/{$post_row['path']}/"; |
|
152 | 152 | |
153 | - if(!$found_current_post) |
|
153 | + if (!$found_current_post) |
|
154 | 154 | $previous_post = $post; |
155 | 155 | else |
156 | 156 | { |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | private $series_posts; |
170 | 170 | private function fetch_series_posts() |
171 | 171 | { |
172 | - if(!isset($this->series_posts)) { |
|
172 | + if (!isset($this->series_posts)) { |
|
173 | 173 | global $container; |
174 | 174 | $repository = new Jacobemerick\Web\Domain\Blog\Series\MysqlSeriesRepository($container['db_connection_locator']); |
175 | 175 | $this->series_posts = $repository->getSeriesForPost($this->post['id']); |
@@ -180,14 +180,14 @@ discard block |
||
180 | 180 | private function get_related_posts() |
181 | 181 | { |
182 | 182 | $tag_array = array(); |
183 | - foreach($this->tags as $tag) |
|
183 | + foreach ($this->tags as $tag) |
|
184 | 184 | { |
185 | 185 | $tag_array[] = $tag['id']; |
186 | 186 | } |
187 | 187 | |
188 | 188 | $series_posts = $this->fetch_series_posts(); |
189 | 189 | $exclude_post_array = array(); |
190 | - foreach($series_posts as $series_post) |
|
190 | + foreach ($series_posts as $series_post) |
|
191 | 191 | { |
192 | 192 | $exclude_post_array[] = $series_post['post']; |
193 | 193 | } |
@@ -198,11 +198,11 @@ discard block |
||
198 | 198 | |
199 | 199 | $post_array = array(); |
200 | 200 | |
201 | - foreach($post_result as $post_row) |
|
201 | + foreach ($post_result as $post_row) |
|
202 | 202 | { |
203 | 203 | $post = new stdclass(); |
204 | 204 | $post->title = $post_row['title']; |
205 | - $post->url = Loader::getRootUrl('blog') . "{$post_row['category']}/{$post_row['path']}/"; |
|
205 | + $post->url = Loader::getRootUrl('blog')."{$post_row['category']}/{$post_row['path']}/"; |
|
206 | 206 | $post->category = ucwords(str_replace('-', ' ', $post_row['category'])); |
207 | 207 | $post->thumb = Content::instance('FetchFirstPhoto', $post_row['body'])->activate(); |
208 | 208 | $post->body = Content::instance('SmartTrim', $post_row['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $container['logger']->info("CommentService | Path | {$elapsed}"); |
247 | 247 | |
248 | 248 | $array = array(); |
249 | - foreach((array) $comment_response as $comment) |
|
249 | + foreach ((array) $comment_response as $comment) |
|
250 | 250 | { |
251 | 251 | $body = $comment->getBody(); |
252 | 252 | $body = Content::instance('CleanComment', $body)->activate(); |