Completed
Push — master ( 68e9dc...5e9262 )
by Jacob
03:50
created
controller/waterfalls/LogTagListController.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(3);
28 28
 		$this->tag = LogTagCollector::getTag($alias);
29 29
 		
30
-		if(!$this->tag)
30
+		if (!$this->tag)
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'] = "{$this->tag->name} | " . self::$WEBSITE_TITLE;
40
+		$meta_array['title'] = "{$this->tag->name} | ".self::$WEBSITE_TITLE;
41 41
 		$meta_array['description'] = $this->tag->name;
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->tag->name);
53 53
 		$meta_array['keywords'] = $this->get_keyword_array();
54 54
 		
Please login to merge, or discard this patch.
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -6,96 +6,96 @@
 block discarded – undo
6 6
 final class LogTagListController 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 journal entries with %TAG%';
21
-	private static $LINK_ROOT = '/journal/tag/%s/';
22
-
23
-	private $tag;
24
-
25
-	public function __construct()
26
-	{
27
-		$alias = URLDecode::getPiece(3);
28
-		$this->tag = LogTagCollector::getTag($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 journal entries with %TAG%';
21
+    private static $LINK_ROOT = '/journal/tag/%s/';
22
+
23
+    private $tag;
24
+
25
+    public function __construct()
26
+    {
27
+        $alias = URLDecode::getPiece(3);
28
+        $this->tag = LogTagCollector::getTag($alias);
29 29
 		
30
-		if(!$this->tag)
31
-			$this->eject();
30
+        if(!$this->tag)
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'] = "{$this->tag->name} | " . self::$WEBSITE_TITLE;
41
-		$meta_array['description'] = $this->tag->name;
42
-		$meta_array['keywords'] = $this->get_keyword_array();
40
+        $meta_array['title'] = "{$this->tag->name} | " . self::$WEBSITE_TITLE;
41
+        $meta_array['description'] = $this->tag->name;
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->tag->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->tag->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->tag->name));
62
-		return $keyword_array;
63
-	}
64
-
65
-	protected function get_initial_introduction()
66
-	{
67
-		return array(
68
-			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->tag->name));
69
-	}
70
-
71
-	protected function get_subsequent_introduction()
72
-	{
73
-		return $this->get_initial_introduction();
74
-	}
75
-
76
-	protected function get_page_number_piece()
77
-	{
78
-		return URLDecode::getPiece(3);
79
-	}
80
-
81
-	protected function get_item_result($total, $offset)
82
-	{
83
-		return LogTagCollector::getLogListForTag($this->tag->id, $total, $offset);
84
-	}
85
-
86
-	protected function get_item_count_result()
87
-	{
88
-		return LogTagCollector::getLogCountForTag($this->tag->id);
89
-	}
90
-
91
-	protected function get_list_description_pattern()
92
-	{
93
-		return str_replace('%TAG%', $this->tag->name, self::$NAVIGATION_DESCRIPTION);
94
-	}
95
-
96
-	protected function get_list_link_root()
97
-	{
98
-		return sprintf(self::$LINK_ROOT, $this->tag->alias);
99
-	}
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->tag->name));
62
+        return $keyword_array;
63
+    }
64
+
65
+    protected function get_initial_introduction()
66
+    {
67
+        return array(
68
+            'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->tag->name));
69
+    }
70
+
71
+    protected function get_subsequent_introduction()
72
+    {
73
+        return $this->get_initial_introduction();
74
+    }
75
+
76
+    protected function get_page_number_piece()
77
+    {
78
+        return URLDecode::getPiece(3);
79
+    }
80
+
81
+    protected function get_item_result($total, $offset)
82
+    {
83
+        return LogTagCollector::getLogListForTag($this->tag->id, $total, $offset);
84
+    }
85
+
86
+    protected function get_item_count_result()
87
+    {
88
+        return LogTagCollector::getLogCountForTag($this->tag->id);
89
+    }
90
+
91
+    protected function get_list_description_pattern()
92
+    {
93
+        return str_replace('%TAG%', $this->tag->name, self::$NAVIGATION_DESCRIPTION);
94
+    }
95
+
96
+    protected function get_list_link_root()
97
+    {
98
+        return sprintf(self::$LINK_ROOT, $this->tag->alias);
99
+    }
100 100
 
101 101
 }
102 102
\ 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/LogTagCollector');
4 4
 Loader::load('controller', 'waterfalls/DefaultLogListController');
5 5
 
6
-final class LogTagListController extends DefaultLogListController
7
-{
6
+final class LogTagListController 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 $tag;
24 24
 
25
-	public function __construct()
26
-	{
25
+	public function __construct()
26
+	{
27 27
 		$alias = URLDecode::getPiece(3);
28 28
 		$this->tag = LogTagCollector::getTag($alias);
29 29
 		
30
-		if(!$this->tag)
31
-			$this->eject();
30
+		if(!$this->tag) {
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'] = "{$this->tag->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,46 +56,46 @@  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->tag->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
 		return array(
68 69
 			'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->tag->name));
69 70
 	}
70 71
 
71
-	protected function get_subsequent_introduction()
72
-	{
72
+	protected function get_subsequent_introduction()
73
+	{
73 74
 		return $this->get_initial_introduction();
74 75
 	}
75 76
 
76
-	protected function get_page_number_piece()
77
-	{
77
+	protected function get_page_number_piece()
78
+	{
78 79
 		return URLDecode::getPiece(3);
79 80
 	}
80 81
 
81
-	protected function get_item_result($total, $offset)
82
-	{
82
+	protected function get_item_result($total, $offset)
83
+	{
83 84
 		return LogTagCollector::getLogListForTag($this->tag->id, $total, $offset);
84 85
 	}
85 86
 
86
-	protected function get_item_count_result()
87
-	{
87
+	protected function get_item_count_result()
88
+	{
88 89
 		return LogTagCollector::getLogCountForTag($this->tag->id);
89 90
 	}
90 91
 
91
-	protected function get_list_description_pattern()
92
-	{
92
+	protected function get_list_description_pattern()
93
+	{
93 94
 		return str_replace('%TAG%', $this->tag->name, self::$NAVIGATION_DESCRIPTION);
94 95
 	}
95 96
 
96
-	protected function get_list_link_root()
97
-	{
97
+	protected function get_list_link_root()
98
+	{
98 99
 		return sprintf(self::$LINK_ROOT, $this->tag->alias);
99 100
 	}
100 101
 
Please login to merge, or discard this patch.
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', 'waterfalls/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 | Waterfalls of the Keweenaw';
9 9
 	private static $DESCRIPTION = 'Contact page to reach Jacob Emerick by email or social networks';
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 		'waterfalls',
15 15
 		'Jacob Emerick');
16 16
 
17
-	protected function set_head_data()
18
-	{
17
+	protected function set_head_data()
18
+	{
19 19
 		$this->set_title(self::$TITLE);
20 20
 		$this->set_description(self::$DESCRIPTION);
21 21
 		$this->set_keywords(self::$KEYWORD_ARRAY);
@@ -23,27 +23,31 @@  discard block
 block discarded – undo
23 23
 		parent::set_head_data();
24 24
 	}
25 25
 
26
-	protected function set_body_data()
27
-	{
26
+	protected function set_body_data()
27
+	{
28 28
 		$this->set_body('form_container', $this->process_form());
29 29
 		$this->set_body('view', 'Contact');
30 30
 		
31 31
 		parent::set_body_data();
32 32
 	}
33 33
 
34
-	private function process_form()
35
-	{
36
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
37
-			return (object) array('display' => 'normal');
34
+	private function process_form()
35
+	{
36
+		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') {
37
+					return (object) array('display' => 'normal');
38
+		}
38 39
 		
39 40
 		Loader::load('utility', 'Validate');
40 41
 		$error_result = array();
41
-		if(!Validate::checkRequest('post', 'name', 'string'))
42
-			$error_result['name'] = 'please enter your name';
43
-		if(!Validate::checkRequest('post', 'email', 'string'))
44
-			$error_result['email'] = 'please enter a valid email';
45
-		if(!Validate::checkRequest('post', 'message', 'string'))
46
-			$error_result['message'] = 'please write a message';
42
+		if(!Validate::checkRequest('post', 'name', 'string')) {
43
+					$error_result['name'] = 'please enter your name';
44
+		}
45
+		if(!Validate::checkRequest('post', 'email', 'string')) {
46
+					$error_result['email'] = 'please enter a valid email';
47
+		}
48
+		if(!Validate::checkRequest('post', 'message', 'string')) {
49
+					$error_result['message'] = 'please write a message';
50
+		}
47 51
 		
48 52
 		$values = (object) array(
49 53
 			'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.