Completed
Push — master ( d9eba8...4988a4 )
by Jacob
03:52
created
controller/home/HomeController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
controller/blog/TagController.class.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']);
Please login to merge, or discard this patch.
controller/blog/CategoryController.class.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
controller/blog/HomeController.class.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
controller/blog/SearchController.class.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	{
45 45
 		parent::set_head_data();
46 46
 		
47
-		if($this->page == 1)
47
+		if ($this->page == 1)
48 48
 		{
49 49
 			$this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->query)));
50 50
 			$this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->query)));
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 
63 63
 	protected function get_introduction()
64 64
 	{
65
-		if($this->total_pages > 1)
65
+		if ($this->total_pages > 1)
66 66
 			return array(
67 67
 				'title' => "Posts from search '{$this->query}', page {$this->page} of {$this->total_pages}.");
68
-		else if($this->total_pages == 1)
68
+		else if ($this->total_pages == 1)
69 69
 			return array(
70 70
 				'title' => "Posts from search '{$this->query}'.");
71 71
 		else
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	protected function get_page_number()
77 77
 	{
78 78
 		$page = URLDecode::getPiece(3);
79
-		if(isset($page) && is_numeric($page))
79
+		if (isset($page) && is_numeric($page))
80 80
 			return $page;
81 81
 		return 1;
82 82
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	private $search_result;
85 85
 	private function get_search_result()
86 86
 	{
87
-		if(!isset($this->search_result))
87
+		if (!isset($this->search_result))
88 88
 		{
89 89
         global $container;
90 90
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
@@ -114,24 +114,24 @@  discard block
 block discarded – undo
114 114
 
115 115
 	protected function get_list_next_link()
116 116
 	{
117
-		if($this->page == 1)
117
+		if ($this->page == 1)
118 118
 			return;
119
-		if($this->page == 2)
119
+		if ($this->page == 2)
120 120
 			return Content::instance('URLSafe', "/search/{$this->query}/")->activate();
121
-		return Content::instance('URLSafe', "/search/{$this->query}/" . ($this->page - 1) . '/')->activate();
121
+		return Content::instance('URLSafe', "/search/{$this->query}/".($this->page - 1).'/')->activate();
122 122
 	}
123 123
 
124 124
 	protected function get_list_prev_link()
125 125
 	{
126
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
126
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
127 127
 			return;
128
-		return Content::instance('URLSafe', "/search/{$this->query}/" . ($this->page + 1) . '/')->activate();
128
+		return Content::instance('URLSafe', "/search/{$this->query}/".($this->page + 1).'/')->activate();
129 129
 	}
130 130
 
131 131
 	private $total_post_count;
132 132
 	protected function get_total_post_count()
133 133
 	{
134
-		if(!isset($this->total_post_count))
134
+		if (!isset($this->total_post_count))
135 135
 			$this->total_post_count = count($this->get_search_result());
136 136
 		return $this->total_post_count;
137 137
 	}
Please login to merge, or discard this patch.
controller/portfolio/ResumeController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $this->set_body('body_view', 'Resume');
27 27
 
28
-        $resumePath = Loader::getRootURL('portfolio') . "/jsonresume/{$this->resume}";
28
+        $resumePath = Loader::getRootURL('portfolio')."/jsonresume/{$this->resume}";
29 29
         $resume = file_get_contents($resumePath);
30 30
         $resume = json_decode($resume, true);
31 31
         $this->set_body('body_data', $resume);
Please login to merge, or discard this patch.
controller/portfolio/ContactController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 
90 90
         return [
91 91
             'success' =>
92
-                "Thank you for your message, {$_POST['name']}! " .
92
+                "Thank you for your message, {$_POST['name']}! ".
93 93
                 "I'll get back to you as soon as possible."
94 94
         ];
95 95
     }
Please login to merge, or discard this patch.
controller/portfolio/DefaultPageController.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
             ],
34 34
             [
35 35
                 'name' => 'Projects',
36
-                'link' => Loader::getRootURL() . 'projects/',
36
+                'link' => Loader::getRootURL().'projects/',
37 37
             ],
38 38
             [
39 39
                 'name' => 'Résumé',
40
-                'link' => Loader::getRootURL() . 'resume/',
40
+                'link' => Loader::getRootURL().'resume/',
41 41
             ],
42 42
             [
43 43
                 'name' => 'Contact',
44
-                'link' => Loader::getRootURL() . 'contact/',
44
+                'link' => Loader::getRootURL().'contact/',
45 45
             ],
46 46
         ];
47 47
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $active_page = ucfirst(URLDecode::getPiece(1));
52 52
         }
53 53
 
54
-        return array_map(function ($row) use ($active_page) {
54
+        return array_map(function($row) use ($active_page) {
55 55
             $row = (object) $row;
56 56
             $row->active = ($row->name == $active_page);
57 57
             return $row;
Please login to merge, or discard this patch.
controller/waterfalls/ContactController.class.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();		
Please login to merge, or discard this patch.