Completed
Push — master ( 8fa960...c81f91 )
by Jacob
03:35
created
controller/waterfalls/CompanionListController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 		$alias = URLDecode::getPiece(2);
28 28
 		$this->companion = CompanionCollector::getByAlias($alias);
29 29
 		
30
-		if(!$this->companion)
30
+		if (!$this->companion)
31 31
 			$this->eject();
32 32
 		
33 33
 		parent::__construct();
Please login to merge, or discard this patch.
controller/blog/AboutController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 		Loader::load('collector', 'blog/IntroductionCollector');
37 37
 		$introduction_result = IntroductionCollector::getRow('about');
38 38
 		
39
-		if($introduction_result !== null)
39
+		if ($introduction_result !== null)
40 40
 		{
41 41
 			$introduction = array();
42 42
 			$introduction['title'] = $introduction_result->title;
Please login to merge, or discard this patch.
controller/blog/SearchController.class.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	{
46 46
 		parent::set_head_data();
47 47
 		
48
-		if($this->page == 1)
48
+		if ($this->page == 1)
49 49
 		{
50 50
 			$this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->query)));
51 51
 			$this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->query)));
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 
64 64
 	protected function get_introduction()
65 65
 	{
66
-		if($this->total_pages > 1)
66
+		if ($this->total_pages > 1)
67 67
 			return array(
68 68
 				'title' => "Posts from search '{$this->query}', page {$this->page} of {$this->total_pages}.");
69
-		else if($this->total_pages == 1)
69
+		else if ($this->total_pages == 1)
70 70
 			return array(
71 71
 				'title' => "Posts from search '{$this->query}'.");
72 72
 		else
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	protected function get_page_number()
78 78
 	{
79 79
 		$page = URLDecode::getPiece(3);
80
-		if(isset($page) && is_numeric($page))
80
+		if (isset($page) && is_numeric($page))
81 81
 			return $page;
82 82
 		return 1;
83 83
 	}
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	private $search_result;
86 86
 	private function get_search_result()
87 87
 	{
88
-		if(!isset($this->search_result))
88
+		if (!isset($this->search_result))
89 89
 		{
90 90
 			$posts = PostCollector::getMainList(self::$MAXIMUM_SEARCH_POSTS);
91 91
 			
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
 
114 114
 	protected function get_list_next_link()
115 115
 	{
116
-		if($this->page == 1)
116
+		if ($this->page == 1)
117 117
 			return;
118
-		if($this->page == 2)
118
+		if ($this->page == 2)
119 119
 			return Content::instance('URLSafe', "/search/{$this->query}/")->activate();
120 120
 		return Content::instance('URLSafe', "/search/{$this->query}/" . ($this->page - 1) . '/')->activate();
121 121
 	}
122 122
 
123 123
 	protected function get_list_prev_link()
124 124
 	{
125
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
125
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
126 126
 			return;
127 127
 		return Content::instance('URLSafe', "/search/{$this->query}/" . ($this->page + 1) . '/')->activate();
128 128
 	}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	private $total_post_count;
131 131
 	protected function get_total_post_count()
132 132
 	{
133
-		if(!isset($this->total_post_count))
133
+		if (!isset($this->total_post_count))
134 134
 			$this->total_post_count = count($this->get_search_result());
135 135
 		return $this->total_post_count;
136 136
 	}
Please login to merge, or discard this patch.
controller/blog/DefaultListController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@
 block discarded – undo
56 56
 	final private function get_list_posts()
57 57
 	{
58 58
 		$post_array = array();
59
-		foreach($this->get_list_results() as $post)
59
+		foreach ($this->get_list_results() as $post)
60 60
 		{
61 61
 			$post_array[] = $this->format_post($post, true);
62 62
 		}
63
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
63
+		if (count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
64 64
 			$this->eject();
65 65
 		return $post_array;
66 66
 	}
Please login to merge, or discard this patch.
controller/site/DefaultPageController.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		$active_page = $this->get_active_page();
42 42
 		
43 43
 		$menu = array();
44
-		foreach(self::$MENU as $item)
44
+		foreach (self::$MENU as $item)
45 45
 		{
46 46
 			$menu[] = (object) array(
47 47
 				'name' => $item['name'],
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 	{
57 57
 		$current_uri = URLDecode::getPiece(1);
58 58
 		
59
-		if(!isset($current_uri))
59
+		if (!isset($current_uri))
60 60
 			return 'About';
61 61
 		
62 62
 		$menu = self::$MENU;
63
-		foreach($menu as $link)
63
+		foreach ($menu as $link)
64 64
 		{
65
-			if($link['uri'] == $current_uri)
65
+			if ($link['uri'] == $current_uri)
66 66
 				return $link['name'];
67 67
 		}
68 68
 		
Please login to merge, or discard this patch.
controller/site/ContactController.class.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@
 block discarded – undo
29 29
 
30 30
 	private function get_form_results()
31 31
 	{
32
-		if(!Request::hasPost())
32
+		if (!Request::hasPost())
33 33
 			return array();
34 34
 		
35
-		if(!Validate::checkRequest('post', 'name', 'string'))
35
+		if (!Validate::checkRequest('post', 'name', 'string'))
36 36
 			$error_message['name'] = 'Please enter a value for your name.';
37
-		if(!Validate::checkRequest('post', 'email', 'string'))
37
+		if (!Validate::checkRequest('post', 'email', 'string'))
38 38
 			$error_message['email'] = 'Please enter a valid email address.';
39
-		if(!Validate::checkRequest('post', 'message', 'string'))
39
+		if (!Validate::checkRequest('post', 'message', 'string'))
40 40
 			$error_message['message'] = 'Please enter a message.';
41 41
 		
42
-		if(!empty($error_message))
42
+		if (!empty($error_message))
43 43
 		{
44 44
 			return array(
45 45
 				'error_message' => $error_message,
Please login to merge, or discard this patch.
controller/site/ChangelogController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 		Loader::load('collector', 'data/ChangelogCollector');
30 30
 		$changelog_result = ChangelogCollector::getLast20Changes();
31 31
 		
32
-		foreach($changelog_result as $change)
32
+		foreach ($changelog_result as $change)
33 33
 		{
34 34
 			$changelog[] = (object) array(
35 35
 				'date' => (object) array(
Please login to merge, or discard this patch.
controller/portfolio/DefaultPageController.class.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 				'name' => 'Contact',
40 40
 				'link' => Loader::getRootURL() . 'contact/'));
41 41
 		
42
-		if(!URLDecode::getPiece(1))
42
+		if (!URLDecode::getPiece(1))
43 43
 			$active_page = 'About';
44 44
 		else
45 45
 			$active_page = ucfirst(URLDecode::getPiece(1));
46 46
 		
47
-		foreach($menu as $menu_item)
47
+		foreach ($menu as $menu_item)
48 48
 		{
49 49
 			$menu_item = (object) $menu_item;
50 50
 			$menu_item->active = ($menu_item->name == $active_page);
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 		Loader::load('collector', 'portfolio/PortfolioCollector');
60 60
 		$portfolio_result = PortfolioCollector::getPiecesForCategory($category_id);
61 61
 		
62
-		foreach($portfolio_result as $piece)
62
+		foreach ($portfolio_result as $piece)
63 63
 		{
64 64
 			$piece_obj = new stdclass();
65 65
 			$piece_obj->title = $piece->title;
66
-			if("{$piece->category}" == 1)
66
+			if ("{$piece->category}" == 1)
67 67
 				$piece_obj->url = Loader::getRootURL() . "web/{$piece->title_url}/";
68 68
 			else
69 69
 				$piece_obj->url = Loader::getRootURL() . "print/{$piece->title_url}/";
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			$piece_array[] = $piece_obj;
72 72
 		}
73 73
 		
74
-		switch($category_id)
74
+		switch ($category_id)
75 75
 		{
76 76
 			case 1 :
77 77
 				$title = "Sites I've worked on";
Please login to merge, or discard this patch.
controller/portfolio/ContactController.class.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
 
29 29
 	private function process_form_data()
30 30
 	{
31
-		if(!Request::hasPost())
31
+		if (!Request::hasPost())
32 32
 			return array();
33 33
 		
34
-		if(!Validate::checkRequest('post', 'name', 'string'))
34
+		if (!Validate::checkRequest('post', 'name', 'string'))
35 35
 			$error_message['name'] = 'Please enter a value for your name.';
36
-		if(!Validate::checkRequest('post', 'email', 'string'))
36
+		if (!Validate::checkRequest('post', 'email', 'string'))
37 37
 			$error_message['email'] = 'Please enter a valid email address.';
38
-		if(!Validate::checkRequest('post', 'message', 'string'))
38
+		if (!Validate::checkRequest('post', 'message', 'string'))
39 39
 			$error_message['message'] = 'Please enter a message.';
40 40
 		
41
-		if(!empty($error_message))
41
+		if (!empty($error_message))
42 42
 		{
43 43
 			return array(
44 44
 				'error_message' => $error_message,
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			$mail->send();
59 59
 			
60 60
 			return array(
61
-				'success_message' => "Thank you for your message, ".Request::getPost('name')."! I'll get back to you as soon as possible.");
61
+				'success_message' => "Thank you for your message, " . Request::getPost('name') . "! I'll get back to you as soon as possible.");
62 62
 		}
63 63
 	}
64 64
 
Please login to merge, or discard this patch.