@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | $meta_array = array(); |
| 34 | 34 | |
| 35 | - $meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE; |
|
| 35 | + $meta_array['title'] = self::$PRIMARY_TITLE.' | '.self::$WEBSITE_TITLE; |
|
| 36 | 36 | $meta_array['description'] = self::$PRIMARY_DESCRIPTION; |
| 37 | 37 | $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
| 38 | 38 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $meta_array = array(); |
| 45 | 45 | |
| 46 | - $meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page, $this->page_count); |
|
| 46 | + $meta_array['title'] = sprintf(self::$SECONDARY_TITLE.' | '.self::$WEBSITE_TITLE, $this->page, $this->page_count); |
|
| 47 | 47 | $meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count); |
| 48 | 48 | $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
| 49 | 49 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | $meta_array = array(); |
| 34 | 34 | |
| 35 | - $meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE; |
|
| 35 | + $meta_array['title'] = self::$PRIMARY_TITLE.' | '.self::$WEBSITE_TITLE; |
|
| 36 | 36 | $meta_array['description'] = self::$PRIMARY_DESCRIPTION; |
| 37 | 37 | $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
| 38 | 38 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $meta_array = array(); |
| 45 | 45 | |
| 46 | - $meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page); |
|
| 46 | + $meta_array['title'] = sprintf(self::$SECONDARY_TITLE.' | '.self::$WEBSITE_TITLE, $this->page); |
|
| 47 | 47 | $meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count); |
| 48 | 48 | $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
| 49 | 49 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $path = URLDecode::getPiece(1); |
| 30 | 30 | $this->watercourse = WatercourseCollector::getByAlias($path); |
| 31 | 31 | |
| 32 | - if(!$this->watercourse) |
|
| 32 | + if (!$this->watercourse) |
|
| 33 | 33 | $this->eject(); |
| 34 | 34 | |
| 35 | 35 | parent::__construct(); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $meta_array = array(); |
| 41 | 41 | |
| 42 | - $meta_array['title'] = "{$this->watercourse->name} | " . self::$WEBSITE_TITLE; |
|
| 42 | + $meta_array['title'] = "{$this->watercourse->name} | ".self::$WEBSITE_TITLE; |
|
| 43 | 43 | $meta_array['description'] = $this->watercourse->description; |
| 44 | 44 | $meta_array['keywords'] = $this->get_keyword_array(); |
| 45 | 45 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $meta_array = array(); |
| 52 | 52 | |
| 53 | - $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->watercourse->name, $this->page, $this->page_count); |
|
| 53 | + $meta_array['title'] = sprintf(self::$DEFAULT_TITLE.' | '.self::$WEBSITE_TITLE, $this->watercourse->name, $this->page, $this->page_count); |
|
| 54 | 54 | $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->watercourse->name); |
| 55 | 55 | $meta_array['keywords'] = $this->get_keyword_array(); |
| 56 | 56 | |
@@ -35,16 +35,16 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | private function process_form() |
| 37 | 37 | { |
| 38 | - if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') |
|
| 38 | + if (!Request::hasPost() || Request::getPost('submit') != 'Send Message!') |
|
| 39 | 39 | return (object) array('display' => 'normal'); |
| 40 | 40 | |
| 41 | 41 | Loader::load('utility', 'Validate'); |
| 42 | 42 | $error_result = array(); |
| 43 | - if(!Validate::checkRequest('post', 'name', 'string')) |
|
| 43 | + if (!Validate::checkRequest('post', 'name', 'string')) |
|
| 44 | 44 | $error_result['name'] = 'please enter your name'; |
| 45 | - if(!Validate::checkRequest('post', 'email', 'string')) |
|
| 45 | + if (!Validate::checkRequest('post', 'email', 'string')) |
|
| 46 | 46 | $error_result['email'] = 'please enter a valid email'; |
| 47 | - if(!Validate::checkRequest('post', 'message', 'string')) |
|
| 47 | + if (!Validate::checkRequest('post', 'message', 'string')) |
|
| 48 | 48 | $error_result['message'] = 'please write a message'; |
| 49 | 49 | |
| 50 | 50 | $values = (object) array( |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | 'email' => Request::getPost('email'), |
| 53 | 53 | 'message' => Request::getPost('message')); |
| 54 | 54 | |
| 55 | - if(count($error_result) > 0) |
|
| 55 | + if (count($error_result) > 0) |
|
| 56 | 56 | { |
| 57 | 57 | return (object) array( |
| 58 | 58 | 'display' => 'error', |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | ->addTo($container['config']->admin_email) |
| 66 | 66 | ->setSubject('Home Page Contact') |
| 67 | 67 | ->setPlainMessage( |
| 68 | - "Name: {$values->name}\n" . |
|
| 69 | - "Email: {$values->email}\n" . |
|
| 68 | + "Name: {$values->name}\n". |
|
| 69 | + "Email: {$values->email}\n". |
|
| 70 | 70 | "Message: {$values->message}" |
| 71 | 71 | ) |
| 72 | 72 | ->send(); |
@@ -48,11 +48,11 @@ |
||
| 48 | 48 | $recentPosts = $postRepository->getActivePosts(3); |
| 49 | 49 | |
| 50 | 50 | $recent_post_array = array(); |
| 51 | - foreach($recentPosts as $postResult) |
|
| 51 | + foreach ($recentPosts as $postResult) |
|
| 52 | 52 | { |
| 53 | 53 | $post = new stdclass(); |
| 54 | 54 | $post->title = $postResult['title']; |
| 55 | - $post->url = Loader::getRootUrl('blog') . "{$postResult['category']}/{$postResult['path']}/"; |
|
| 55 | + $post->url = Loader::getRootUrl('blog')."{$postResult['category']}/{$postResult['path']}/"; |
|
| 56 | 56 | $post->category = ucwords(str_replace('-', ' ', $postResult['category'])); |
| 57 | 57 | $post->thumb = Content::instance('FetchFirstPhoto', $postResult['body'])->activate(); |
| 58 | 58 | $post->body = Content::instance('SmartTrim', $postResult['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $repository = new Jacobemerick\Web\Domain\Blog\Tag\MysqlTagRepository($container['db_connection_locator']); |
| 31 | 31 | $tag_result = $repository->findTagByTitle($tag); |
| 32 | 32 | |
| 33 | - if($tag_result === false) |
|
| 33 | + if ($tag_result === false) |
|
| 34 | 34 | $this->eject(); |
| 35 | 35 | |
| 36 | 36 | $this->tag = $tag_result; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | parent::set_head_data(); |
| 44 | 44 | |
| 45 | - if($this->page == 1) |
|
| 45 | + if ($this->page == 1) |
|
| 46 | 46 | { |
| 47 | 47 | $this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->tag['tag']))); |
| 48 | 48 | $this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->tag['tag']))); |
@@ -62,13 +62,13 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $tag = ucwords($this->tag['tag']); |
| 64 | 64 | |
| 65 | - if($this->page == 1) |
|
| 65 | + if ($this->page == 1) |
|
| 66 | 66 | { |
| 67 | 67 | global $container; |
| 68 | 68 | $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); |
| 69 | 69 | $introduction_result = $repository->findByType('tag', $this->tag['tag']); |
| 70 | 70 | |
| 71 | - if($introduction_result !== false) |
|
| 71 | + if ($introduction_result !== false) |
|
| 72 | 72 | { |
| 73 | 73 | $introduction = array(); |
| 74 | 74 | $introduction['title'] = $introduction_result['title']; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | protected function get_page_number() |
| 90 | 90 | { |
| 91 | 91 | $page = URLDecode::getPiece(3); |
| 92 | - if(isset($page) && is_numeric($page)) |
|
| 92 | + if (isset($page) && is_numeric($page)) |
|
| 93 | 93 | return $page; |
| 94 | 94 | return 1; |
| 95 | 95 | } |
@@ -111,24 +111,24 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | protected function get_list_next_link() |
| 113 | 113 | { |
| 114 | - if($this->page == 1) |
|
| 114 | + if ($this->page == 1) |
|
| 115 | 115 | return; |
| 116 | - if($this->page == 2) |
|
| 116 | + if ($this->page == 2) |
|
| 117 | 117 | return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/")->activate(); |
| 118 | - return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page - 1) . '/')->activate(); |
|
| 118 | + return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/".($this->page - 1).'/')->activate(); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | protected function get_list_prev_link() |
| 122 | 122 | { |
| 123 | - if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) |
|
| 123 | + if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) |
|
| 124 | 124 | return; |
| 125 | - return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page + 1) . '/')->activate(); |
|
| 125 | + return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/".($this->page + 1).'/')->activate(); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | private $total_post_count; |
| 129 | 129 | protected function get_total_post_count() |
| 130 | 130 | { |
| 131 | - if(!isset($this->total_post_count)) { |
|
| 131 | + if (!isset($this->total_post_count)) { |
|
| 132 | 132 | global $container; |
| 133 | 133 | $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
| 134 | 134 | $this->total_post_count = $repository->getActivePostsCountByTag($this->tag['id']); |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | parent::set_head_data(); |
| 69 | 69 | |
| 70 | - switch($this->category->display) |
|
| 70 | + switch ($this->category->display) |
|
| 71 | 71 | { |
| 72 | 72 | case 'Hiking' : |
| 73 | - if($this->page == 1) |
|
| 73 | + if ($this->page == 1) |
|
| 74 | 74 | { |
| 75 | 75 | $this->set_title(self::$TITLE_MAIN_HIKING); |
| 76 | 76 | $this->set_description(self::$DESCRIPTION_MAIN_HIKING); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $this->set_keywords(self::$KEYWORD_ARRAY_HIKING); |
| 84 | 84 | break; |
| 85 | 85 | case 'Personal' : |
| 86 | - if($this->page == 1) |
|
| 86 | + if ($this->page == 1) |
|
| 87 | 87 | { |
| 88 | 88 | $this->set_title(self::$TITLE_MAIN_PERSONAL); |
| 89 | 89 | $this->set_description(self::$DESCRIPTION_MAIN_PERSONAL); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $this->set_keywords(self::$KEYWORD_ARRAY_PERSONAL); |
| 97 | 97 | break; |
| 98 | 98 | case 'Web Development' : |
| 99 | - if($this->page == 1) |
|
| 99 | + if ($this->page == 1) |
|
| 100 | 100 | { |
| 101 | 101 | $this->set_title(self::$TITLE_MAIN_WEBDEVELOPMENT); |
| 102 | 102 | $this->set_description(self::$DESCRIPTION_MAIN_WEBDEVELOPMENT); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | protected function get_introduction() |
| 115 | 115 | { |
| 116 | - if($this->page == 1) |
|
| 116 | + if ($this->page == 1) |
|
| 117 | 117 | { |
| 118 | 118 | global $container; |
| 119 | 119 | $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | protected function get_page_number() |
| 135 | 135 | { |
| 136 | 136 | $page = URLDecode::getPiece(2); |
| 137 | - if(isset($page) && is_numeric($page)) |
|
| 137 | + if (isset($page) && is_numeric($page)) |
|
| 138 | 138 | return $page; |
| 139 | 139 | return 1; |
| 140 | 140 | } |
@@ -156,24 +156,24 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | protected function get_list_next_link() |
| 158 | 158 | { |
| 159 | - if($this->page == 1) |
|
| 159 | + if ($this->page == 1) |
|
| 160 | 160 | return; |
| 161 | - if($this->page == 2) |
|
| 161 | + if ($this->page == 2) |
|
| 162 | 162 | return Content::instance('URLSafe', "/{$this->category->link}/")->activate(); |
| 163 | - return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page - 1) . '/')->activate(); |
|
| 163 | + return Content::instance('URLSafe', "/{$this->category->link}/".($this->page - 1).'/')->activate(); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | protected function get_list_prev_link() |
| 167 | 167 | { |
| 168 | - if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) |
|
| 168 | + if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) |
|
| 169 | 169 | return; |
| 170 | - return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page + 1) . '/')->activate(); |
|
| 170 | + return Content::instance('URLSafe', "/{$this->category->link}/".($this->page + 1).'/')->activate(); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | private $total_post_count; |
| 174 | 174 | protected function get_total_post_count() |
| 175 | 175 | { |
| 176 | - if(!isset($this->total_post_count)) { |
|
| 176 | + if (!isset($this->total_post_count)) { |
|
| 177 | 177 | global $container; |
| 178 | 178 | $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
| 179 | 179 | $this->total_post_count = $repository->getActivePostsCountByCategory($this->category->link); |
@@ -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); |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | parent::set_head_data(); |
| 34 | 34 | |
| 35 | - if($this->page == 1) |
|
| 35 | + if ($this->page == 1) |
|
| 36 | 36 | $this->set_title(self::$TITLE_MAIN); |
| 37 | 37 | else |
| 38 | 38 | $this->set_title(sprintf(self::$TITLE_PAGINATED, $this->page, $this->total_pages)); |
| 39 | 39 | |
| 40 | - if($this->page == 1) |
|
| 40 | + if ($this->page == 1) |
|
| 41 | 41 | $this->set_description(self::$DESCRIPTION_MAIN); |
| 42 | 42 | else |
| 43 | 43 | $this->set_description(sprintf(self::$DESCRIPTION_PAGINATED, $this->page, $this->total_pages)); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | protected function get_introduction() |
| 49 | 49 | { |
| 50 | - if($this->page == 1) |
|
| 50 | + if ($this->page == 1) |
|
| 51 | 51 | { |
| 52 | 52 | global $container; |
| 53 | 53 | $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | protected function get_page_number() |
| 69 | 69 | { |
| 70 | 70 | $page = URLDecode::getPiece(1); |
| 71 | - if(isset($page) && is_numeric($page)) |
|
| 71 | + if (isset($page) && is_numeric($page)) |
|
| 72 | 72 | return $page; |
| 73 | 73 | return 1; |
| 74 | 74 | } |
@@ -90,24 +90,24 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | protected function get_list_next_link() |
| 92 | 92 | { |
| 93 | - if($this->page == 1) |
|
| 93 | + if ($this->page == 1) |
|
| 94 | 94 | return; |
| 95 | - if($this->page == 2) |
|
| 95 | + if ($this->page == 2) |
|
| 96 | 96 | return '/'; |
| 97 | - return '/' . ($this->page - 1) . '/'; |
|
| 97 | + return '/'.($this->page - 1).'/'; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | protected function get_list_prev_link() |
| 101 | 101 | { |
| 102 | - if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) |
|
| 102 | + if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) |
|
| 103 | 103 | return; |
| 104 | - return '/' . ($this->page + 1) . '/'; |
|
| 104 | + return '/'.($this->page + 1).'/'; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | private $total_post_count; |
| 108 | 108 | protected function get_total_post_count() |
| 109 | 109 | { |
| 110 | - if(!isset($this->total_post_count)) { |
|
| 110 | + if (!isset($this->total_post_count)) { |
|
| 111 | 111 | global $container; |
| 112 | 112 | $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
| 113 | 113 | $this->total_post_count = $repository->getActivePostsCount(); |