Completed
Branch master (de1ee7)
by Jacob
05:01
created
controller/lifestream/HomeController.class.inc.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	protected function get_page_number()
39 39
 	{
40 40
 		$page = URLDecode::getPiece(2);
41
-		if(isset($page) && is_numeric($page))
41
+		if (isset($page) && is_numeric($page))
42 42
 			return $page;
43 43
 		return 1;
44 44
 	}
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
 
59 59
 	protected function get_list_next_link()
60 60
 	{
61
-		if($this->page == 1)
61
+		if ($this->page == 1)
62 62
 			return;
63
-		if($this->page == 2)
63
+		if ($this->page == 2)
64 64
 			return Loader::getRootUrl('lifestream');
65 65
 		return Loader::getRootUrl('lifestream') . 'page/' . ($this->page - 1) . '/';
66 66
 	}
67 67
 
68 68
 	protected function get_list_prev_link()
69 69
 	{
70
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
70
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
71 71
 			return;
72 72
 		return Loader::getRootUrl('lifestream') . 'page/' . ($this->page + 1) . '/';
73 73
 	}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	private $total_post_count;
76 76
 	protected function get_total_post_count()
77 77
 	{
78
-		if(!isset($this->total_post_count))
78
+		if (!isset($this->total_post_count))
79 79
 			$this->total_post_count = ActivityCollector::getCount();
80 80
 		return $this->total_post_count;
81 81
 	}
Please login to merge, or discard this patch.
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -38,8 +38,9 @@  discard block
 block discarded – undo
38 38
 	protected function get_page_number()
39 39
 	{
40 40
 		$page = URLDecode::getPiece(2);
41
-		if(isset($page) && is_numeric($page))
42
-			return $page;
41
+		if(isset($page) && is_numeric($page)) {
42
+					return $page;
43
+		}
43 44
 		return 1;
44 45
 	}
45 46
 
@@ -58,25 +59,29 @@  discard block
 block discarded – undo
58 59
 
59 60
 	protected function get_list_next_link()
60 61
 	{
61
-		if($this->page == 1)
62
-			return;
63
-		if($this->page == 2)
64
-			return Loader::getRootUrl('lifestream');
62
+		if($this->page == 1) {
63
+					return;
64
+		}
65
+		if($this->page == 2) {
66
+					return Loader::getRootUrl('lifestream');
67
+		}
65 68
 		return Loader::getRootUrl('lifestream') . 'page/' . ($this->page - 1) . '/';
66 69
 	}
67 70
 
68 71
 	protected function get_list_prev_link()
69 72
 	{
70
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
71
-			return;
73
+		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) {
74
+					return;
75
+		}
72 76
 		return Loader::getRootUrl('lifestream') . 'page/' . ($this->page + 1) . '/';
73 77
 	}
74 78
 
75 79
 	private $total_post_count;
76 80
 	protected function get_total_post_count()
77 81
 	{
78
-		if(!isset($this->total_post_count))
79
-			$this->total_post_count = ActivityCollector::getCount();
82
+		if(!isset($this->total_post_count)) {
83
+					$this->total_post_count = ActivityCollector::getCount();
84
+		}
80 85
 		return $this->total_post_count;
81 86
 	}
82 87
 
Please login to merge, or discard this patch.
controller/lifestream/PostController.class.inc.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 		parent::__construct();
21 21
 		
22 22
 		$id = URLDecode::getPiece(2);
23
-		if(!$id || !is_numeric($id))
23
+		if (!$id || !is_numeric($id))
24 24
 			$this->eject();
25 25
 		
26 26
 		$post = ActivityCollector::getPost($id);
27
-		if(!$post)
27
+		if (!$post)
28 28
 			$this->eject();
29 29
 		
30
-		if(URLDecode::getPiece(1) != $post->type)
30
+		if (URLDecode::getPiece(1) != $post->type)
31 31
 			$this->eject();
32 32
 		
33 33
 		$this->post = $post;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 	private function get_title()
61 61
 	{
62
-		switch($this->post->type)
62
+		switch ($this->post->type)
63 63
 		{
64 64
 			case 'blog' :
65 65
 				return 'Jacob blogged';
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 	private function get_description()
86 86
 	{
87
-		switch($this->post->type)
87
+		switch ($this->post->type)
88 88
 		{
89 89
 			case 'blog' :
90 90
 				return 'Another awesome blog post from Jacob. Did I mention it was awesome?';
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,15 +20,18 @@
 block discarded – undo
20 20
 		parent::__construct();
21 21
 		
22 22
 		$id = URLDecode::getPiece(2);
23
-		if(!$id || !is_numeric($id))
24
-			$this->eject();
23
+		if(!$id || !is_numeric($id)) {
24
+					$this->eject();
25
+		}
25 26
 		
26 27
 		$post = ActivityCollector::getPost($id);
27
-		if(!$post)
28
-			$this->eject();
28
+		if(!$post) {
29
+					$this->eject();
30
+		}
29 31
 		
30
-		if(URLDecode::getPiece(1) != $post->type)
31
-			$this->eject();
32
+		if(URLDecode::getPiece(1) != $post->type) {
33
+					$this->eject();
34
+		}
32 35
 		
33 36
 		$this->post = $post;
34 37
 	}
Please login to merge, or discard this patch.
controller/lifestream/TagController.class.inc.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	private function get_title()
48 48
 	{
49
-		switch($this->tag)
49
+		switch ($this->tag)
50 50
 		{
51 51
 			case 'blog' :
52 52
 				return 'Jacob has a Blog';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
 	private function get_description()
73 73
 	{
74
-		switch($this->tag)
74
+		switch ($this->tag)
75 75
 		{
76 76
 			case 'blog' :
77 77
 				return 'Yeah, Jacob has a blog. Check out his posting activity.';
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	protected function get_page_number()
98 98
 	{
99 99
 		$page = URLDecode::getPiece(3);
100
-		if(isset($page) && is_numeric($page))
100
+		if (isset($page) && is_numeric($page))
101 101
 			return $page;
102 102
 		return 1;
103 103
 	}
@@ -117,16 +117,16 @@  discard block
 block discarded – undo
117 117
 
118 118
 	protected function get_list_next_link()
119 119
 	{
120
-		if($this->page == 1)
120
+		if ($this->page == 1)
121 121
 			return;
122
-		if($this->page == 2)
122
+		if ($this->page == 2)
123 123
 			return Loader::getRootUrl('lifestream') . $this->tag . '/';
124 124
 		return Loader::getRootUrl('lifestream') . $this->tag . '/page/' . ($this->page - 1) . '/';
125 125
 	}
126 126
 
127 127
 	protected function get_list_prev_link()
128 128
 	{
129
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
129
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
130 130
 			return;
131 131
 		return Loader::getRootUrl('lifestream') . $this->tag . '/page/' . ($this->page + 1) . '/';
132 132
 	}
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	private $total_post_count;
135 135
 	protected function get_total_post_count()
136 136
 	{
137
-		if(!isset($this->total_post_count))
137
+		if (!isset($this->total_post_count))
138 138
 			$this->total_post_count = ActivityCollector::getCountForTag($this->tag);
139 139
 		return $this->total_post_count;
140 140
 	}
Please login to merge, or discard this patch.
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -97,8 +97,9 @@  discard block
 block discarded – undo
97 97
 	protected function get_page_number()
98 98
 	{
99 99
 		$page = URLDecode::getPiece(3);
100
-		if(isset($page) && is_numeric($page))
101
-			return $page;
100
+		if(isset($page) && is_numeric($page)) {
101
+					return $page;
102
+		}
102 103
 		return 1;
103 104
 	}
104 105
 
@@ -117,25 +118,29 @@  discard block
 block discarded – undo
117 118
 
118 119
 	protected function get_list_next_link()
119 120
 	{
120
-		if($this->page == 1)
121
-			return;
122
-		if($this->page == 2)
123
-			return Loader::getRootUrl('lifestream') . $this->tag . '/';
121
+		if($this->page == 1) {
122
+					return;
123
+		}
124
+		if($this->page == 2) {
125
+					return Loader::getRootUrl('lifestream') . $this->tag . '/';
126
+		}
124 127
 		return Loader::getRootUrl('lifestream') . $this->tag . '/page/' . ($this->page - 1) . '/';
125 128
 	}
126 129
 
127 130
 	protected function get_list_prev_link()
128 131
 	{
129
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
130
-			return;
132
+		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) {
133
+					return;
134
+		}
131 135
 		return Loader::getRootUrl('lifestream') . $this->tag . '/page/' . ($this->page + 1) . '/';
132 136
 	}
133 137
 
134 138
 	private $total_post_count;
135 139
 	protected function get_total_post_count()
136 140
 	{
137
-		if(!isset($this->total_post_count))
138
-			$this->total_post_count = ActivityCollector::getCountForTag($this->tag);
141
+		if(!isset($this->total_post_count)) {
142
+					$this->total_post_count = ActivityCollector::getCountForTag($this->tag);
143
+		}
139 144
 		return $this->total_post_count;
140 145
 	}
141 146
 
Please login to merge, or discard this patch.
controller/portfolio/ContactController.class.inc.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 		
48 48
 		else
49 49
 		{
50
-            global $config;
50
+			global $config;
51 51
 			$mail = new Mail();
52 52
 			$mail->setToAddress($config->admin_email, 'Jacob Emerick');
53 53
 			$mail->setSubject('Portfolio Contact');
Please login to merge, or discard this 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.
Braces   +13 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,24 +28,26 @@
 block discarded – undo
28 28
 
29 29
 	private function process_form_data()
30 30
 	{
31
-		if(!Request::hasPost())
32
-			return array();
31
+		if(!Request::hasPost()) {
32
+					return array();
33
+		}
33 34
 		
34
-		if(!Validate::checkRequest('post', 'name', 'string'))
35
-			$error_message['name'] = 'Please enter a value for your name.';
36
-		if(!Validate::checkRequest('post', 'email', 'string'))
37
-			$error_message['email'] = 'Please enter a valid email address.';
38
-		if(!Validate::checkRequest('post', 'message', 'string'))
39
-			$error_message['message'] = 'Please enter a message.';
35
+		if(!Validate::checkRequest('post', 'name', 'string')) {
36
+					$error_message['name'] = 'Please enter a value for your name.';
37
+		}
38
+		if(!Validate::checkRequest('post', 'email', 'string')) {
39
+					$error_message['email'] = 'Please enter a valid email address.';
40
+		}
41
+		if(!Validate::checkRequest('post', 'message', 'string')) {
42
+					$error_message['message'] = 'Please enter a message.';
43
+		}
40 44
 		
41 45
 		if(!empty($error_message))
42 46
 		{
43 47
 			return array(
44 48
 				'error_message' => $error_message,
45 49
 				'value' => Request::getPost());
46
-		}
47
-		
48
-		else
50
+		} else
49 51
 		{
50 52
             global $config;
51 53
 			$mail = new Mail();
Please login to merge, or discard this patch.
controller/portfolio/DefaultPageController.class.inc.php 2 patches
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.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,10 +39,11 @@  discard block
 block discarded – undo
39 39
 				'name' => 'Contact',
40 40
 				'link' => Loader::getRootURL() . 'contact/'));
41 41
 		
42
-		if(!URLDecode::getPiece(1))
43
-			$active_page = 'About';
44
-		else
45
-			$active_page = ucfirst(URLDecode::getPiece(1));
42
+		if(!URLDecode::getPiece(1)) {
43
+					$active_page = 'About';
44
+		} else {
45
+					$active_page = ucfirst(URLDecode::getPiece(1));
46
+		}
46 47
 		
47 48
 		foreach($menu as $menu_item)
48 49
 		{
@@ -63,10 +64,11 @@  discard block
 block discarded – undo
63 64
 		{
64 65
 			$piece_obj = new stdclass();
65 66
 			$piece_obj->title = $piece->title;
66
-			if("{$piece->category}" == 1)
67
-				$piece_obj->url = Loader::getRootURL() . "web/{$piece->title_url}/";
68
-			else
69
-				$piece_obj->url = Loader::getRootURL() . "print/{$piece->title_url}/";
67
+			if("{$piece->category}" == 1) {
68
+							$piece_obj->url = Loader::getRootURL() . "web/{$piece->title_url}/";
69
+			} else {
70
+							$piece_obj->url = Loader::getRootURL() . "print/{$piece->title_url}/";
71
+			}
70 72
 			$piece_obj->image = "/{$piece->image}";
71 73
 			$piece_array[] = $piece_obj;
72 74
 		}
Please login to merge, or discard this patch.
controller/portfolio/PieceController.class.inc.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		Loader::load('collector', 'portfolio/PortfolioCollector');
37 37
 		$portfolio_result = PortfolioCollector::getPieceByURI($this->title_url);
38 38
 		
39
-		if($portfolio_result === null)
39
+		if ($portfolio_result === null)
40 40
 			$this->eject();
41 41
 		
42 42
 		$portfolio_image_result = PortfolioCollector::getImagesForPiece($portfolio_result->id, 2);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$main_image->width = $dimensions[0];
52 52
 		$main_image->height = $dimensions[1];
53 53
 		
54
-		foreach($portfolio_image_result as $portfolio_image)
54
+		foreach ($portfolio_image_result as $portfolio_image)
55 55
 		{
56 56
 			$thumb = $portfolio_image->name;
57 57
 			$thumb_array = explode('.', $thumb);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		
73 73
 		$portfolio_tag_result = PortfolioCollector::getTagsForPiece($portfolio_result->id);
74 74
 		
75
-		foreach($portfolio_tag_result as $portfolio_tag)
75
+		foreach ($portfolio_tag_result as $portfolio_tag)
76 76
 		{
77 77
 			$tag_array[] = $portfolio_tag->name;
78 78
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
 		Loader::load('collector', 'portfolio/PortfolioCollector');
37 37
 		$portfolio_result = PortfolioCollector::getPieceByURI($this->title_url);
38 38
 		
39
-		if($portfolio_result === null)
40
-			$this->eject();
39
+		if($portfolio_result === null) {
40
+					$this->eject();
41
+		}
41 42
 		
42 43
 		$portfolio_image_result = PortfolioCollector::getImagesForPiece($portfolio_result->id, 2);
43 44
 		$image = new ImageOld("portfolio/{$portfolio_image_result[0]->name}");
Please login to merge, or discard this patch.
controller/robot/WaterfallsRobotController.class.inc.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 class WaterfallsRobotController extends RobotController
6 6
 {
7 7
 
8
-    protected function set_data()
9
-    {
10
-        $this->disallow_for_all_robots('/search/');
11
-    }
8
+	protected function set_data()
9
+	{
10
+		$this->disallow_for_all_robots('/search/');
11
+	}
12 12
 
13 13
 }
Please login to merge, or discard this patch.
controller/rss/BlogPostRSSController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	{
27 27
 		$post_result = PostCollector::getMainList(250);
28 28
 		
29
-		foreach($post_result as $post)
29
+		foreach ($post_result as $post)
30 30
 		{
31 31
 			$this->addItem(
32 32
 				$post->title,
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.