Completed
Push — master ( a712f0...b0756a )
by Jacob
07:45
created
controller/waterfalls/PeriodListController.class.inc.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		$alias = URLDecode::getPiece(2);
27 27
 		$this->period = PeriodCollector::getByAlias($alias);
28 28
 		
29
-		if(!$this->period)
29
+		if (!$this->period)
30 30
 			$this->eject();
31 31
 		
32 32
 		parent::__construct();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	{
37 37
 		$meta_array = array();
38 38
 		
39
-		$meta_array['title'] = "Hiking Stories - {$this->period->name} | " . self::$WEBSITE_TITLE;
39
+		$meta_array['title'] = "Hiking Stories - {$this->period->name} | ".self::$WEBSITE_TITLE;
40 40
 		$meta_array['description'] = $this->period->description;
41 41
 		$meta_array['keywords'] = $this->get_keyword_array();
42 42
 		
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	{
48 48
 		$meta_array = array();
49 49
 		
50
-		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count);
50
+		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE.' | '.self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count);
51 51
 		$meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->period->name);
52 52
 		$meta_array['keywords'] = $this->get_keyword_array();
53 53
 		
Please login to merge, or discard this patch.
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -6,104 +6,104 @@
 block discarded – undo
6 6
 final class PeriodListController extends DefaultLogListController
7 7
 {
8 8
 
9
-	private static $DEFAULT_TITLE = '%s Hiking Stories, Page %d of %d';
10
-	private static $DEFAULT_DESCRIPTION = 'Page %d of %d of epic %s hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
11
-	private static $DEFAULT_HEADER = 'Page %d of Awesome %s Waterfall Hiking Stories';
9
+    private static $DEFAULT_TITLE = '%s Hiking Stories, Page %d of %d';
10
+    private static $DEFAULT_DESCRIPTION = 'Page %d of %d of epic %s hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
11
+    private static $DEFAULT_HEADER = 'Page %d of Awesome %s Waterfall Hiking Stories';
12 12
 
13
-	private static $KEYWORD_ARRAY = array(
14
-		'journal',
15
-		'stories',
16
-		'blog',
17
-		'waterfalls');
13
+    private static $KEYWORD_ARRAY = array(
14
+        'journal',
15
+        'stories',
16
+        'blog',
17
+        'waterfalls');
18 18
 
19
-	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d %PERIOD% journal entries';
20
-	private static $LINK_ROOT = '/period/%s/';
19
+    private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d %PERIOD% journal entries';
20
+    private static $LINK_ROOT = '/period/%s/';
21 21
 
22
-	private $period;
22
+    private $period;
23 23
 
24
-	public function __construct()
25
-	{
26
-		$alias = URLDecode::getPiece(2);
27
-		$this->period = PeriodCollector::getByAlias($alias);
24
+    public function __construct()
25
+    {
26
+        $alias = URLDecode::getPiece(2);
27
+        $this->period = PeriodCollector::getByAlias($alias);
28 28
 		
29
-		if(!$this->period)
30
-			$this->eject();
29
+        if(!$this->period)
30
+            $this->eject();
31 31
 		
32
-		parent::__construct();
33
-	}
32
+        parent::__construct();
33
+    }
34 34
 
35
-	protected function get_initial_meta()
36
-	{
37
-		$meta_array = array();
35
+    protected function get_initial_meta()
36
+    {
37
+        $meta_array = array();
38 38
 		
39
-		$meta_array['title'] = "Hiking Stories - {$this->period->name} | " . self::$WEBSITE_TITLE;
40
-		$meta_array['description'] = $this->period->description;
41
-		$meta_array['keywords'] = $this->get_keyword_array();
39
+        $meta_array['title'] = "Hiking Stories - {$this->period->name} | " . self::$WEBSITE_TITLE;
40
+        $meta_array['description'] = $this->period->description;
41
+        $meta_array['keywords'] = $this->get_keyword_array();
42 42
 		
43
-		return $meta_array;
44
-	}
43
+        return $meta_array;
44
+    }
45 45
 
46
-	protected function get_subsequent_meta()
47
-	{
48
-		$meta_array = array();
46
+    protected function get_subsequent_meta()
47
+    {
48
+        $meta_array = array();
49 49
 		
50
-		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count);
51
-		$meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->period->name);
52
-		$meta_array['keywords'] = $this->get_keyword_array();
50
+        $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count);
51
+        $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->period->name);
52
+        $meta_array['keywords'] = $this->get_keyword_array();
53 53
 		
54
-		return $meta_array;
55
-	}
56
-
57
-	private function get_keyword_array()
58
-	{
59
-		$keyword_array = self::$KEYWORD_ARRAY;
60
-		array_unshift($keyword_array, strtolower($this->period->name));
61
-		return $keyword_array;
62
-	}
63
-
64
-	protected function get_initial_introduction()
65
-	{
66
-		$introduction = array();
54
+        return $meta_array;
55
+    }
56
+
57
+    private function get_keyword_array()
58
+    {
59
+        $keyword_array = self::$KEYWORD_ARRAY;
60
+        array_unshift($keyword_array, strtolower($this->period->name));
61
+        return $keyword_array;
62
+    }
63
+
64
+    protected function get_initial_introduction()
65
+    {
66
+        $introduction = array();
67 67
 		
68
-		$introduction['title'] = $this->period->title;
69
-		$introduction['description'] = Content::instance('FixInternalLink', $this->period->introduction)->activate();
70
-		$introduction['image'] = $this->get_image_element($this->period->photo_category, $this->period->photo, $this->period->photo_description, 'medium');
68
+        $introduction['title'] = $this->period->title;
69
+        $introduction['description'] = Content::instance('FixInternalLink', $this->period->introduction)->activate();
70
+        $introduction['image'] = $this->get_image_element($this->period->photo_category, $this->period->photo, $this->period->photo_description, 'medium');
71 71
 		
72
-		return $introduction;
73
-	}
74
-
75
-	protected function get_subsequent_introduction()
76
-	{
77
-		return array(
78
-			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->period->name));
79
-	}
80
-
81
-	protected function get_page_number_piece()
82
-	{
83
-		return URLDecode::getPiece(3);
84
-	}
85
-
86
-	protected function get_item_result($total, $offset)
87
-	{
88
-		return PeriodCollector::getLogListForPeriod($this->period->id, $total, $offset);
89
-	}
90
-
91
-	protected function get_item_count_result()
92
-	{
93
-		return PeriodCollector::getLogCountForPeriod($this->period->id);
94
-	}
95
-
96
-	protected function get_list_description_pattern()
97
-	{
98
-		$period = $this->period->name;
99
-		$period = strtolower($period);
100
-		$navigation_description = str_replace('%PERIOD%', $period, self::$NAVIGATION_DESCRIPTION);
101
-		return $navigation_description;
102
-	}
103
-
104
-	protected function get_list_link_root()
105
-	{
106
-		return sprintf(self::$LINK_ROOT, $this->period->alias);
107
-	}
72
+        return $introduction;
73
+    }
74
+
75
+    protected function get_subsequent_introduction()
76
+    {
77
+        return array(
78
+            'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->period->name));
79
+    }
80
+
81
+    protected function get_page_number_piece()
82
+    {
83
+        return URLDecode::getPiece(3);
84
+    }
85
+
86
+    protected function get_item_result($total, $offset)
87
+    {
88
+        return PeriodCollector::getLogListForPeriod($this->period->id, $total, $offset);
89
+    }
90
+
91
+    protected function get_item_count_result()
92
+    {
93
+        return PeriodCollector::getLogCountForPeriod($this->period->id);
94
+    }
95
+
96
+    protected function get_list_description_pattern()
97
+    {
98
+        $period = $this->period->name;
99
+        $period = strtolower($period);
100
+        $navigation_description = str_replace('%PERIOD%', $period, self::$NAVIGATION_DESCRIPTION);
101
+        return $navigation_description;
102
+    }
103
+
104
+    protected function get_list_link_root()
105
+    {
106
+        return sprintf(self::$LINK_ROOT, $this->period->alias);
107
+    }
108 108
 
109 109
 }
110 110
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +27 added lines, -26 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 Loader::load('collector', 'waterfall/PeriodCollector');
4 4
 Loader::load('controller', 'waterfalls/DefaultLogListController');
5 5
 
6
-final class PeriodListController extends DefaultLogListController
7
-{
6
+final class PeriodListController extends DefaultLogListController
7
+{
8 8
 
9 9
 	private static $DEFAULT_TITLE = '%s Hiking Stories, Page %d of %d';
10 10
 	private static $DEFAULT_DESCRIPTION = 'Page %d of %d of epic %s hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
@@ -21,19 +21,20 @@  discard block
 block discarded – undo
21 21
 
22 22
 	private $period;
23 23
 
24
-	public function __construct()
25
-	{
24
+	public function __construct()
25
+	{
26 26
 		$alias = URLDecode::getPiece(2);
27 27
 		$this->period = PeriodCollector::getByAlias($alias);
28 28
 		
29
-		if(!$this->period)
30
-			$this->eject();
29
+		if(!$this->period) {
30
+					$this->eject();
31
+		}
31 32
 		
32 33
 		parent::__construct();
33 34
 	}
34 35
 
35
-	protected function get_initial_meta()
36
-	{
36
+	protected function get_initial_meta()
37
+	{
37 38
 		$meta_array = array();
38 39
 		
39 40
 		$meta_array['title'] = "Hiking Stories - {$this->period->name} | " . self::$WEBSITE_TITLE;
@@ -43,8 +44,8 @@  discard block
 block discarded – undo
43 44
 		return $meta_array;
44 45
 	}
45 46
 
46
-	protected function get_subsequent_meta()
47
-	{
47
+	protected function get_subsequent_meta()
48
+	{
48 49
 		$meta_array = array();
49 50
 		
50 51
 		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count);
@@ -54,15 +55,15 @@  discard block
 block discarded – undo
54 55
 		return $meta_array;
55 56
 	}
56 57
 
57
-	private function get_keyword_array()
58
-	{
58
+	private function get_keyword_array()
59
+	{
59 60
 		$keyword_array = self::$KEYWORD_ARRAY;
60 61
 		array_unshift($keyword_array, strtolower($this->period->name));
61 62
 		return $keyword_array;
62 63
 	}
63 64
 
64
-	protected function get_initial_introduction()
65
-	{
65
+	protected function get_initial_introduction()
66
+	{
66 67
 		$introduction = array();
67 68
 		
68 69
 		$introduction['title'] = $this->period->title;
@@ -72,37 +73,37 @@  discard block
 block discarded – undo
72 73
 		return $introduction;
73 74
 	}
74 75
 
75
-	protected function get_subsequent_introduction()
76
-	{
76
+	protected function get_subsequent_introduction()
77
+	{
77 78
 		return array(
78 79
 			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->period->name));
79 80
 	}
80 81
 
81
-	protected function get_page_number_piece()
82
-	{
82
+	protected function get_page_number_piece()
83
+	{
83 84
 		return URLDecode::getPiece(3);
84 85
 	}
85 86
 
86
-	protected function get_item_result($total, $offset)
87
-	{
87
+	protected function get_item_result($total, $offset)
88
+	{
88 89
 		return PeriodCollector::getLogListForPeriod($this->period->id, $total, $offset);
89 90
 	}
90 91
 
91
-	protected function get_item_count_result()
92
-	{
92
+	protected function get_item_count_result()
93
+	{
93 94
 		return PeriodCollector::getLogCountForPeriod($this->period->id);
94 95
 	}
95 96
 
96
-	protected function get_list_description_pattern()
97
-	{
97
+	protected function get_list_description_pattern()
98
+	{
98 99
 		$period = $this->period->name;
99 100
 		$period = strtolower($period);
100 101
 		$navigation_description = str_replace('%PERIOD%', $period, self::$NAVIGATION_DESCRIPTION);
101 102
 		return $navigation_description;
102 103
 	}
103 104
 
104
-	protected function get_list_link_root()
105
-	{
105
+	protected function get_list_link_root()
106
+	{
106 107
 		return sprintf(self::$LINK_ROOT, $this->period->alias);
107 108
 	}
108 109
 
Please login to merge, or discard this patch.
controller/waterfalls/CompanionListController.class.inc.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 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();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	{
38 38
 		$meta_array = array();
39 39
 		
40
-		$meta_array['title'] = "Hiking Stories with {$this->companion->name} | " . self::$WEBSITE_TITLE;
40
+		$meta_array['title'] = "Hiking Stories with {$this->companion->name} | ".self::$WEBSITE_TITLE;
41 41
 		$meta_array['description'] = $this->companion->description;
42 42
 		$meta_array['keywords'] = $this->get_keyword_array();
43 43
 		
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		$meta_array = array();
50 50
 		
51
-		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count);
51
+		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE.' | '.self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count);
52 52
 		$meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->companion->name);
53 53
 		$meta_array['keywords'] = $this->get_keyword_array();
54 54
 		
Please login to merge, or discard this patch.
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -6,102 +6,102 @@
 block discarded – undo
6 6
 final class CompanionListController extends DefaultLogListController
7 7
 {
8 8
 
9
-	private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d';
10
-	private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
11
-	private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s';
12
-
13
-	private static $KEYWORD_ARRAY = array(
14
-		'hiking companions',
15
-		'journal',
16
-		'stories',
17
-		'blog',
18
-		'waterfalls');
19
-
20
-	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d journal entries with %COMPANION%';
21
-	private static $LINK_ROOT = '/companion/%s/';
22
-
23
-	private $companion;
24
-
25
-	public function __construct()
26
-	{
27
-		$alias = URLDecode::getPiece(2);
28
-		$this->companion = CompanionCollector::getByAlias($alias);
9
+    private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d';
10
+    private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
11
+    private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s';
12
+
13
+    private static $KEYWORD_ARRAY = array(
14
+        'hiking companions',
15
+        'journal',
16
+        'stories',
17
+        'blog',
18
+        'waterfalls');
19
+
20
+    private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d journal entries with %COMPANION%';
21
+    private static $LINK_ROOT = '/companion/%s/';
22
+
23
+    private $companion;
24
+
25
+    public function __construct()
26
+    {
27
+        $alias = URLDecode::getPiece(2);
28
+        $this->companion = CompanionCollector::getByAlias($alias);
29 29
 		
30
-		if(!$this->companion)
31
-			$this->eject();
30
+        if(!$this->companion)
31
+            $this->eject();
32 32
 		
33
-		parent::__construct();
34
-	}
33
+        parent::__construct();
34
+    }
35 35
 
36
-	protected function get_initial_meta()
37
-	{
38
-		$meta_array = array();
36
+    protected function get_initial_meta()
37
+    {
38
+        $meta_array = array();
39 39
 		
40
-		$meta_array['title'] = "Hiking Stories with {$this->companion->name} | " . self::$WEBSITE_TITLE;
41
-		$meta_array['description'] = $this->companion->description;
42
-		$meta_array['keywords'] = $this->get_keyword_array();
40
+        $meta_array['title'] = "Hiking Stories with {$this->companion->name} | " . self::$WEBSITE_TITLE;
41
+        $meta_array['description'] = $this->companion->description;
42
+        $meta_array['keywords'] = $this->get_keyword_array();
43 43
 		
44
-		return $meta_array;
45
-	}
44
+        return $meta_array;
45
+    }
46 46
 
47
-	protected function get_subsequent_meta()
48
-	{
49
-		$meta_array = array();
47
+    protected function get_subsequent_meta()
48
+    {
49
+        $meta_array = array();
50 50
 		
51
-		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count);
52
-		$meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->companion->name);
53
-		$meta_array['keywords'] = $this->get_keyword_array();
51
+        $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count);
52
+        $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->companion->name);
53
+        $meta_array['keywords'] = $this->get_keyword_array();
54 54
 		
55
-		return $meta_array;
56
-	}
57
-
58
-	private function get_keyword_array()
59
-	{
60
-		$keyword_array = self::$KEYWORD_ARRAY;
61
-		array_unshift($keyword_array, strtolower($this->companion->name));
62
-		return $keyword_array;
63
-	}
64
-
65
-	protected function get_initial_introduction()
66
-	{
67
-		$introduction = array();
55
+        return $meta_array;
56
+    }
57
+
58
+    private function get_keyword_array()
59
+    {
60
+        $keyword_array = self::$KEYWORD_ARRAY;
61
+        array_unshift($keyword_array, strtolower($this->companion->name));
62
+        return $keyword_array;
63
+    }
64
+
65
+    protected function get_initial_introduction()
66
+    {
67
+        $introduction = array();
68 68
 		
69
-		$introduction['title'] = $this->companion->title;
70
-		$introduction['description'] = Content::instance('FixInternalLink', $this->companion->introduction)->activate();
71
-		$introduction['image'] = $this->get_image_element($this->companion->photo_category, $this->companion->photo, $this->companion->photo_description, 'medium');
69
+        $introduction['title'] = $this->companion->title;
70
+        $introduction['description'] = Content::instance('FixInternalLink', $this->companion->introduction)->activate();
71
+        $introduction['image'] = $this->get_image_element($this->companion->photo_category, $this->companion->photo, $this->companion->photo_description, 'medium');
72 72
 		
73
-		return $introduction;
74
-	}
75
-
76
-	protected function get_subsequent_introduction()
77
-	{
78
-		return array(
79
-			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->companion->name));
80
-	}
81
-
82
-	protected function get_page_number_piece()
83
-	{
84
-		return URLDecode::getPiece(3);
85
-	}
86
-
87
-	protected function get_item_result($total, $offset)
88
-	{
89
-		return CompanionCollector::getLogListForCompanion($this->companion->id, $total, $offset);
90
-	}
91
-
92
-	protected function get_item_count_result()
93
-	{
94
-		return CompanionCollector::getLogCountForCompanion($this->companion->id);
95
-	}
96
-
97
-	protected function get_list_description_pattern()
98
-	{
99
-		return str_replace('%COMPANION%', $this->companion->name, self::$NAVIGATION_DESCRIPTION);
100
-	}
101
-
102
-	protected function get_list_link_root()
103
-	{
104
-		return sprintf(self::$LINK_ROOT, $this->companion->alias);
105
-	}
73
+        return $introduction;
74
+    }
75
+
76
+    protected function get_subsequent_introduction()
77
+    {
78
+        return array(
79
+            'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->companion->name));
80
+    }
81
+
82
+    protected function get_page_number_piece()
83
+    {
84
+        return URLDecode::getPiece(3);
85
+    }
86
+
87
+    protected function get_item_result($total, $offset)
88
+    {
89
+        return CompanionCollector::getLogListForCompanion($this->companion->id, $total, $offset);
90
+    }
91
+
92
+    protected function get_item_count_result()
93
+    {
94
+        return CompanionCollector::getLogCountForCompanion($this->companion->id);
95
+    }
96
+
97
+    protected function get_list_description_pattern()
98
+    {
99
+        return str_replace('%COMPANION%', $this->companion->name, self::$NAVIGATION_DESCRIPTION);
100
+    }
101
+
102
+    protected function get_list_link_root()
103
+    {
104
+        return sprintf(self::$LINK_ROOT, $this->companion->alias);
105
+    }
106 106
 
107 107
 }
108 108
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +27 added lines, -26 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 Loader::load('collector', 'waterfall/CompanionCollector');
4 4
 Loader::load('controller', 'waterfalls/DefaultLogListController');
5 5
 
6
-final class CompanionListController extends DefaultLogListController
7
-{
6
+final class CompanionListController extends DefaultLogListController
7
+{
8 8
 
9 9
 	private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d';
10 10
 	private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
@@ -22,19 +22,20 @@  discard block
 block discarded – undo
22 22
 
23 23
 	private $companion;
24 24
 
25
-	public function __construct()
26
-	{
25
+	public function __construct()
26
+	{
27 27
 		$alias = URLDecode::getPiece(2);
28 28
 		$this->companion = CompanionCollector::getByAlias($alias);
29 29
 		
30
-		if(!$this->companion)
31
-			$this->eject();
30
+		if(!$this->companion) {
31
+					$this->eject();
32
+		}
32 33
 		
33 34
 		parent::__construct();
34 35
 	}
35 36
 
36
-	protected function get_initial_meta()
37
-	{
37
+	protected function get_initial_meta()
38
+	{
38 39
 		$meta_array = array();
39 40
 		
40 41
 		$meta_array['title'] = "Hiking Stories with {$this->companion->name} | " . self::$WEBSITE_TITLE;
@@ -44,8 +45,8 @@  discard block
 block discarded – undo
44 45
 		return $meta_array;
45 46
 	}
46 47
 
47
-	protected function get_subsequent_meta()
48
-	{
48
+	protected function get_subsequent_meta()
49
+	{
49 50
 		$meta_array = array();
50 51
 		
51 52
 		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count);
@@ -55,15 +56,15 @@  discard block
 block discarded – undo
55 56
 		return $meta_array;
56 57
 	}
57 58
 
58
-	private function get_keyword_array()
59
-	{
59
+	private function get_keyword_array()
60
+	{
60 61
 		$keyword_array = self::$KEYWORD_ARRAY;
61 62
 		array_unshift($keyword_array, strtolower($this->companion->name));
62 63
 		return $keyword_array;
63 64
 	}
64 65
 
65
-	protected function get_initial_introduction()
66
-	{
66
+	protected function get_initial_introduction()
67
+	{
67 68
 		$introduction = array();
68 69
 		
69 70
 		$introduction['title'] = $this->companion->title;
@@ -73,34 +74,34 @@  discard block
 block discarded – undo
73 74
 		return $introduction;
74 75
 	}
75 76
 
76
-	protected function get_subsequent_introduction()
77
-	{
77
+	protected function get_subsequent_introduction()
78
+	{
78 79
 		return array(
79 80
 			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->companion->name));
80 81
 	}
81 82
 
82
-	protected function get_page_number_piece()
83
-	{
83
+	protected function get_page_number_piece()
84
+	{
84 85
 		return URLDecode::getPiece(3);
85 86
 	}
86 87
 
87
-	protected function get_item_result($total, $offset)
88
-	{
88
+	protected function get_item_result($total, $offset)
89
+	{
89 90
 		return CompanionCollector::getLogListForCompanion($this->companion->id, $total, $offset);
90 91
 	}
91 92
 
92
-	protected function get_item_count_result()
93
-	{
93
+	protected function get_item_count_result()
94
+	{
94 95
 		return CompanionCollector::getLogCountForCompanion($this->companion->id);
95 96
 	}
96 97
 
97
-	protected function get_list_description_pattern()
98
-	{
98
+	protected function get_list_description_pattern()
99
+	{
99 100
 		return str_replace('%COMPANION%', $this->companion->name, self::$NAVIGATION_DESCRIPTION);
100 101
 	}
101 102
 
102
-	protected function get_list_link_root()
103
-	{
103
+	protected function get_list_link_root()
104
+	{
104 105
 		return sprintf(self::$LINK_ROOT, $this->companion->alias);
105 106
 	}
106 107
 
Please login to merge, or discard this patch.
controller/waterfalls/WaterfallListController.class.inc.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		
Please login to merge, or discard this patch.
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -1,97 +1,97 @@
 block discarded – undo
1 1
 <?
2 2
 
3 3
 Loader::load('collector', array(
4
-	'image/PhotoCollector',
5
-	'waterfall/WaterfallCollector'));
4
+    'image/PhotoCollector',
5
+    'waterfall/WaterfallCollector'));
6 6
 Loader::load('controller', 'waterfalls/DefaultWaterfallListController');
7 7
 
8 8
 final class WaterfallListController extends DefaultWaterfallListController
9 9
 {
10 10
 
11
-	private static $PRIMARY_TITLE = 'Full Listing of Falls';
12
-	private static $PRIMARY_DESCRIPTION = 'List of waterfalls found in the general Keweenaw Area, complete with photos, descriptions, directions, and maps.';
13
-	private static $PRIMARY_INTRODUCTION_HEADER = 'A Giant List of Waterfalls';
14
-	private static $PRIMARY_INTRODUCTION_IMAGE = 2212;
15
-	private static $PRIMARY_INTRODUCTION_DESCRIPTION = "Jacob has been to a lot of waterfalls. From the sandstone drops of Ontonagon to the volcanic plunges of the Huron Mountains to Keweenaw Ridge's craggy slides, he's gotten around. Some of the falls end up being surprising finds, numerous drops that are not documented anywhere else, while others end up being huge disappointments that barely warrant the long searches and planning stages.";
16
-
17
-	private static $SECONDARY_TITLE = 'Falls Listing, Page %d of %d';
18
-	private static $SECONDARY_DESCRIPTION = 'Page %d of %d of waterfalls found in the general Keweenaw area.';
19
-	private static $SECONDARY_INTRODUCTION_HEADER = 'Page %d of %d of the full waterfall listing';
20
-
21
-	private static $KEYWORD_ARRAY = array(
22
-		'journal',
23
-		'stories',
24
-		'blog',
25
-		'waterfalls',
26
-		'hiking companions');
27
-
28
-	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total waterfalls';
29
-	private static $LINK_ROOT = '/falls/';
30
-
31
-	protected function get_initial_meta()
32
-	{
33
-		$meta_array = array();
11
+    private static $PRIMARY_TITLE = 'Full Listing of Falls';
12
+    private static $PRIMARY_DESCRIPTION = 'List of waterfalls found in the general Keweenaw Area, complete with photos, descriptions, directions, and maps.';
13
+    private static $PRIMARY_INTRODUCTION_HEADER = 'A Giant List of Waterfalls';
14
+    private static $PRIMARY_INTRODUCTION_IMAGE = 2212;
15
+    private static $PRIMARY_INTRODUCTION_DESCRIPTION = "Jacob has been to a lot of waterfalls. From the sandstone drops of Ontonagon to the volcanic plunges of the Huron Mountains to Keweenaw Ridge's craggy slides, he's gotten around. Some of the falls end up being surprising finds, numerous drops that are not documented anywhere else, while others end up being huge disappointments that barely warrant the long searches and planning stages.";
16
+
17
+    private static $SECONDARY_TITLE = 'Falls Listing, Page %d of %d';
18
+    private static $SECONDARY_DESCRIPTION = 'Page %d of %d of waterfalls found in the general Keweenaw area.';
19
+    private static $SECONDARY_INTRODUCTION_HEADER = 'Page %d of %d of the full waterfall listing';
20
+
21
+    private static $KEYWORD_ARRAY = array(
22
+        'journal',
23
+        'stories',
24
+        'blog',
25
+        'waterfalls',
26
+        'hiking companions');
27
+
28
+    private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total waterfalls';
29
+    private static $LINK_ROOT = '/falls/';
30
+
31
+    protected function get_initial_meta()
32
+    {
33
+        $meta_array = array();
34 34
 		
35
-		$meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE;
36
-		$meta_array['description'] = self::$PRIMARY_DESCRIPTION;
37
-		$meta_array['keywords'] = self::$KEYWORD_ARRAY;
35
+        $meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE;
36
+        $meta_array['description'] = self::$PRIMARY_DESCRIPTION;
37
+        $meta_array['keywords'] = self::$KEYWORD_ARRAY;
38 38
 		
39
-		return $meta_array;
40
-	}
39
+        return $meta_array;
40
+    }
41 41
 
42
-	protected function get_subsequent_meta()
43
-	{
44
-		$meta_array = array();
42
+    protected function get_subsequent_meta()
43
+    {
44
+        $meta_array = array();
45 45
 		
46
-		$meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page, $this->page_count);
47
-		$meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count);
48
-		$meta_array['keywords'] = self::$KEYWORD_ARRAY;
46
+        $meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page, $this->page_count);
47
+        $meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count);
48
+        $meta_array['keywords'] = self::$KEYWORD_ARRAY;
49 49
 		
50
-		return $meta_array;
51
-	}
50
+        return $meta_array;
51
+    }
52 52
 
53
-	protected function get_initial_introduction()
54
-	{
55
-		$introduction = array();
53
+    protected function get_initial_introduction()
54
+    {
55
+        $introduction = array();
56 56
 		
57
-		$introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER;
58
-		$introduction['description'] = self::$PRIMARY_INTRODUCTION_DESCRIPTION;
57
+        $introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER;
58
+        $introduction['description'] = self::$PRIMARY_INTRODUCTION_DESCRIPTION;
59 59
 		
60
-		$image = PhotoCollector::getRow(self::$PRIMARY_INTRODUCTION_IMAGE);
61
-		$introduction['image'] = $this->get_image_element($image->category, $image->name, $image->description, 'medium');
60
+        $image = PhotoCollector::getRow(self::$PRIMARY_INTRODUCTION_IMAGE);
61
+        $introduction['image'] = $this->get_image_element($image->category, $image->name, $image->description, 'medium');
62 62
 		
63
-		return $introduction;
64
-	}
65
-
66
-	protected function get_subsequent_introduction()
67
-	{
68
-		return array(
69
-			'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count));
70
-	}
71
-
72
-	protected function get_page_number_piece()
73
-	{
74
-		return URLDecode::getPiece(2);
75
-	}
76
-
77
-	protected function get_item_result($total, $offset)
78
-	{
79
-		return WaterfallCollector::getList($total, $offset);
80
-	}
81
-
82
-	protected function get_item_count_result()
83
-	{
84
-		return WaterfallCollector::getListCount();
85
-	}
86
-
87
-	protected function get_list_description_pattern()
88
-	{
89
-		return self::$NAVIGATION_DESCRIPTION;
90
-	}
91
-
92
-	protected function get_list_link_root()
93
-	{
94
-		return self::$LINK_ROOT;
95
-	}
63
+        return $introduction;
64
+    }
65
+
66
+    protected function get_subsequent_introduction()
67
+    {
68
+        return array(
69
+            'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count));
70
+    }
71
+
72
+    protected function get_page_number_piece()
73
+    {
74
+        return URLDecode::getPiece(2);
75
+    }
76
+
77
+    protected function get_item_result($total, $offset)
78
+    {
79
+        return WaterfallCollector::getList($total, $offset);
80
+    }
81
+
82
+    protected function get_item_count_result()
83
+    {
84
+        return WaterfallCollector::getListCount();
85
+    }
86
+
87
+    protected function get_list_description_pattern()
88
+    {
89
+        return self::$NAVIGATION_DESCRIPTION;
90
+    }
91
+
92
+    protected function get_list_link_root()
93
+    {
94
+        return self::$LINK_ROOT;
95
+    }
96 96
 
97 97
 }
Please login to merge, or discard this patch.
Braces   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 	'waterfall/WaterfallCollector'));
6 6
 Loader::load('controller', 'waterfalls/DefaultWaterfallListController');
7 7
 
8
-final class WaterfallListController extends DefaultWaterfallListController
9
-{
8
+final class WaterfallListController extends DefaultWaterfallListController
9
+{
10 10
 
11 11
 	private static $PRIMARY_TITLE = 'Full Listing of Falls';
12 12
 	private static $PRIMARY_DESCRIPTION = 'List of waterfalls found in the general Keweenaw Area, complete with photos, descriptions, directions, and maps.';
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total waterfalls';
29 29
 	private static $LINK_ROOT = '/falls/';
30 30
 
31
-	protected function get_initial_meta()
32
-	{
31
+	protected function get_initial_meta()
32
+	{
33 33
 		$meta_array = array();
34 34
 		
35 35
 		$meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE;
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 		return $meta_array;
40 40
 	}
41 41
 
42
-	protected function get_subsequent_meta()
43
-	{
42
+	protected function get_subsequent_meta()
43
+	{
44 44
 		$meta_array = array();
45 45
 		
46 46
 		$meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page, $this->page_count);
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 		return $meta_array;
51 51
 	}
52 52
 
53
-	protected function get_initial_introduction()
54
-	{
53
+	protected function get_initial_introduction()
54
+	{
55 55
 		$introduction = array();
56 56
 		
57 57
 		$introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER;
@@ -63,34 +63,34 @@  discard block
 block discarded – undo
63 63
 		return $introduction;
64 64
 	}
65 65
 
66
-	protected function get_subsequent_introduction()
67
-	{
66
+	protected function get_subsequent_introduction()
67
+	{
68 68
 		return array(
69 69
 			'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count));
70 70
 	}
71 71
 
72
-	protected function get_page_number_piece()
73
-	{
72
+	protected function get_page_number_piece()
73
+	{
74 74
 		return URLDecode::getPiece(2);
75 75
 	}
76 76
 
77
-	protected function get_item_result($total, $offset)
78
-	{
77
+	protected function get_item_result($total, $offset)
78
+	{
79 79
 		return WaterfallCollector::getList($total, $offset);
80 80
 	}
81 81
 
82
-	protected function get_item_count_result()
83
-	{
82
+	protected function get_item_count_result()
83
+	{
84 84
 		return WaterfallCollector::getListCount();
85 85
 	}
86 86
 
87
-	protected function get_list_description_pattern()
88
-	{
87
+	protected function get_list_description_pattern()
88
+	{
89 89
 		return self::$NAVIGATION_DESCRIPTION;
90 90
 	}
91 91
 
92
-	protected function get_list_link_root()
93
-	{
92
+	protected function get_list_link_root()
93
+	{
94 94
 		return self::$LINK_ROOT;
95 95
 	}
96 96
 
Please login to merge, or discard this patch.
controller/waterfalls/LogListController.class.inc.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		
Please login to merge, or discard this patch.
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -1,97 +1,97 @@
 block discarded – undo
1 1
 <?
2 2
 
3 3
 Loader::load('collector', array(
4
-	'image/PhotoCollector',
5
-	'waterfall/LogCollector'));
4
+    'image/PhotoCollector',
5
+    'waterfall/LogCollector'));
6 6
 Loader::load('controller', 'waterfalls/DefaultLogListController');
7 7
 
8 8
 final class LogListController extends DefaultLogListController
9 9
 {
10 10
 
11
-	private static $PRIMARY_TITLE = 'Journal from Waterfall Hikes';
12
-	private static $PRIMARY_DESCRIPTION = 'Stories written by Jacob Emerick about his epic waterfall adventures in the general Keweenaw, Ontonagon, and Marquette areas.';
13
-	private static $PRIMARY_INTRODUCTION_HEADER = 'Journal of Waterfall Adventuring';
14
-	private static $PRIMARY_INTRODUCTION_IMAGE = 707;
15
-	private static $PRIMARY_INTRODUCTION_DESCRIPTION = 'Whether he is hiking alone through the woods, with Logan running ahead to chase down deer, or with a group of friends, every hike that Jacob sets out turns into an adventure. Hopping from slick rock to rock along a small creek in the city, splashing through deep water over an uncertain riverbed, or pushing thick branches out of the way in thick brush, every journey turns into a little story of discovery.';
16
-
17
-	private static $SECONDARY_TITLE = 'Journal Entries - Page %d';
18
-	private static $SECONDARY_DESCRIPTION = 'Page %d of %d of epic hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
19
-	private static $SECONDARY_INTRODUCTION_HEADER = 'Waterfall Adventure Journal, Page %d of %d';
20
-
21
-	private static $KEYWORD_ARRAY = array(
22
-		'journal',
23
-		'travel log',
24
-		'blog',
25
-		'waterfalls',
26
-		'hiking companions');
27
-
28
-	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total journal entries';
29
-	private static $LINK_ROOT = '/journal/';
30
-
31
-	protected function get_initial_meta()
32
-	{
33
-		$meta_array = array();
11
+    private static $PRIMARY_TITLE = 'Journal from Waterfall Hikes';
12
+    private static $PRIMARY_DESCRIPTION = 'Stories written by Jacob Emerick about his epic waterfall adventures in the general Keweenaw, Ontonagon, and Marquette areas.';
13
+    private static $PRIMARY_INTRODUCTION_HEADER = 'Journal of Waterfall Adventuring';
14
+    private static $PRIMARY_INTRODUCTION_IMAGE = 707;
15
+    private static $PRIMARY_INTRODUCTION_DESCRIPTION = 'Whether he is hiking alone through the woods, with Logan running ahead to chase down deer, or with a group of friends, every hike that Jacob sets out turns into an adventure. Hopping from slick rock to rock along a small creek in the city, splashing through deep water over an uncertain riverbed, or pushing thick branches out of the way in thick brush, every journey turns into a little story of discovery.';
16
+
17
+    private static $SECONDARY_TITLE = 'Journal Entries - Page %d';
18
+    private static $SECONDARY_DESCRIPTION = 'Page %d of %d of epic hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
19
+    private static $SECONDARY_INTRODUCTION_HEADER = 'Waterfall Adventure Journal, Page %d of %d';
20
+
21
+    private static $KEYWORD_ARRAY = array(
22
+        'journal',
23
+        'travel log',
24
+        'blog',
25
+        'waterfalls',
26
+        'hiking companions');
27
+
28
+    private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total journal entries';
29
+    private static $LINK_ROOT = '/journal/';
30
+
31
+    protected function get_initial_meta()
32
+    {
33
+        $meta_array = array();
34 34
 		
35
-		$meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE;
36
-		$meta_array['description'] = self::$PRIMARY_DESCRIPTION;
37
-		$meta_array['keywords'] = self::$KEYWORD_ARRAY;
35
+        $meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE;
36
+        $meta_array['description'] = self::$PRIMARY_DESCRIPTION;
37
+        $meta_array['keywords'] = self::$KEYWORD_ARRAY;
38 38
 		
39
-		return $meta_array;
40
-	}
39
+        return $meta_array;
40
+    }
41 41
 
42
-	protected function get_subsequent_meta()
43
-	{
44
-		$meta_array = array();
42
+    protected function get_subsequent_meta()
43
+    {
44
+        $meta_array = array();
45 45
 		
46
-		$meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page);
47
-		$meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count);
48
-		$meta_array['keywords'] = self::$KEYWORD_ARRAY;
46
+        $meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page);
47
+        $meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count);
48
+        $meta_array['keywords'] = self::$KEYWORD_ARRAY;
49 49
 		
50
-		return $meta_array;
51
-	}
50
+        return $meta_array;
51
+    }
52 52
 
53
-	protected function get_initial_introduction()
54
-	{
55
-		$introduction = array();
53
+    protected function get_initial_introduction()
54
+    {
55
+        $introduction = array();
56 56
 		
57
-		$introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER;
58
-		$introduction['description'] = self::$PRIMARY_INTRODUCTION_DESCRIPTION;
57
+        $introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER;
58
+        $introduction['description'] = self::$PRIMARY_INTRODUCTION_DESCRIPTION;
59 59
 		
60
-		$image = PhotoCollector::getRow(self::$PRIMARY_INTRODUCTION_IMAGE);
61
-		$introduction['image'] = $this->get_image_element($image->category, $image->name, $image->description, 'medium');
60
+        $image = PhotoCollector::getRow(self::$PRIMARY_INTRODUCTION_IMAGE);
61
+        $introduction['image'] = $this->get_image_element($image->category, $image->name, $image->description, 'medium');
62 62
 		
63
-		return $introduction;
64
-	}
65
-
66
-	protected function get_subsequent_introduction()
67
-	{
68
-		return array(
69
-			'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count));
70
-	}
71
-
72
-	protected function get_page_number_piece()
73
-	{
74
-		return URLDecode::getPiece(2);
75
-	}
76
-
77
-	protected function get_item_result($total, $offset)
78
-	{
79
-		return LogCollector::getList($total, $offset);
80
-	}
81
-
82
-	protected function get_item_count_result()
83
-	{
84
-		return LogCollector::getListCount();
85
-	}
86
-
87
-	protected function get_list_description_pattern()
88
-	{
89
-		return self::$NAVIGATION_DESCRIPTION;
90
-	}
91
-
92
-	protected function get_list_link_root()
93
-	{
94
-		return self::$LINK_ROOT;
95
-	}
63
+        return $introduction;
64
+    }
65
+
66
+    protected function get_subsequent_introduction()
67
+    {
68
+        return array(
69
+            'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count));
70
+    }
71
+
72
+    protected function get_page_number_piece()
73
+    {
74
+        return URLDecode::getPiece(2);
75
+    }
76
+
77
+    protected function get_item_result($total, $offset)
78
+    {
79
+        return LogCollector::getList($total, $offset);
80
+    }
81
+
82
+    protected function get_item_count_result()
83
+    {
84
+        return LogCollector::getListCount();
85
+    }
86
+
87
+    protected function get_list_description_pattern()
88
+    {
89
+        return self::$NAVIGATION_DESCRIPTION;
90
+    }
91
+
92
+    protected function get_list_link_root()
93
+    {
94
+        return self::$LINK_ROOT;
95
+    }
96 96
 
97 97
 }
98 98
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 	'waterfall/LogCollector'));
6 6
 Loader::load('controller', 'waterfalls/DefaultLogListController');
7 7
 
8
-final class LogListController extends DefaultLogListController
9
-{
8
+final class LogListController extends DefaultLogListController
9
+{
10 10
 
11 11
 	private static $PRIMARY_TITLE = 'Journal from Waterfall Hikes';
12 12
 	private static $PRIMARY_DESCRIPTION = 'Stories written by Jacob Emerick about his epic waterfall adventures in the general Keweenaw, Ontonagon, and Marquette areas.';
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total journal entries';
29 29
 	private static $LINK_ROOT = '/journal/';
30 30
 
31
-	protected function get_initial_meta()
32
-	{
31
+	protected function get_initial_meta()
32
+	{
33 33
 		$meta_array = array();
34 34
 		
35 35
 		$meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE;
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 		return $meta_array;
40 40
 	}
41 41
 
42
-	protected function get_subsequent_meta()
43
-	{
42
+	protected function get_subsequent_meta()
43
+	{
44 44
 		$meta_array = array();
45 45
 		
46 46
 		$meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page);
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 		return $meta_array;
51 51
 	}
52 52
 
53
-	protected function get_initial_introduction()
54
-	{
53
+	protected function get_initial_introduction()
54
+	{
55 55
 		$introduction = array();
56 56
 		
57 57
 		$introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER;
@@ -63,34 +63,34 @@  discard block
 block discarded – undo
63 63
 		return $introduction;
64 64
 	}
65 65
 
66
-	protected function get_subsequent_introduction()
67
-	{
66
+	protected function get_subsequent_introduction()
67
+	{
68 68
 		return array(
69 69
 			'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count));
70 70
 	}
71 71
 
72
-	protected function get_page_number_piece()
73
-	{
72
+	protected function get_page_number_piece()
73
+	{
74 74
 		return URLDecode::getPiece(2);
75 75
 	}
76 76
 
77
-	protected function get_item_result($total, $offset)
78
-	{
77
+	protected function get_item_result($total, $offset)
78
+	{
79 79
 		return LogCollector::getList($total, $offset);
80 80
 	}
81 81
 
82
-	protected function get_item_count_result()
83
-	{
82
+	protected function get_item_count_result()
83
+	{
84 84
 		return LogCollector::getListCount();
85 85
 	}
86 86
 
87
-	protected function get_list_description_pattern()
88
-	{
87
+	protected function get_list_description_pattern()
88
+	{
89 89
 		return self::$NAVIGATION_DESCRIPTION;
90 90
 	}
91 91
 
92
-	protected function get_list_link_root()
93
-	{
92
+	protected function get_list_link_root()
93
+	{
94 94
 		return self::$LINK_ROOT;
95 95
 	}
96 96
 
Please login to merge, or discard this patch.
controller/waterfalls/WatercourseListController.class.inc.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		
Please login to merge, or discard this patch.
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -6,109 +6,109 @@
 block discarded – undo
6 6
 final class WatercourseListController extends DefaultWaterfallListController
7 7
 {
8 8
 
9
-	private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d';
10
-	private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
11
-	private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s';
9
+    private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d';
10
+    private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
11
+    private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s';
12 12
 
13
-	private static $KEYWORD_ARRAY = array(
14
-		'hiking companions',
15
-		'journal',
16
-		'stories',
17
-		'blog',
18
-		'waterfalls');
13
+    private static $KEYWORD_ARRAY = array(
14
+        'hiking companions',
15
+        'journal',
16
+        'stories',
17
+        'blog',
18
+        'waterfalls');
19 19
 
20
-	private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d waterfalls in %COUNTY%';
21
-	private static $LINK_ROOT = '/%s/';
20
+    private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d waterfalls in %COUNTY%';
21
+    private static $LINK_ROOT = '/%s/';
22 22
 
23
-	protected static $ITEM_COUNT_PER_PAGE = 12;
23
+    protected static $ITEM_COUNT_PER_PAGE = 12;
24 24
 
25
-	private $watercourse;
25
+    private $watercourse;
26 26
 
27
-	public function __construct()
28
-	{
29
-		$path = URLDecode::getPiece(1);
30
-		$this->watercourse = WatercourseCollector::getByAlias($path);
27
+    public function __construct()
28
+    {
29
+        $path = URLDecode::getPiece(1);
30
+        $this->watercourse = WatercourseCollector::getByAlias($path);
31 31
 		
32
-		if(!$this->watercourse)
33
-			$this->eject();
32
+        if(!$this->watercourse)
33
+            $this->eject();
34 34
 	
35
-		parent::__construct();
36
-	}
35
+        parent::__construct();
36
+    }
37 37
 
38
-	protected function get_initial_meta()
39
-	{
40
-		$meta_array = array();
38
+    protected function get_initial_meta()
39
+    {
40
+        $meta_array = array();
41 41
 		
42
-		$meta_array['title'] = "{$this->watercourse->name} | " . self::$WEBSITE_TITLE;
43
-		$meta_array['description'] = $this->watercourse->description;
44
-		$meta_array['keywords'] = $this->get_keyword_array();
42
+        $meta_array['title'] = "{$this->watercourse->name} | " . self::$WEBSITE_TITLE;
43
+        $meta_array['description'] = $this->watercourse->description;
44
+        $meta_array['keywords'] = $this->get_keyword_array();
45 45
 		
46
-		return $meta_array;
47
-	}
46
+        return $meta_array;
47
+    }
48 48
 
49
-	protected function get_subsequent_meta()
50
-	{
51
-		$meta_array = array();
49
+    protected function get_subsequent_meta()
50
+    {
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);
54
-		$meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->watercourse->name);
55
-		$meta_array['keywords'] = $this->get_keyword_array();
53
+        $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->watercourse->name, $this->page, $this->page_count);
54
+        $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->watercourse->name);
55
+        $meta_array['keywords'] = $this->get_keyword_array();
56 56
 		
57
-		return $meta_array;
58
-	}
59
-
60
-	private function get_keyword_array()
61
-	{
62
-		$keyword_array = self::$KEYWORD_ARRAY;
63
-		array_unshift($keyword_array, strtolower($this->watercourse->name));
64
-		return $keyword_array;
65
-	}
66
-
67
-	protected function get_initial_introduction()
68
-	{
69
-		$introduction = array();
57
+        return $meta_array;
58
+    }
59
+
60
+    private function get_keyword_array()
61
+    {
62
+        $keyword_array = self::$KEYWORD_ARRAY;
63
+        array_unshift($keyword_array, strtolower($this->watercourse->name));
64
+        return $keyword_array;
65
+    }
66
+
67
+    protected function get_initial_introduction()
68
+    {
69
+        $introduction = array();
70 70
 		
71
-		$introduction['title'] = $this->watercourse->header;
72
-		$introduction['description'] = Content::instance('FixInternalLink', $this->watercourse->introduction)->activate();
73
-		$introduction['image'] = $this->get_image_element($this->watercourse->photo_category, $this->watercourse->photo, $this->watercourse->photo_description, 'medium');
71
+        $introduction['title'] = $this->watercourse->header;
72
+        $introduction['description'] = Content::instance('FixInternalLink', $this->watercourse->introduction)->activate();
73
+        $introduction['image'] = $this->get_image_element($this->watercourse->photo_category, $this->watercourse->photo, $this->watercourse->photo_description, 'medium');
74 74
 		
75
-		return $introduction;
76
-	}
77
-
78
-	protected function get_subsequent_introduction()
79
-	{
80
-		return array(
81
-			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->watercourse->name));
82
-	}
83
-
84
-	protected function get_item_count_per_page()
85
-	{
86
-		return self::$ITEM_COUNT_PER_PAGE;
87
-	}
88
-
89
-	protected function get_page_number_piece()
90
-	{
91
-		return URLDecode::getPiece(2);
92
-	}
93
-
94
-	protected function get_item_result($total, $offset)
95
-	{
96
-		return WatercourseCollector::getLogListForWatercourse($this->watercourse->id, $total, $offset);
97
-	}
98
-
99
-	protected function get_item_count_result()
100
-	{
101
-		return WatercourseCollector::getLogCountForWatercourse($this->watercourse->id);
102
-	}
103
-
104
-	protected function get_list_description_pattern()
105
-	{
106
-		return str_replace('%COUNTY%', $this->watercourse->name, self::$NAVIGATION_DESCRIPTION);
107
-	}
108
-
109
-	protected function get_list_link_root()
110
-	{
111
-		return sprintf(self::$LINK_ROOT, $this->watercourse->alias);
112
-	}
75
+        return $introduction;
76
+    }
77
+
78
+    protected function get_subsequent_introduction()
79
+    {
80
+        return array(
81
+            'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->watercourse->name));
82
+    }
83
+
84
+    protected function get_item_count_per_page()
85
+    {
86
+        return self::$ITEM_COUNT_PER_PAGE;
87
+    }
88
+
89
+    protected function get_page_number_piece()
90
+    {
91
+        return URLDecode::getPiece(2);
92
+    }
93
+
94
+    protected function get_item_result($total, $offset)
95
+    {
96
+        return WatercourseCollector::getLogListForWatercourse($this->watercourse->id, $total, $offset);
97
+    }
98
+
99
+    protected function get_item_count_result()
100
+    {
101
+        return WatercourseCollector::getLogCountForWatercourse($this->watercourse->id);
102
+    }
103
+
104
+    protected function get_list_description_pattern()
105
+    {
106
+        return str_replace('%COUNTY%', $this->watercourse->name, self::$NAVIGATION_DESCRIPTION);
107
+    }
108
+
109
+    protected function get_list_link_root()
110
+    {
111
+        return sprintf(self::$LINK_ROOT, $this->watercourse->alias);
112
+    }
113 113
 
114 114
 }
115 115
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +29 added lines, -28 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 Loader::load('collector', 'waterfall/WaterfallCollector');
4 4
 Loader::load('controller', 'waterfalls/DefaultWaterfallListController');
5 5
 
6
-final class WatercourseListController extends DefaultWaterfallListController
7
-{
6
+final class WatercourseListController extends DefaultWaterfallListController
7
+{
8 8
 
9 9
 	private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d';
10 10
 	private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan';
@@ -24,19 +24,20 @@  discard block
 block discarded – undo
24 24
 
25 25
 	private $watercourse;
26 26
 
27
-	public function __construct()
28
-	{
27
+	public function __construct()
28
+	{
29 29
 		$path = URLDecode::getPiece(1);
30 30
 		$this->watercourse = WatercourseCollector::getByAlias($path);
31 31
 		
32
-		if(!$this->watercourse)
33
-			$this->eject();
32
+		if(!$this->watercourse) {
33
+					$this->eject();
34
+		}
34 35
 	
35 36
 		parent::__construct();
36 37
 	}
37 38
 
38
-	protected function get_initial_meta()
39
-	{
39
+	protected function get_initial_meta()
40
+	{
40 41
 		$meta_array = array();
41 42
 		
42 43
 		$meta_array['title'] = "{$this->watercourse->name} | " . self::$WEBSITE_TITLE;
@@ -46,8 +47,8 @@  discard block
 block discarded – undo
46 47
 		return $meta_array;
47 48
 	}
48 49
 
49
-	protected function get_subsequent_meta()
50
-	{
50
+	protected function get_subsequent_meta()
51
+	{
51 52
 		$meta_array = array();
52 53
 		
53 54
 		$meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->watercourse->name, $this->page, $this->page_count);
@@ -57,15 +58,15 @@  discard block
 block discarded – undo
57 58
 		return $meta_array;
58 59
 	}
59 60
 
60
-	private function get_keyword_array()
61
-	{
61
+	private function get_keyword_array()
62
+	{
62 63
 		$keyword_array = self::$KEYWORD_ARRAY;
63 64
 		array_unshift($keyword_array, strtolower($this->watercourse->name));
64 65
 		return $keyword_array;
65 66
 	}
66 67
 
67
-	protected function get_initial_introduction()
68
-	{
68
+	protected function get_initial_introduction()
69
+	{
69 70
 		$introduction = array();
70 71
 		
71 72
 		$introduction['title'] = $this->watercourse->header;
@@ -75,39 +76,39 @@  discard block
 block discarded – undo
75 76
 		return $introduction;
76 77
 	}
77 78
 
78
-	protected function get_subsequent_introduction()
79
-	{
79
+	protected function get_subsequent_introduction()
80
+	{
80 81
 		return array(
81 82
 			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->watercourse->name));
82 83
 	}
83 84
 
84
-	protected function get_item_count_per_page()
85
-	{
85
+	protected function get_item_count_per_page()
86
+	{
86 87
 		return self::$ITEM_COUNT_PER_PAGE;
87 88
 	}
88 89
 
89
-	protected function get_page_number_piece()
90
-	{
90
+	protected function get_page_number_piece()
91
+	{
91 92
 		return URLDecode::getPiece(2);
92 93
 	}
93 94
 
94
-	protected function get_item_result($total, $offset)
95
-	{
95
+	protected function get_item_result($total, $offset)
96
+	{
96 97
 		return WatercourseCollector::getLogListForWatercourse($this->watercourse->id, $total, $offset);
97 98
 	}
98 99
 
99
-	protected function get_item_count_result()
100
-	{
100
+	protected function get_item_count_result()
101
+	{
101 102
 		return WatercourseCollector::getLogCountForWatercourse($this->watercourse->id);
102 103
 	}
103 104
 
104
-	protected function get_list_description_pattern()
105
-	{
105
+	protected function get_list_description_pattern()
106
+	{
106 107
 		return str_replace('%COUNTY%', $this->watercourse->name, self::$NAVIGATION_DESCRIPTION);
107 108
 	}
108 109
 
109
-	protected function get_list_link_root()
110
-	{
110
+	protected function get_list_link_root()
111
+	{
111 112
 		return sprintf(self::$LINK_ROOT, $this->watercourse->alias);
112 113
 	}
113 114
 
Please login to merge, or discard this patch.
controller/home/ContactController.class.inc.php 3 patches
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.
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -5,73 +5,73 @@
 block discarded – undo
5 5
 final class ContactController extends DefaultPageController
6 6
 {
7 7
 
8
-	private static $TITLE = 'Contact | Jacob Emerick';
9
-	private static $DESCRIPTION = 'Contact page to reach Jacob Emerick by email or social networks';
8
+    private static $TITLE = 'Contact | Jacob Emerick';
9
+    private static $DESCRIPTION = 'Contact page to reach Jacob Emerick by email or social networks';
10 10
 
11
-	private static $KEYWORD_ARRAY = array(
12
-		'Jacob Emerick',
13
-		'jacobemerick',
14
-		'jpemeric',
15
-		'contact',
16
-		'email',
17
-		'connect');
11
+    private static $KEYWORD_ARRAY = array(
12
+        'Jacob Emerick',
13
+        'jacobemerick',
14
+        'jpemeric',
15
+        'contact',
16
+        'email',
17
+        'connect');
18 18
 
19
-	protected function set_head_data()
20
-	{
21
-		$this->set_title(self::$TITLE);
22
-		$this->set_description(self::$DESCRIPTION);
23
-		$this->set_keywords(self::$KEYWORD_ARRAY);
19
+    protected function set_head_data()
20
+    {
21
+        $this->set_title(self::$TITLE);
22
+        $this->set_description(self::$DESCRIPTION);
23
+        $this->set_keywords(self::$KEYWORD_ARRAY);
24 24
 		
25
-		parent::set_head_data();
26
-	}
25
+        parent::set_head_data();
26
+    }
27 27
 
28
-	protected function set_body_data()
29
-	{
30
-		$this->set_body('form_container', $this->process_form());
31
-		$this->set_body_view('Contact');
28
+    protected function set_body_data()
29
+    {
30
+        $this->set_body('form_container', $this->process_form());
31
+        $this->set_body_view('Contact');
32 32
 		
33
-		parent::set_body_data();
34
-	}
33
+        parent::set_body_data();
34
+    }
35 35
 
36
-	private function process_form()
37
-	{
38
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
39
-			return (object) array('display' => 'normal');
36
+    private function process_form()
37
+    {
38
+        if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
39
+            return (object) array('display' => 'normal');
40 40
 		
41
-		Loader::load('utility', 'Validate');
42
-		$error_result = array();
43
-		if(!Validate::checkRequest('post', 'name', 'string'))
44
-			$error_result['name'] = 'please enter your name';
45
-		if(!Validate::checkRequest('post', 'email', 'string'))
46
-			$error_result['email'] = 'please enter a valid email';
47
-		if(!Validate::checkRequest('post', 'message', 'string'))
48
-			$error_result['message'] = 'please write a message';
41
+        Loader::load('utility', 'Validate');
42
+        $error_result = array();
43
+        if(!Validate::checkRequest('post', 'name', 'string'))
44
+            $error_result['name'] = 'please enter your name';
45
+        if(!Validate::checkRequest('post', 'email', 'string'))
46
+            $error_result['email'] = 'please enter a valid email';
47
+        if(!Validate::checkRequest('post', 'message', 'string'))
48
+            $error_result['message'] = 'please write a message';
49 49
 		
50
-		$values = (object) array(
51
-			'name' => Request::getPost('name'),
52
-			'email' => Request::getPost('email'),
53
-			'message' => Request::getPost('message'));
50
+        $values = (object) array(
51
+            'name' => Request::getPost('name'),
52
+            'email' => Request::getPost('email'),
53
+            'message' => Request::getPost('message'));
54 54
 		
55
-		if(count($error_result) > 0)
56
-		{
57
-			return (object) array(
58
-				'display' => 'error',
59
-				'messages' => $error_result,
60
-				'values' => $values);
61
-		}
55
+        if(count($error_result) > 0)
56
+        {
57
+            return (object) array(
58
+                'display' => 'error',
59
+                'messages' => $error_result,
60
+                'values' => $values);
61
+        }
62 62
 
63 63
     global $container;
64 64
     $sent = $container['mail']
65
-      ->addTo($container['config']->admin_email)
66
-      ->setSubject('Home Page Contact')
67
-      ->setPlainMessage(
65
+        ->addTo($container['config']->admin_email)
66
+        ->setSubject('Home Page Contact')
67
+        ->setPlainMessage(
68 68
         "Name: {$values->name}\n" .
69 69
         "Email: {$values->email}\n" .
70 70
         "Message: {$values->message}"
71
-      )
72
-      ->send();		
71
+        )
72
+        ->send();		
73 73
 
74
-		return (object) array('display' => 'success');
75
-	}
74
+        return (object) array('display' => 'success');
75
+    }
76 76
 
77 77
 }
Please login to merge, or discard this patch.
Braces   +20 added lines, -16 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 Loader::load('controller', 'home/DefaultPageController');
4 4
 
5
-final class ContactController extends DefaultPageController
6
-{
5
+final class ContactController extends DefaultPageController
6
+{
7 7
 
8 8
 	private static $TITLE = 'Contact | Jacob Emerick';
9 9
 	private static $DESCRIPTION = 'Contact page to reach Jacob Emerick by email or social networks';
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 		'email',
17 17
 		'connect');
18 18
 
19
-	protected function set_head_data()
20
-	{
19
+	protected function set_head_data()
20
+	{
21 21
 		$this->set_title(self::$TITLE);
22 22
 		$this->set_description(self::$DESCRIPTION);
23 23
 		$this->set_keywords(self::$KEYWORD_ARRAY);
@@ -25,27 +25,31 @@  discard block
 block discarded – undo
25 25
 		parent::set_head_data();
26 26
 	}
27 27
 
28
-	protected function set_body_data()
29
-	{
28
+	protected function set_body_data()
29
+	{
30 30
 		$this->set_body('form_container', $this->process_form());
31 31
 		$this->set_body_view('Contact');
32 32
 		
33 33
 		parent::set_body_data();
34 34
 	}
35 35
 
36
-	private function process_form()
37
-	{
38
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
39
-			return (object) array('display' => 'normal');
36
+	private function process_form()
37
+	{
38
+		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') {
39
+					return (object) array('display' => 'normal');
40
+		}
40 41
 		
41 42
 		Loader::load('utility', 'Validate');
42 43
 		$error_result = array();
43
-		if(!Validate::checkRequest('post', 'name', 'string'))
44
-			$error_result['name'] = 'please enter your name';
45
-		if(!Validate::checkRequest('post', 'email', 'string'))
46
-			$error_result['email'] = 'please enter a valid email';
47
-		if(!Validate::checkRequest('post', 'message', 'string'))
48
-			$error_result['message'] = 'please write a message';
44
+		if(!Validate::checkRequest('post', 'name', 'string')) {
45
+					$error_result['name'] = 'please enter your name';
46
+		}
47
+		if(!Validate::checkRequest('post', 'email', 'string')) {
48
+					$error_result['email'] = 'please enter a valid email';
49
+		}
50
+		if(!Validate::checkRequest('post', 'message', 'string')) {
51
+					$error_result['message'] = 'please write a message';
52
+		}
49 53
 		
50 54
 		$values = (object) array(
51 55
 			'name' => Request::getPost('name'),
Please login to merge, or discard this patch.
controller/home/HomeController.class.inc.php 3 patches
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.
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -8,58 +8,58 @@
 block discarded – undo
8 8
 final class HomeController extends DefaultPageController
9 9
 {
10 10
 
11
-	private static $TITLE = "Jacob Emerick's Home | Web Developer, Hiker, Innovator";
12
-	private static $DESCRIPTION = 'Home page for Jacob Emerick, with links to his blog, waterfall site, and other side projects';
11
+    private static $TITLE = "Jacob Emerick's Home | Web Developer, Hiker, Innovator";
12
+    private static $DESCRIPTION = 'Home page for Jacob Emerick, with links to his blog, waterfall site, and other side projects';
13 13
 
14
-	private static $KEYWORD_ARRAY = array(
15
-		'Jacob Emerick',
16
-		'jacobemerick',
17
-		'jpemeric',
18
-		'home',
19
-		'web developer',
20
-		'hiker',
21
-		'application programmer',
22
-		'innovator');
14
+    private static $KEYWORD_ARRAY = array(
15
+        'Jacob Emerick',
16
+        'jacobemerick',
17
+        'jpemeric',
18
+        'home',
19
+        'web developer',
20
+        'hiker',
21
+        'application programmer',
22
+        'innovator');
23 23
 
24
-	private static $POST_LENGTH_SHORT = 160;
25
-	private static $POST_LENGTH_LONG = 240;
24
+    private static $POST_LENGTH_SHORT = 160;
25
+    private static $POST_LENGTH_LONG = 240;
26 26
 
27
-	protected function set_head_data()
28
-	{
29
-		$this->set_title(self::$TITLE);
30
-		$this->set_description(self::$DESCRIPTION);
31
-		$this->set_keywords(self::$KEYWORD_ARRAY);
27
+    protected function set_head_data()
28
+    {
29
+        $this->set_title(self::$TITLE);
30
+        $this->set_description(self::$DESCRIPTION);
31
+        $this->set_keywords(self::$KEYWORD_ARRAY);
32 32
 		
33
-		parent::set_head_data();
34
-	}
33
+        parent::set_head_data();
34
+    }
35 35
 
36
-	protected function set_body_data()
37
-	{
38
-		$this->set_body('post_array', $this->get_recent_posts());
39
-		$this->set_body_view('Home');
36
+    protected function set_body_data()
37
+    {
38
+        $this->set_body('post_array', $this->get_recent_posts());
39
+        $this->set_body_view('Home');
40 40
 		
41
-		parent::set_body_data();
42
-	}
41
+        parent::set_body_data();
42
+    }
43 43
 
44
-	private function get_recent_posts()
45
-	{
44
+    private function get_recent_posts()
45
+    {
46 46
     global $container;
47 47
     $postRepository = new MysqlPostRepository($container['db_connection_locator']);
48 48
     $recentPosts = $postRepository->getActivePosts(3);
49 49
 
50
-		$recent_post_array = array();
51
-		foreach($recentPosts as $postResult)
52
-		{
53
-			$post = new stdclass();
54
-			$post->title = $postResult['title'];
55
-			$post->url = Loader::getRootUrl('blog') . "{$postResult['category']}/{$postResult['path']}/";
56
-			$post->category = ucwords(str_replace('-', ' ', $postResult['category']));
57
-			$post->thumb = Content::instance('FetchFirstPhoto', $postResult['body'])->activate();
58
-			$post->body = Content::instance('SmartTrim', $postResult['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG);
50
+        $recent_post_array = array();
51
+        foreach($recentPosts as $postResult)
52
+        {
53
+            $post = new stdclass();
54
+            $post->title = $postResult['title'];
55
+            $post->url = Loader::getRootUrl('blog') . "{$postResult['category']}/{$postResult['path']}/";
56
+            $post->category = ucwords(str_replace('-', ' ', $postResult['category']));
57
+            $post->thumb = Content::instance('FetchFirstPhoto', $postResult['body'])->activate();
58
+            $post->body = Content::instance('SmartTrim', $postResult['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG);
59 59
 						
60
-			$recent_post_array[] = $post;
61
-		}
62
-		return $recent_post_array;
63
-	}
60
+            $recent_post_array[] = $post;
61
+        }
62
+        return $recent_post_array;
63
+    }
64 64
 
65 65
 }
Please login to merge, or discard this patch.
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 Loader::load('controller', 'home/DefaultPageController');
6 6
 Loader::load('utility', 'Content');
7 7
 
8
-final class HomeController extends DefaultPageController
9
-{
8
+final class HomeController extends DefaultPageController
9
+{
10 10
 
11 11
 	private static $TITLE = "Jacob Emerick's Home | Web Developer, Hiker, Innovator";
12 12
 	private static $DESCRIPTION = 'Home page for Jacob Emerick, with links to his blog, waterfall site, and other side projects';
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 	private static $POST_LENGTH_SHORT = 160;
25 25
 	private static $POST_LENGTH_LONG = 240;
26 26
 
27
-	protected function set_head_data()
28
-	{
27
+	protected function set_head_data()
28
+	{
29 29
 		$this->set_title(self::$TITLE);
30 30
 		$this->set_description(self::$DESCRIPTION);
31 31
 		$this->set_keywords(self::$KEYWORD_ARRAY);
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
 		parent::set_head_data();
34 34
 	}
35 35
 
36
-	protected function set_body_data()
37
-	{
36
+	protected function set_body_data()
37
+	{
38 38
 		$this->set_body('post_array', $this->get_recent_posts());
39 39
 		$this->set_body_view('Home');
40 40
 		
41 41
 		parent::set_body_data();
42 42
 	}
43 43
 
44
-	private function get_recent_posts()
45
-	{
44
+	private function get_recent_posts()
45
+	{
46 46
     global $container;
47 47
     $postRepository = new MysqlPostRepository($container['db_connection_locator']);
48 48
     $recentPosts = $postRepository->getActivePosts(3);
Please login to merge, or discard this patch.
controller/blog/TagController.class.inc.php 3 patches
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.
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -5,136 +5,136 @@
 block discarded – undo
5 5
 final class TagController extends DefaultListController
6 6
 {
7 7
 
8
-	private static $TITLE_MAIN = "%s Tag | Jacob Emerick's Blog";
9
-	private static $DESCRIPTION_MAIN = "Posts tagged with %s on Jacob Emerick's Blog, a website about Upper Peninsula hiking and web development best practices.";
8
+    private static $TITLE_MAIN = "%s Tag | Jacob Emerick's Blog";
9
+    private static $DESCRIPTION_MAIN = "Posts tagged with %s on Jacob Emerick's Blog, a website about Upper Peninsula hiking and web development best practices.";
10 10
 
11
-	private static $TITLE_PAGINATED = "%s - Page %d of %d | Jacob Emerick's Blog";
12
-	private static $DESCRIPTION_PAGINATED = "Page %d of %d with posts tagged with %s on Jacob Emerick's Blog, a website about the hiking and development adventures of a young man.";
11
+    private static $TITLE_PAGINATED = "%s - Page %d of %d | Jacob Emerick's Blog";
12
+    private static $DESCRIPTION_PAGINATED = "Page %d of %d with posts tagged with %s on Jacob Emerick's Blog, a website about the hiking and development adventures of a young man.";
13 13
 
14
-	private static $KEYWORD_ARRAY = array(
15
-		'hiking',
16
-		'web development',
17
-		'blog',
18
-		'Jacob Emerick');
14
+    private static $KEYWORD_ARRAY = array(
15
+        'hiking',
16
+        'web development',
17
+        'blog',
18
+        'Jacob Emerick');
19 19
 
20
-	private static $LIST_DESCRIPTION = 'Viewing %d - %d of %d posts tagged with %s.';
20
+    private static $LIST_DESCRIPTION = 'Viewing %d - %d of %d posts tagged with %s.';
21 21
 
22
-	private $tag;
22
+    private $tag;
23 23
 
24
-	public function __construct()
25
-	{
26
-		$tag = URLDecode::getPiece(2);
27
-		$tag = str_replace('-', ' ', $tag);
24
+    public function __construct()
25
+    {
26
+        $tag = URLDecode::getPiece(2);
27
+        $tag = str_replace('-', ' ', $tag);
28 28
 
29 29
         global $container;
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)
34
-			$this->eject();
33
+        if($tag_result === false)
34
+            $this->eject();
35 35
 		
36
-		$this->tag = $tag_result;
36
+        $this->tag = $tag_result;
37 37
 		
38
-		parent::__construct();
39
-	}
38
+        parent::__construct();
39
+    }
40 40
 
41
-	protected function set_head_data()
42
-	{
43
-		parent::set_head_data();
41
+    protected function set_head_data()
42
+    {
43
+        parent::set_head_data();
44 44
 		
45
-		if($this->page == 1)
46
-		{
47
-			$this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->tag['tag'])));
48
-			$this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->tag['tag'])));
49
-		}
50
-		else
51
-		{
52
-			$this->set_title(sprintf(self::$TITLE_PAGINATED, ucwords($this->tag['tag']), $this->page, $this->total_pages));
53
-			$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED, $this->page, $this->total_pages, ucwords($this->tag['tag'])));
54
-		}
45
+        if($this->page == 1)
46
+        {
47
+            $this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->tag['tag'])));
48
+            $this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->tag['tag'])));
49
+        }
50
+        else
51
+        {
52
+            $this->set_title(sprintf(self::$TITLE_PAGINATED, ucwords($this->tag['tag']), $this->page, $this->total_pages));
53
+            $this->set_description(sprintf(self::$DESCRIPTION_PAGINATED, $this->page, $this->total_pages, ucwords($this->tag['tag'])));
54
+        }
55 55
 		
56
-		$keyword_array = self::$KEYWORD_ARRAY;
57
-		array_unshift($keyword_array, $this->tag['tag']);
58
-		$this->set_keywords($keyword_array);
59
-	}
60
-
61
-	protected function get_introduction()
62
-	{
63
-		$tag = ucwords($this->tag['tag']);
56
+        $keyword_array = self::$KEYWORD_ARRAY;
57
+        array_unshift($keyword_array, $this->tag['tag']);
58
+        $this->set_keywords($keyword_array);
59
+    }
60
+
61
+    protected function get_introduction()
62
+    {
63
+        $tag = ucwords($this->tag['tag']);
64 64
 		
65
-		if($this->page == 1)
66
-		{
65
+        if($this->page == 1)
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)
72
-			{
73
-				$introduction = array();
74
-				$introduction['title'] = $introduction_result['title'];
75
-				$introduction['content'] = $introduction_result['content'];
76
-				$introduction['image'] = $this->get_introduction_image($introduction_result['image']);
71
+            if($introduction_result !== false)
72
+            {
73
+                $introduction = array();
74
+                $introduction['title'] = $introduction_result['title'];
75
+                $introduction['content'] = $introduction_result['content'];
76
+                $introduction['image'] = $this->get_introduction_image($introduction_result['image']);
77 77
 				
78
-				return $introduction;
79
-			}
78
+                return $introduction;
79
+            }
80 80
 			
81
-			return array(
82
-				'title' => "Viewing posts about {$tag}.");
83
-		}
81
+            return array(
82
+                'title' => "Viewing posts about {$tag}.");
83
+        }
84 84
 		
85
-		return array(
86
-			'title' => "{$tag} posts, page {$this->page} of {$this->total_pages}.");
87
-	}
88
-
89
-	protected function get_page_number()
90
-	{
91
-		$page = URLDecode::getPiece(3);
92
-		if(isset($page) && is_numeric($page))
93
-			return $page;
94
-		return 1;
95
-	}
96
-
97
-	protected function get_list_results()
98
-	{
85
+        return array(
86
+            'title' => "{$tag} posts, page {$this->page} of {$this->total_pages}.");
87
+    }
88
+
89
+    protected function get_page_number()
90
+    {
91
+        $page = URLDecode::getPiece(3);
92
+        if(isset($page) && is_numeric($page))
93
+            return $page;
94
+        return 1;
95
+    }
96
+
97
+    protected function get_list_results()
98
+    {
99 99
         global $container;
100 100
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
101 101
         return $repository->getActivePostsByTag($this->tag['id'], self::$POSTS_PER_PAGE, $this->offset);
102
-	}
102
+    }
103 103
 
104
-	protected function get_list_description()
105
-	{
106
-		$start = $this->offset + 1;
107
-		$end = min($this->offset + self::$POSTS_PER_PAGE, $this->get_total_post_count());
104
+    protected function get_list_description()
105
+    {
106
+        $start = $this->offset + 1;
107
+        $end = min($this->offset + self::$POSTS_PER_PAGE, $this->get_total_post_count());
108 108
 		
109
-		return sprintf(self::$LIST_DESCRIPTION, $start, $end, $this->get_total_post_count(), $this->tag['tag']);
110
-	}
111
-
112
-	protected function get_list_next_link()
113
-	{
114
-		if($this->page == 1)
115
-			return;
116
-		if($this->page == 2)
117
-			return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/")->activate();
118
-		return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page - 1) . '/')->activate();
119
-	}
120
-
121
-	protected function get_list_prev_link()
122
-	{
123
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
124
-			return;
125
-		return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page + 1) . '/')->activate();
126
-	}
127
-
128
-	private $total_post_count;
129
-	protected function get_total_post_count()
130
-	{
131
-		if(!isset($this->total_post_count)) {
109
+        return sprintf(self::$LIST_DESCRIPTION, $start, $end, $this->get_total_post_count(), $this->tag['tag']);
110
+    }
111
+
112
+    protected function get_list_next_link()
113
+    {
114
+        if($this->page == 1)
115
+            return;
116
+        if($this->page == 2)
117
+            return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/")->activate();
118
+        return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page - 1) . '/')->activate();
119
+    }
120
+
121
+    protected function get_list_prev_link()
122
+    {
123
+        if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
124
+            return;
125
+        return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page + 1) . '/')->activate();
126
+    }
127
+
128
+    private $total_post_count;
129
+    protected function get_total_post_count()
130
+    {
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']);
135 135
     }
136 136
 
137
-		return $this->total_post_count;
138
-	}
137
+        return $this->total_post_count;
138
+    }
139 139
 
140 140
 }
Please login to merge, or discard this patch.
Braces   +36 added lines, -32 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 Loader::load('controller', 'blog/DefaultListController');
4 4
 
5
-final class TagController extends DefaultListController
6
-{
5
+final class TagController extends DefaultListController
6
+{
7 7
 
8 8
 	private static $TITLE_MAIN = "%s Tag | Jacob Emerick's Blog";
9 9
 	private static $DESCRIPTION_MAIN = "Posts tagged with %s on Jacob Emerick's Blog, a website about Upper Peninsula hiking and web development best practices.";
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 
22 22
 	private $tag;
23 23
 
24
-	public function __construct()
25
-	{
24
+	public function __construct()
25
+	{
26 26
 		$tag = URLDecode::getPiece(2);
27 27
 		$tag = str_replace('-', ' ', $tag);
28 28
 
@@ -30,24 +30,24 @@  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)
34
-			$this->eject();
33
+		if($tag_result === false) {
34
+					$this->eject();
35
+		}
35 36
 		
36 37
 		$this->tag = $tag_result;
37 38
 		
38 39
 		parent::__construct();
39 40
 	}
40 41
 
41
-	protected function set_head_data()
42
-	{
42
+	protected function set_head_data()
43
+	{
43 44
 		parent::set_head_data();
44 45
 		
45 46
 		if($this->page == 1)
46 47
 		{
47 48
 			$this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->tag['tag'])));
48 49
 			$this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->tag['tag'])));
49
-		}
50
-		else
50
+		} else
51 51
 		{
52 52
 			$this->set_title(sprintf(self::$TITLE_PAGINATED, ucwords($this->tag['tag']), $this->page, $this->total_pages));
53 53
 			$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED, $this->page, $this->total_pages, ucwords($this->tag['tag'])));
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 		$this->set_keywords($keyword_array);
59 59
 	}
60 60
 
61
-	protected function get_introduction()
62
-	{
61
+	protected function get_introduction()
62
+	{
63 63
 		$tag = ucwords($this->tag['tag']);
64 64
 		
65 65
 		if($this->page == 1)
@@ -86,48 +86,52 @@  discard block
 block discarded – undo
86 86
 			'title' => "{$tag} posts, page {$this->page} of {$this->total_pages}.");
87 87
 	}
88 88
 
89
-	protected function get_page_number()
90
-	{
89
+	protected function get_page_number()
90
+	{
91 91
 		$page = URLDecode::getPiece(3);
92
-		if(isset($page) && is_numeric($page))
93
-			return $page;
92
+		if(isset($page) && is_numeric($page)) {
93
+					return $page;
94
+		}
94 95
 		return 1;
95 96
 	}
96 97
 
97
-	protected function get_list_results()
98
-	{
98
+	protected function get_list_results()
99
+	{
99 100
         global $container;
100 101
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
101 102
         return $repository->getActivePostsByTag($this->tag['id'], self::$POSTS_PER_PAGE, $this->offset);
102 103
 	}
103 104
 
104
-	protected function get_list_description()
105
-	{
105
+	protected function get_list_description()
106
+	{
106 107
 		$start = $this->offset + 1;
107 108
 		$end = min($this->offset + self::$POSTS_PER_PAGE, $this->get_total_post_count());
108 109
 		
109 110
 		return sprintf(self::$LIST_DESCRIPTION, $start, $end, $this->get_total_post_count(), $this->tag['tag']);
110 111
 	}
111 112
 
112
-	protected function get_list_next_link()
113
-	{
114
-		if($this->page == 1)
115
-			return;
116
-		if($this->page == 2)
117
-			return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/")->activate();
113
+	protected function get_list_next_link()
114
+	{
115
+		if($this->page == 1) {
116
+					return;
117
+		}
118
+		if($this->page == 2) {
119
+					return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/")->activate();
120
+		}
118 121
 		return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page - 1) . '/')->activate();
119 122
 	}
120 123
 
121
-	protected function get_list_prev_link()
122
-	{
123
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
124
-			return;
124
+	protected function get_list_prev_link()
125
+	{
126
+		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) {
127
+					return;
128
+		}
125 129
 		return Content::instance('URLSafe', "/tag/{$this->tag['tag']}/" . ($this->page + 1) . '/')->activate();
126 130
 	}
127 131
 
128 132
 	private $total_post_count;
129
-	protected function get_total_post_count()
130
-	{
133
+	protected function get_total_post_count()
134
+	{
131 135
 		if(!isset($this->total_post_count)) {
132 136
         global $container;
133 137
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
Please login to merge, or discard this patch.
controller/blog/CategoryController.class.inc.php 3 patches
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.
Indentation   +157 added lines, -157 removed lines patch added patch discarded remove patch
@@ -5,180 +5,180 @@
 block discarded – undo
5 5
 final class CategoryController extends DefaultListController
6 6
 {
7 7
 
8
-	private static $TITLE_MAIN_HIKING = "Hiking | Posts on Upper Peninsula Exploring on Jacob Emerick's Blog";
9
-	private static $DESCRIPTION_MAIN_HIKING = "Posts on Jacob Emerick's Blog about hiking the Upper Peninsula, exploring the Huron Mountains, and hunting waterfalls in the Keweenaw.";
10
-
11
-	private static $TITLE_MAIN_PERSONAL = "Personal | Posts about life changes on Jacob Emerick's Blog";
12
-	private static $DESCRIPTION_MAIN_PERSONAL = "Stories about life changes for Jacob and Katie. New jobs, getting married, and general thoughts on things.";
13
-
14
-	private static $TITLE_MAIN_WEBDEVELOPMENT = "Web Development | Tutorials and Best Practices on Jacob Emerick's Blog";
15
-	private static $DESCRIPTION_MAIN_WEBDEVELOPMENT = "Variety of tutorials and advice on best practices on Jacob Emerick's Blog, with a focus on object-orientated PHP development and project management.";
16
-
17
-	private static $TITLE_PAGINATED_HIKING = "Hiking - Page %d of %d | Jacob Emerick's Blog";
18
-	private static $DESCRIPTION_PAGINATED_HIKING = "Page %d of %d about hiking on Jacob Emerick's Blog. Posts about hiking the Upper Peninsula, exploring the Huron Mountains, and hunting waterfalls of the Keweenaw.";
19
-
20
-	private static $TITLE_PAGINATED_PERSONAL = "Personal - Page %d of %d | Jacob Emerick's Blog";
21
-	private static $DESCRIPTION_PAGINATED_PERSONAL = "Page %d of %d of personal posts on Jacob Emerick's Blog about life changes and general musings.";
22
-
23
-	private static $TITLE_PAGINATED_WEBDEVELOPMENT = "Web Development - Page %d of %d | Jacob Emerick's Blog";
24
-	private static $DESCRIPTION_PAGINATED_WEBDEVELOPMENT = "Page %d of %d of posts on web development, ranging from general tutorials to advanced best practices, on Jacob Emerick's Blog.";
25
-
26
-	private static $KEYWORD_ARRAY_HIKING = array(
27
-		'hiking',
28
-		'upper peninsula',
29
-		'huron mountains',
30
-		'keweenaw',
31
-		'michigan',
32
-		'backpacking',
33
-		'Jacob Emerick');
34
-
35
-	private static $KEYWORD_ARRAY_PERSONAL = array(
36
-		'dealerfire',
37
-		'sparknet',
38
-		'katie',
39
-		'logan',
40
-		'marriage',
41
-		'Jacob Emerick');
42
-
43
-	private static $KEYWORD_ARRAY_WEBDEVELOPMENT = array(
44
-		'best practices',
45
-		'object orientated php',
46
-		'data abstraction',
47
-		'semantic web',
48
-		'responsive design',
49
-		'responsible development',
50
-		'Jacob Emerick');
51
-
52
-	private $category;
53
-
54
-	private static $LIST_DESCRIPTION = 'Viewing %d - %d of %d posts in the %s category.';
55
-
56
-	public function __construct()
57
-	{
58
-		$url = URLDecode::getPiece(1);
59
-		$this->category = (object) array(
60
-			'display' => ucwords(str_replace('-', ' ', $url)),
61
-			'link' => $url);
8
+    private static $TITLE_MAIN_HIKING = "Hiking | Posts on Upper Peninsula Exploring on Jacob Emerick's Blog";
9
+    private static $DESCRIPTION_MAIN_HIKING = "Posts on Jacob Emerick's Blog about hiking the Upper Peninsula, exploring the Huron Mountains, and hunting waterfalls in the Keweenaw.";
10
+
11
+    private static $TITLE_MAIN_PERSONAL = "Personal | Posts about life changes on Jacob Emerick's Blog";
12
+    private static $DESCRIPTION_MAIN_PERSONAL = "Stories about life changes for Jacob and Katie. New jobs, getting married, and general thoughts on things.";
13
+
14
+    private static $TITLE_MAIN_WEBDEVELOPMENT = "Web Development | Tutorials and Best Practices on Jacob Emerick's Blog";
15
+    private static $DESCRIPTION_MAIN_WEBDEVELOPMENT = "Variety of tutorials and advice on best practices on Jacob Emerick's Blog, with a focus on object-orientated PHP development and project management.";
16
+
17
+    private static $TITLE_PAGINATED_HIKING = "Hiking - Page %d of %d | Jacob Emerick's Blog";
18
+    private static $DESCRIPTION_PAGINATED_HIKING = "Page %d of %d about hiking on Jacob Emerick's Blog. Posts about hiking the Upper Peninsula, exploring the Huron Mountains, and hunting waterfalls of the Keweenaw.";
19
+
20
+    private static $TITLE_PAGINATED_PERSONAL = "Personal - Page %d of %d | Jacob Emerick's Blog";
21
+    private static $DESCRIPTION_PAGINATED_PERSONAL = "Page %d of %d of personal posts on Jacob Emerick's Blog about life changes and general musings.";
22
+
23
+    private static $TITLE_PAGINATED_WEBDEVELOPMENT = "Web Development - Page %d of %d | Jacob Emerick's Blog";
24
+    private static $DESCRIPTION_PAGINATED_WEBDEVELOPMENT = "Page %d of %d of posts on web development, ranging from general tutorials to advanced best practices, on Jacob Emerick's Blog.";
25
+
26
+    private static $KEYWORD_ARRAY_HIKING = array(
27
+        'hiking',
28
+        'upper peninsula',
29
+        'huron mountains',
30
+        'keweenaw',
31
+        'michigan',
32
+        'backpacking',
33
+        'Jacob Emerick');
34
+
35
+    private static $KEYWORD_ARRAY_PERSONAL = array(
36
+        'dealerfire',
37
+        'sparknet',
38
+        'katie',
39
+        'logan',
40
+        'marriage',
41
+        'Jacob Emerick');
42
+
43
+    private static $KEYWORD_ARRAY_WEBDEVELOPMENT = array(
44
+        'best practices',
45
+        'object orientated php',
46
+        'data abstraction',
47
+        'semantic web',
48
+        'responsive design',
49
+        'responsible development',
50
+        'Jacob Emerick');
51
+
52
+    private $category;
53
+
54
+    private static $LIST_DESCRIPTION = 'Viewing %d - %d of %d posts in the %s category.';
55
+
56
+    public function __construct()
57
+    {
58
+        $url = URLDecode::getPiece(1);
59
+        $this->category = (object) array(
60
+            'display' => ucwords(str_replace('-', ' ', $url)),
61
+            'link' => $url);
62 62
 		
63
-		parent::__construct();
64
-	}
63
+        parent::__construct();
64
+    }
65 65
 
66
-	protected function set_head_data()
67
-	{
68
-		parent::set_head_data();
66
+    protected function set_head_data()
67
+    {
68
+        parent::set_head_data();
69 69
 		
70
-		switch($this->category->display)
71
-		{
72
-			case 'Hiking' :
73
-				if($this->page == 1)
74
-				{
75
-					$this->set_title(self::$TITLE_MAIN_HIKING);
76
-					$this->set_description(self::$DESCRIPTION_MAIN_HIKING);
77
-				}
78
-				else
79
-				{
80
-					$this->set_title(sprintf(self::$TITLE_PAGINATED_HIKING, $this->page, $this->total_pages));
81
-					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_HIKING, $this->page, $this->total_pages));
82
-				}
83
-				$this->set_keywords(self::$KEYWORD_ARRAY_HIKING);
84
-			break;
85
-			case 'Personal' :
86
-				if($this->page == 1)
87
-				{
88
-					$this->set_title(self::$TITLE_MAIN_PERSONAL);
89
-					$this->set_description(self::$DESCRIPTION_MAIN_PERSONAL);
90
-				}
91
-				else
92
-				{
93
-					$this->set_title(sprintf(self::$TITLE_PAGINATED_PERSONAL, $this->page, $this->total_pages));
94
-					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_PERSONAL, $this->page, $this->total_pages));
95
-				}
96
-				$this->set_keywords(self::$KEYWORD_ARRAY_PERSONAL);
97
-			break;
98
-			case 'Web Development' :
99
-				if($this->page == 1)
100
-				{
101
-					$this->set_title(self::$TITLE_MAIN_WEBDEVELOPMENT);
102
-					$this->set_description(self::$DESCRIPTION_MAIN_WEBDEVELOPMENT);
103
-				}
104
-				else
105
-				{
106
-					$this->set_title(sprintf(self::$TITLE_PAGINATED_WEBDEVELOPMENT, $this->page, $this->total_pages));
107
-					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_WEBDEVELOPMENT, $this->page, $this->total_pages));
108
-				}
109
-				$this->set_keywords(self::$KEYWORD_ARRAY_WEBDEVELOPMENT);
110
-			break;
111
-		}
112
-	}
113
-
114
-	protected function get_introduction()
115
-	{
116
-		if($this->page == 1)
117
-		{
70
+        switch($this->category->display)
71
+        {
72
+            case 'Hiking' :
73
+                if($this->page == 1)
74
+                {
75
+                    $this->set_title(self::$TITLE_MAIN_HIKING);
76
+                    $this->set_description(self::$DESCRIPTION_MAIN_HIKING);
77
+                }
78
+                else
79
+                {
80
+                    $this->set_title(sprintf(self::$TITLE_PAGINATED_HIKING, $this->page, $this->total_pages));
81
+                    $this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_HIKING, $this->page, $this->total_pages));
82
+                }
83
+                $this->set_keywords(self::$KEYWORD_ARRAY_HIKING);
84
+            break;
85
+            case 'Personal' :
86
+                if($this->page == 1)
87
+                {
88
+                    $this->set_title(self::$TITLE_MAIN_PERSONAL);
89
+                    $this->set_description(self::$DESCRIPTION_MAIN_PERSONAL);
90
+                }
91
+                else
92
+                {
93
+                    $this->set_title(sprintf(self::$TITLE_PAGINATED_PERSONAL, $this->page, $this->total_pages));
94
+                    $this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_PERSONAL, $this->page, $this->total_pages));
95
+                }
96
+                $this->set_keywords(self::$KEYWORD_ARRAY_PERSONAL);
97
+            break;
98
+            case 'Web Development' :
99
+                if($this->page == 1)
100
+                {
101
+                    $this->set_title(self::$TITLE_MAIN_WEBDEVELOPMENT);
102
+                    $this->set_description(self::$DESCRIPTION_MAIN_WEBDEVELOPMENT);
103
+                }
104
+                else
105
+                {
106
+                    $this->set_title(sprintf(self::$TITLE_PAGINATED_WEBDEVELOPMENT, $this->page, $this->total_pages));
107
+                    $this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_WEBDEVELOPMENT, $this->page, $this->total_pages));
108
+                }
109
+                $this->set_keywords(self::$KEYWORD_ARRAY_WEBDEVELOPMENT);
110
+            break;
111
+        }
112
+    }
113
+
114
+    protected function get_introduction()
115
+    {
116
+        if($this->page == 1)
117
+        {
118 118
         global $container;
119 119
         $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']);
120 120
         $introduction_result = $repository->findByType('category', $this->category->link);
121 121
 			
122
-			$introduction = array();
123
-			$introduction['title'] = $introduction_result['title'];
124
-			$introduction['content'] = $introduction_result['content'];
125
-			$introduction['image'] = $this->get_introduction_image($introduction_result['image']);
122
+            $introduction = array();
123
+            $introduction['title'] = $introduction_result['title'];
124
+            $introduction['content'] = $introduction_result['content'];
125
+            $introduction['image'] = $this->get_introduction_image($introduction_result['image']);
126 126
 			
127
-			return $introduction;
128
-		}
127
+            return $introduction;
128
+        }
129 129
 		
130
-		return array(
131
-			'title' => "Posts about {$this->category->display}, page {$this->page} of {$this->total_pages}.");
132
-	}
133
-
134
-	protected function get_page_number()
135
-	{
136
-		$page = URLDecode::getPiece(2);
137
-		if(isset($page) && is_numeric($page))
138
-			return $page;
139
-		return 1;
140
-	}
141
-
142
-	protected function get_list_results()
143
-	{
130
+        return array(
131
+            'title' => "Posts about {$this->category->display}, page {$this->page} of {$this->total_pages}.");
132
+    }
133
+
134
+    protected function get_page_number()
135
+    {
136
+        $page = URLDecode::getPiece(2);
137
+        if(isset($page) && is_numeric($page))
138
+            return $page;
139
+        return 1;
140
+    }
141
+
142
+    protected function get_list_results()
143
+    {
144 144
         global $container;
145 145
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
146 146
         return $repository->getActivePostsByCategory($this->category->link, self::$POSTS_PER_PAGE, $this->offset);
147
-	}
147
+    }
148 148
 
149
-	protected function get_list_description()
150
-	{
151
-		$start = $this->offset + 1;
152
-		$end = min($this->offset + self::$POSTS_PER_PAGE, $this->get_total_post_count());
149
+    protected function get_list_description()
150
+    {
151
+        $start = $this->offset + 1;
152
+        $end = min($this->offset + self::$POSTS_PER_PAGE, $this->get_total_post_count());
153 153
 		
154
-		return sprintf(self::$LIST_DESCRIPTION, $start, $end, $this->get_total_post_count(), $this->category->display);
155
-	}
156
-
157
-	protected function get_list_next_link()
158
-	{
159
-		if($this->page == 1)
160
-			return;
161
-		if($this->page == 2)
162
-			return Content::instance('URLSafe', "/{$this->category->link}/")->activate();
163
-		return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page - 1) . '/')->activate();
164
-	}
165
-
166
-	protected function get_list_prev_link()
167
-	{
168
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
169
-			return;
170
-		return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page + 1) . '/')->activate();
171
-	}
172
-
173
-	private $total_post_count;
174
-	protected function get_total_post_count()
175
-	{
176
-		if(!isset($this->total_post_count)) {
154
+        return sprintf(self::$LIST_DESCRIPTION, $start, $end, $this->get_total_post_count(), $this->category->display);
155
+    }
156
+
157
+    protected function get_list_next_link()
158
+    {
159
+        if($this->page == 1)
160
+            return;
161
+        if($this->page == 2)
162
+            return Content::instance('URLSafe', "/{$this->category->link}/")->activate();
163
+        return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page - 1) . '/')->activate();
164
+    }
165
+
166
+    protected function get_list_prev_link()
167
+    {
168
+        if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
169
+            return;
170
+        return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page + 1) . '/')->activate();
171
+    }
172
+
173
+    private $total_post_count;
174
+    protected function get_total_post_count()
175
+    {
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);
180 180
     }
181
-		return $this->total_post_count;
182
-	}
181
+        return $this->total_post_count;
182
+    }
183 183
 
184 184
 }
Please login to merge, or discard this patch.
Braces   +35 added lines, -34 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 Loader::load('controller', 'blog/DefaultListController');
4 4
 
5
-final class CategoryController extends DefaultListController
6
-{
5
+final class CategoryController extends DefaultListController
6
+{
7 7
 
8 8
 	private static $TITLE_MAIN_HIKING = "Hiking | Posts on Upper Peninsula Exploring on Jacob Emerick's Blog";
9 9
 	private static $DESCRIPTION_MAIN_HIKING = "Posts on Jacob Emerick's Blog about hiking the Upper Peninsula, exploring the Huron Mountains, and hunting waterfalls in the Keweenaw.";
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 
54 54
 	private static $LIST_DESCRIPTION = 'Viewing %d - %d of %d posts in the %s category.';
55 55
 
56
-	public function __construct()
57
-	{
56
+	public function __construct()
57
+	{
58 58
 		$url = URLDecode::getPiece(1);
59 59
 		$this->category = (object) array(
60 60
 			'display' => ucwords(str_replace('-', ' ', $url)),
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 		parent::__construct();
64 64
 	}
65 65
 
66
-	protected function set_head_data()
67
-	{
66
+	protected function set_head_data()
67
+	{
68 68
 		parent::set_head_data();
69 69
 		
70 70
 		switch($this->category->display)
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
 				{
75 75
 					$this->set_title(self::$TITLE_MAIN_HIKING);
76 76
 					$this->set_description(self::$DESCRIPTION_MAIN_HIKING);
77
-				}
78
-				else
77
+				} else
79 78
 				{
80 79
 					$this->set_title(sprintf(self::$TITLE_PAGINATED_HIKING, $this->page, $this->total_pages));
81 80
 					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_HIKING, $this->page, $this->total_pages));
@@ -87,8 +86,7 @@  discard block
 block discarded – undo
87 86
 				{
88 87
 					$this->set_title(self::$TITLE_MAIN_PERSONAL);
89 88
 					$this->set_description(self::$DESCRIPTION_MAIN_PERSONAL);
90
-				}
91
-				else
89
+				} else
92 90
 				{
93 91
 					$this->set_title(sprintf(self::$TITLE_PAGINATED_PERSONAL, $this->page, $this->total_pages));
94 92
 					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_PERSONAL, $this->page, $this->total_pages));
@@ -100,8 +98,7 @@  discard block
 block discarded – undo
100 98
 				{
101 99
 					$this->set_title(self::$TITLE_MAIN_WEBDEVELOPMENT);
102 100
 					$this->set_description(self::$DESCRIPTION_MAIN_WEBDEVELOPMENT);
103
-				}
104
-				else
101
+				} else
105 102
 				{
106 103
 					$this->set_title(sprintf(self::$TITLE_PAGINATED_WEBDEVELOPMENT, $this->page, $this->total_pages));
107 104
 					$this->set_description(sprintf(self::$DESCRIPTION_PAGINATED_WEBDEVELOPMENT, $this->page, $this->total_pages));
@@ -111,8 +108,8 @@  discard block
 block discarded – undo
111 108
 		}
112 109
 	}
113 110
 
114
-	protected function get_introduction()
115
-	{
111
+	protected function get_introduction()
112
+	{
116 113
 		if($this->page == 1)
117 114
 		{
118 115
         global $container;
@@ -131,48 +128,52 @@  discard block
 block discarded – undo
131 128
 			'title' => "Posts about {$this->category->display}, page {$this->page} of {$this->total_pages}.");
132 129
 	}
133 130
 
134
-	protected function get_page_number()
135
-	{
131
+	protected function get_page_number()
132
+	{
136 133
 		$page = URLDecode::getPiece(2);
137
-		if(isset($page) && is_numeric($page))
138
-			return $page;
134
+		if(isset($page) && is_numeric($page)) {
135
+					return $page;
136
+		}
139 137
 		return 1;
140 138
 	}
141 139
 
142
-	protected function get_list_results()
143
-	{
140
+	protected function get_list_results()
141
+	{
144 142
         global $container;
145 143
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
146 144
         return $repository->getActivePostsByCategory($this->category->link, self::$POSTS_PER_PAGE, $this->offset);
147 145
 	}
148 146
 
149
-	protected function get_list_description()
150
-	{
147
+	protected function get_list_description()
148
+	{
151 149
 		$start = $this->offset + 1;
152 150
 		$end = min($this->offset + self::$POSTS_PER_PAGE, $this->get_total_post_count());
153 151
 		
154 152
 		return sprintf(self::$LIST_DESCRIPTION, $start, $end, $this->get_total_post_count(), $this->category->display);
155 153
 	}
156 154
 
157
-	protected function get_list_next_link()
158
-	{
159
-		if($this->page == 1)
160
-			return;
161
-		if($this->page == 2)
162
-			return Content::instance('URLSafe', "/{$this->category->link}/")->activate();
155
+	protected function get_list_next_link()
156
+	{
157
+		if($this->page == 1) {
158
+					return;
159
+		}
160
+		if($this->page == 2) {
161
+					return Content::instance('URLSafe', "/{$this->category->link}/")->activate();
162
+		}
163 163
 		return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page - 1) . '/')->activate();
164 164
 	}
165 165
 
166
-	protected function get_list_prev_link()
167
-	{
168
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
169
-			return;
166
+	protected function get_list_prev_link()
167
+	{
168
+		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count()) {
169
+					return;
170
+		}
170 171
 		return Content::instance('URLSafe', "/{$this->category->link}/" . ($this->page + 1) . '/')->activate();
171 172
 	}
172 173
 
173 174
 	private $total_post_count;
174
-	protected function get_total_post_count()
175
-	{
175
+	protected function get_total_post_count()
176
+	{
176 177
 		if(!isset($this->total_post_count)) {
177 178
         global $container;
178 179
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
Please login to merge, or discard this patch.