Completed
Push — master ( 67df75...25777a )
by Jacob
09:40 queued 05:17
created
controller/blog/HomeController.class.inc.php 2 patches
Spacing   +8 added lines, -8 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
 			Loader::load('collector', 'blog/IntroductionCollector');
53 53
 			$introduction_result = IntroductionCollector::getRow('home');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	protected function get_page_number()
68 68
 	{
69 69
 		$page = URLDecode::getPiece(1);
70
-		if(isset($page) && is_numeric($page))
70
+		if (isset($page) && is_numeric($page))
71 71
 			return $page;
72 72
 		return 1;
73 73
 	}
@@ -87,16 +87,16 @@  discard block
 block discarded – undo
87 87
 
88 88
 	protected function get_list_next_link()
89 89
 	{
90
-		if($this->page == 1)
90
+		if ($this->page == 1)
91 91
 			return;
92
-		if($this->page == 2)
92
+		if ($this->page == 2)
93 93
 			return '/';
94 94
 		return '/' . ($this->page - 1) . '/';
95 95
 	}
96 96
 
97 97
 	protected function get_list_prev_link()
98 98
 	{
99
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
99
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
100 100
 			return;
101 101
 		return '/' . ($this->page + 1) . '/';
102 102
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	private $total_post_count;
105 105
 	protected function get_total_post_count()
106 106
 	{
107
-		if(!isset($this->total_post_count))
107
+		if (!isset($this->total_post_count))
108 108
 			$this->total_post_count = PostCollector::getMainPostCount();
109 109
 		return $this->total_post_count;
110 110
 	}
Please login to merge, or discard this patch.
Braces   +25 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,15 +32,17 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		parent::set_head_data();
34 34
 		
35
-		if($this->page == 1)
36
-			$this->set_title(self::$TITLE_MAIN);
37
-		else
38
-			$this->set_title(sprintf(self::$TITLE_PAGINATED, $this->page, $this->total_pages));
35
+		if($this->page == 1) {
36
+					$this->set_title(self::$TITLE_MAIN);
37
+		} else {
38
+					$this->set_title(sprintf(self::$TITLE_PAGINATED, $this->page, $this->total_pages));
39
+		}
39 40
 		
40
-		if($this->page == 1)
41
-			$this->set_description(self::$DESCRIPTION_MAIN);
42
-		else
43
-			$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED, $this->page, $this->total_pages));
41
+		if($this->page == 1) {
42
+					$this->set_description(self::$DESCRIPTION_MAIN);
43
+		} else {
44
+					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED, $this->page, $this->total_pages));
45
+		}
44 46
 		
45 47
 		$this->set_keywords(self::$KEYWORD_ARRAY);
46 48
 	}
@@ -67,8 +69,9 @@  discard block
 block discarded – undo
67 69
 	protected function get_page_number()
68 70
 	{
69 71
 		$page = URLDecode::getPiece(1);
70
-		if(isset($page) && is_numeric($page))
71
-			return $page;
72
+		if(isset($page) && is_numeric($page)) {
73
+					return $page;
74
+		}
72 75
 		return 1;
73 76
 	}
74 77
 
@@ -87,25 +90,29 @@  discard block
 block discarded – undo
87 90
 
88 91
 	protected function get_list_next_link()
89 92
 	{
90
-		if($this->page == 1)
91
-			return;
92
-		if($this->page == 2)
93
-			return '/';
93
+		if($this->page == 1) {
94
+					return;
95
+		}
96
+		if($this->page == 2) {
97
+					return '/';
98
+		}
94 99
 		return '/' . ($this->page - 1) . '/';
95 100
 	}
96 101
 
97 102
 	protected function get_list_prev_link()
98 103
 	{
99
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
100
-			return;
104
+		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) {
105
+					return;
106
+		}
101 107
 		return '/' . ($this->page + 1) . '/';
102 108
 	}
103 109
 
104 110
 	private $total_post_count;
105 111
 	protected function get_total_post_count()
106 112
 	{
107
-		if(!isset($this->total_post_count))
108
-			$this->total_post_count = PostCollector::getMainPostCount();
113
+		if(!isset($this->total_post_count)) {
114
+					$this->total_post_count = PostCollector::getMainPostCount();
115
+		}
109 116
 		return $this->total_post_count;
110 117
 	}
111 118
 
Please login to merge, or discard this patch.
controller/blog/DefaultListController.class.inc.php 2 patches
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.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@
 block discarded – undo
60 60
 		{
61 61
 			$post_array[] = $this->format_post($post, true);
62 62
 		}
63
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
64
-			$this->eject();
63
+		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search') {
64
+					$this->eject();
65
+		}
65 66
 		return $post_array;
66 67
 	}
67 68
 
Please login to merge, or discard this patch.
controller/site/DefaultPageController.class.inc.php 2 patches
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.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,14 +56,16 @@
 block discarded – undo
56 56
 	{
57 57
 		$current_uri = URLDecode::getPiece(1);
58 58
 		
59
-		if(!isset($current_uri))
60
-			return 'About';
59
+		if(!isset($current_uri)) {
60
+					return 'About';
61
+		}
61 62
 		
62 63
 		$menu = self::$MENU;
63 64
 		foreach($menu as $link)
64 65
 		{
65
-			if($link['uri'] == $current_uri)
66
-				return $link['name'];
66
+			if($link['uri'] == $current_uri) {
67
+							return $link['name'];
68
+			}
67 69
 		}
68 70
 		
69 71
 		return 'About';
Please login to merge, or discard this patch.
controller/site/ContactController.class.inc.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 				'value' => Request::getPost());
47 47
 		}
48 48
 		
49
-        global $config;
49
+		global $config;
50 50
 		$mail = new Mail();
51 51
 		$mail->setToAddress($config->admin_email, 'Jacob Emerick');
52 52
 		$mail->setSubject('Site Contact');
Please login to merge, or discard this 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.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,15 +29,19 @@
 block discarded – undo
29 29
 
30 30
 	private function get_form_results()
31 31
 	{
32
-		if(!Request::hasPost())
33
-			return array();
32
+		if(!Request::hasPost()) {
33
+					return array();
34
+		}
34 35
 		
35
-		if(!Validate::checkRequest('post', 'name', 'string'))
36
-			$error_message['name'] = 'Please enter a value for your name.';
37
-		if(!Validate::checkRequest('post', 'email', 'string'))
38
-			$error_message['email'] = 'Please enter a valid email address.';
39
-		if(!Validate::checkRequest('post', 'message', 'string'))
40
-			$error_message['message'] = 'Please enter a message.';
36
+		if(!Validate::checkRequest('post', 'name', 'string')) {
37
+					$error_message['name'] = 'Please enter a value for your name.';
38
+		}
39
+		if(!Validate::checkRequest('post', 'email', 'string')) {
40
+					$error_message['email'] = 'Please enter a valid email address.';
41
+		}
42
+		if(!Validate::checkRequest('post', 'message', 'string')) {
43
+					$error_message['message'] = 'Please enter a message.';
44
+		}
41 45
 		
42 46
 		if(!empty($error_message))
43 47
 		{
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/images/HomeController.class.inc.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
 	{
17 17
 		$file = URLDecode::getURI();
18 18
 		
19
-		if(
19
+		if (
20 20
 			URLDecode::getSite() == 'images' ||
21 21
 			URLDecode::getExtension() == 'ico')
22 22
 			$file = "/css/{$file}";
23
-		else if(URLDecode::getSite() == 'portfolio')
23
+		else if (URLDecode::getSite() == 'portfolio')
24 24
 			$file = "/portfolio/{$file}";
25
-		else if(substr($file, 0, 7) == '/photo/')
25
+		else if (substr($file, 0, 7) == '/photo/')
26 26
 			$file = '/photo/processed/' . substr($file, 7);
27 27
 		
28 28
 		$this->use_old_image_logic($file);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 	private function send_headers($extension, $last_modified)
34 34
 	{
35
-		switch($extension)
35
+		switch ($extension)
36 36
 		{
37 37
 			case 'gif' :
38 38
 				Header::sendGIF($last_modified);
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 	private function use_old_image_logic($file)
53 53
 	{
54 54
 		$image = new ImageOld($file);
55
-		if(!$image->isValid()) {
55
+		if (!$image->isValid()) {
56 56
 			$this->eject();
57 57
 		}
58 58
 		
59
-		switch($image->getExtension())
59
+		switch ($image->getExtension())
60 60
 		{
61 61
 			case 'gif' :
62 62
 				Header::sendGIF($image->getLastModified());
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	protected function eject()
80 80
 	{
81
-		if(get_class($this) !== 'Error404Controller')
81
+		if (get_class($this) !== 'Error404Controller')
82 82
 			Loader::loadNew('controller', '/Error404Controller')->activate();
83 83
 	}
84 84
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,12 +18,13 @@  discard block
 block discarded – undo
18 18
 		
19 19
 		if(
20 20
 			URLDecode::getSite() == 'images' ||
21
-			URLDecode::getExtension() == 'ico')
22
-			$file = "/css/{$file}";
23
-		else if(URLDecode::getSite() == 'portfolio')
24
-			$file = "/portfolio/{$file}";
25
-		else if(substr($file, 0, 7) == '/photo/')
26
-			$file = '/photo/processed/' . substr($file, 7);
21
+			URLDecode::getExtension() == 'ico') {
22
+					$file = "/css/{$file}";
23
+		} else if(URLDecode::getSite() == 'portfolio') {
24
+					$file = "/portfolio/{$file}";
25
+		} else if(substr($file, 0, 7) == '/photo/') {
26
+					$file = '/photo/processed/' . substr($file, 7);
27
+		}
27 28
 		
28 29
 		$this->use_old_image_logic($file);
29 30
 		
@@ -78,8 +79,9 @@  discard block
 block discarded – undo
78 79
 
79 80
 	protected function eject()
80 81
 	{
81
-		if(get_class($this) !== 'Error404Controller')
82
-			Loader::loadNew('controller', '/Error404Controller')->activate();
82
+		if(get_class($this) !== 'Error404Controller') {
83
+					Loader::loadNew('controller', '/Error404Controller')->activate();
84
+		}
83 85
 	}
84 86
 
85 87
 }
Please login to merge, or discard this patch.
controller/Error404Controller.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		Loader::load('collector', 'SiteCollector');
36 36
 		$site_result = SiteCollector::getSitesForMenu();
37 37
 		
38
-		foreach($site_result as $site)
38
+		foreach ($site_result as $site)
39 39
 		{
40 40
 			$site_array[] = array(
41 41
 				'url' => $site->url,
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/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.