@@ -5,11 +5,11 @@ discard block |
||
| 5 | 5 | 'waterfall/WaterfallCollector')); |
| 6 | 6 | Loader::load('router', 'Router'); |
| 7 | 7 | |
| 8 | -class WaterfallRouter extends Router |
|
| 9 | -{ |
|
| 8 | +class WaterfallRouter extends Router |
|
| 9 | +{
|
|
| 10 | 10 | |
| 11 | - protected function get_redirect_array() |
|
| 12 | - { |
|
| 11 | + protected function get_redirect_array() |
|
| 12 | + {
|
|
| 13 | 13 | return array( |
| 14 | 14 | (object) array( |
| 15 | 15 | 'pattern' => '@/index.(html|htm|php)$@', |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | ); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - protected function check_for_special_redirect($uri) |
|
| 75 | - { |
|
| 74 | + protected function check_for_special_redirect($uri) |
|
| 75 | + {
|
|
| 76 | 76 | if (preg_match('@^/falls/([a-z\'-]+)(/?)$@', $uri, $matches)) { |
| 77 | 77 | $alias = $matches[1]; |
| 78 | 78 | $alias = str_replace("'", '', $alias); |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | return $uri; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - protected function get_direct_array() |
|
| 132 | - { |
|
| 131 | + protected function get_direct_array() |
|
| 132 | + {
|
|
| 133 | 133 | return array( |
| 134 | 134 | (object) array( |
| 135 | 135 | 'match' => '/', |
@@ -8,24 +8,24 @@ discard block |
||
| 8 | 8 | class WaterfallRouter extends Router |
| 9 | 9 | { |
| 10 | 10 | |
| 11 | - protected function get_redirect_array() |
|
| 12 | - { |
|
| 13 | - return array( |
|
| 14 | - (object) array( |
|
| 15 | - 'pattern' => '@/index.(html|htm|php)$@', |
|
| 16 | - 'replace' => '/'), |
|
| 17 | - (object) array( |
|
| 18 | - 'pattern' => '@^/home(/?)$@', |
|
| 19 | - 'replace' => '/'), |
|
| 20 | - (object) array( |
|
| 21 | - 'pattern' => '@^/falls/by-rating(/?)$@', |
|
| 22 | - 'replace' => '/falls/'), |
|
| 23 | - (object) array( |
|
| 24 | - 'pattern' => '@^/falls/by-rating/([0-9]+)(/?)$@', |
|
| 25 | - 'replace' => '/falls/'), |
|
| 26 | - (object) array( |
|
| 27 | - 'pattern' => '@^/falls/results(/?)$@', |
|
| 28 | - 'replace' => '/falls/'), |
|
| 11 | + protected function get_redirect_array() |
|
| 12 | + { |
|
| 13 | + return array( |
|
| 14 | + (object) array( |
|
| 15 | + 'pattern' => '@/index.(html|htm|php)$@', |
|
| 16 | + 'replace' => '/'), |
|
| 17 | + (object) array( |
|
| 18 | + 'pattern' => '@^/home(/?)$@', |
|
| 19 | + 'replace' => '/'), |
|
| 20 | + (object) array( |
|
| 21 | + 'pattern' => '@^/falls/by-rating(/?)$@', |
|
| 22 | + 'replace' => '/falls/'), |
|
| 23 | + (object) array( |
|
| 24 | + 'pattern' => '@^/falls/by-rating/([0-9]+)(/?)$@', |
|
| 25 | + 'replace' => '/falls/'), |
|
| 26 | + (object) array( |
|
| 27 | + 'pattern' => '@^/falls/results(/?)$@', |
|
| 28 | + 'replace' => '/falls/'), |
|
| 29 | 29 | (object) array( |
| 30 | 30 | 'pattern' => '@^/log(/?)$@', |
| 31 | 31 | 'replace' => '/journal/'), |
@@ -35,47 +35,47 @@ discard block |
||
| 35 | 35 | (object) array( |
| 36 | 36 | 'pattern' => '@^/map/([^/]+)(/?)$@', |
| 37 | 37 | 'replace' => '/map/'), |
| 38 | - (object) array( |
|
| 39 | - 'pattern' => '@^/about/([a-z]*)(/?)$@', |
|
| 40 | - 'replace' => '/about/'), |
|
| 41 | - (object) array( |
|
| 42 | - 'pattern' => '@^/birch-creek/birch-creek-falls/?$@', |
|
| 43 | - 'replace' => '/birch-creek/gold-mine-falls/'), |
|
| 44 | - (object) array( |
|
| 45 | - 'pattern' => '@^/big-iron-river/bonanza-falls/?$@', |
|
| 46 | - 'replace' => '/big-iron-river/greenwood-falls/'), |
|
| 47 | - (object) array( |
|
| 48 | - 'pattern' => '@^/east-branch-huron-river/east-branch-huron-river-falls/?$@', |
|
| 49 | - 'replace' => '/east-branch-huron-river/east-branch-falls/'), |
|
| 50 | - (object) array( |
|
| 51 | - 'pattern' => '@^/montreal-river/lower-montreal-falls/?$@', |
|
| 52 | - 'replace' => '/montreal-river/montreal-falls/'), |
|
| 53 | - (object) array( |
|
| 54 | - 'pattern' => '@^/manganese-creek/manganese-gorge-falls/?$@', |
|
| 55 | - 'replace' => '/manganese-creek/manganese-falls/'), |
|
| 56 | - (object) array( |
|
| 57 | - 'pattern' => '@^/dead-river/tourist-park-dam-falls/?$@', |
|
| 58 | - 'replace' => '/dead-river/tourist-park-falls/'), |
|
| 59 | - (object) array( |
|
| 60 | - 'pattern' => '@^/sturgeon-river/upper-sturgeon-falls/?$@', |
|
| 61 | - 'replace' => '/sturgeon-river/little-spruce-falls/'), |
|
| 62 | - (object) array( |
|
| 63 | - 'pattern' => '@^/tahquamenon-river/upper-tahquamenon-falls/?$@', |
|
| 64 | - 'replace' => '/tahquamenon-river/tahquamenon-falls/'), |
|
| 65 | - (object) array( |
|
| 66 | - 'pattern' => '@^/west-branch-huron-river/west-branch-huron-river-falls/?@', |
|
| 67 | - 'replace' => '/west-branch-huron-river/west-branch-falls/'), |
|
| 68 | - (object) array( |
|
| 69 | - 'pattern' => '@^/west-branch-yellow-dog-river/west-branch-yellow-dog-falls/?@', |
|
| 70 | - 'replace' => '/west-branch-yellow-dog-river/west-branch-falls/'), |
|
| 71 | - (object) array( |
|
| 72 | - 'pattern' => '@^/baltimore-river/peanut-butter-falls/?@', |
|
| 73 | - 'replace' => '/baltimore-river/konteko-falls/'), |
|
| 74 | - ); |
|
| 75 | - } |
|
| 38 | + (object) array( |
|
| 39 | + 'pattern' => '@^/about/([a-z]*)(/?)$@', |
|
| 40 | + 'replace' => '/about/'), |
|
| 41 | + (object) array( |
|
| 42 | + 'pattern' => '@^/birch-creek/birch-creek-falls/?$@', |
|
| 43 | + 'replace' => '/birch-creek/gold-mine-falls/'), |
|
| 44 | + (object) array( |
|
| 45 | + 'pattern' => '@^/big-iron-river/bonanza-falls/?$@', |
|
| 46 | + 'replace' => '/big-iron-river/greenwood-falls/'), |
|
| 47 | + (object) array( |
|
| 48 | + 'pattern' => '@^/east-branch-huron-river/east-branch-huron-river-falls/?$@', |
|
| 49 | + 'replace' => '/east-branch-huron-river/east-branch-falls/'), |
|
| 50 | + (object) array( |
|
| 51 | + 'pattern' => '@^/montreal-river/lower-montreal-falls/?$@', |
|
| 52 | + 'replace' => '/montreal-river/montreal-falls/'), |
|
| 53 | + (object) array( |
|
| 54 | + 'pattern' => '@^/manganese-creek/manganese-gorge-falls/?$@', |
|
| 55 | + 'replace' => '/manganese-creek/manganese-falls/'), |
|
| 56 | + (object) array( |
|
| 57 | + 'pattern' => '@^/dead-river/tourist-park-dam-falls/?$@', |
|
| 58 | + 'replace' => '/dead-river/tourist-park-falls/'), |
|
| 59 | + (object) array( |
|
| 60 | + 'pattern' => '@^/sturgeon-river/upper-sturgeon-falls/?$@', |
|
| 61 | + 'replace' => '/sturgeon-river/little-spruce-falls/'), |
|
| 62 | + (object) array( |
|
| 63 | + 'pattern' => '@^/tahquamenon-river/upper-tahquamenon-falls/?$@', |
|
| 64 | + 'replace' => '/tahquamenon-river/tahquamenon-falls/'), |
|
| 65 | + (object) array( |
|
| 66 | + 'pattern' => '@^/west-branch-huron-river/west-branch-huron-river-falls/?@', |
|
| 67 | + 'replace' => '/west-branch-huron-river/west-branch-falls/'), |
|
| 68 | + (object) array( |
|
| 69 | + 'pattern' => '@^/west-branch-yellow-dog-river/west-branch-yellow-dog-falls/?@', |
|
| 70 | + 'replace' => '/west-branch-yellow-dog-river/west-branch-falls/'), |
|
| 71 | + (object) array( |
|
| 72 | + 'pattern' => '@^/baltimore-river/peanut-butter-falls/?@', |
|
| 73 | + 'replace' => '/baltimore-river/konteko-falls/'), |
|
| 74 | + ); |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - protected function check_for_special_redirect($uri) |
|
| 78 | - { |
|
| 77 | + protected function check_for_special_redirect($uri) |
|
| 78 | + { |
|
| 79 | 79 | if (preg_match('@^/falls/([a-z\'-]+)(/?)$@', $uri, $matches)) { |
| 80 | 80 | $alias = $matches[1]; |
| 81 | 81 | $alias = str_replace("'", '', $alias); |
@@ -128,81 +128,81 @@ discard block |
||
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - return $uri; |
|
| 132 | - } |
|
| 131 | + return $uri; |
|
| 132 | + } |
|
| 133 | 133 | |
| 134 | - protected function get_direct_array() |
|
| 135 | - { |
|
| 136 | - return array( |
|
| 137 | - (object) array( |
|
| 138 | - 'match' => '/', |
|
| 139 | - 'controller' => 'HomeController'), |
|
| 140 | - (object) array( |
|
| 141 | - 'match' => '/falls/', |
|
| 142 | - 'controller' => 'WaterfallListController'), |
|
| 143 | - (object) array( |
|
| 144 | - 'match' => '/falls/([0-9]+)/', |
|
| 145 | - 'controller' => 'WaterfallListController'), |
|
| 146 | - (object) array( |
|
| 147 | - 'match' => '/([a-z]+)-county/', |
|
| 148 | - 'controller' => 'CountyListController'), |
|
| 149 | - (object) array( |
|
| 150 | - 'match' => '/([a-z]+)-county/([0-9]+)/', |
|
| 151 | - 'controller' => 'CountyListController'), |
|
| 152 | - (object) array( |
|
| 153 | - 'match' => '/([a-z0-9-]+)-(creek|river)/', |
|
| 154 | - 'controller' => 'WatercourseListController'), |
|
| 155 | - (object) array( |
|
| 156 | - 'match' => '/([a-z0-9-]+)-(creek|river)/([0-9]+)/', |
|
| 157 | - 'controller' => 'WatercourseListController'), |
|
| 158 | - (object) array( |
|
| 159 | - 'match' => '/category/([a-z]+)/', |
|
| 160 | - 'controller' => 'CategoryListController'), |
|
| 161 | - (object) array( |
|
| 162 | - 'match' => '/category/([a-z]+)/([0-9]+)/', |
|
| 163 | - 'controller' => 'CategoryListController'), |
|
| 164 | - (object) array( |
|
| 165 | - 'match' => '/([a-z0-9-]+)-(creek|river)/([a-z-]+)/', |
|
| 166 | - 'controller' => 'WaterfallController'), |
|
| 167 | - (object) array( |
|
| 168 | - 'match' => '/map/', |
|
| 169 | - 'controller' => 'MapController'), |
|
| 134 | + protected function get_direct_array() |
|
| 135 | + { |
|
| 136 | + return array( |
|
| 137 | + (object) array( |
|
| 138 | + 'match' => '/', |
|
| 139 | + 'controller' => 'HomeController'), |
|
| 140 | + (object) array( |
|
| 141 | + 'match' => '/falls/', |
|
| 142 | + 'controller' => 'WaterfallListController'), |
|
| 143 | + (object) array( |
|
| 144 | + 'match' => '/falls/([0-9]+)/', |
|
| 145 | + 'controller' => 'WaterfallListController'), |
|
| 146 | + (object) array( |
|
| 147 | + 'match' => '/([a-z]+)-county/', |
|
| 148 | + 'controller' => 'CountyListController'), |
|
| 149 | + (object) array( |
|
| 150 | + 'match' => '/([a-z]+)-county/([0-9]+)/', |
|
| 151 | + 'controller' => 'CountyListController'), |
|
| 152 | + (object) array( |
|
| 153 | + 'match' => '/([a-z0-9-]+)-(creek|river)/', |
|
| 154 | + 'controller' => 'WatercourseListController'), |
|
| 155 | + (object) array( |
|
| 156 | + 'match' => '/([a-z0-9-]+)-(creek|river)/([0-9]+)/', |
|
| 157 | + 'controller' => 'WatercourseListController'), |
|
| 158 | + (object) array( |
|
| 159 | + 'match' => '/category/([a-z]+)/', |
|
| 160 | + 'controller' => 'CategoryListController'), |
|
| 161 | + (object) array( |
|
| 162 | + 'match' => '/category/([a-z]+)/([0-9]+)/', |
|
| 163 | + 'controller' => 'CategoryListController'), |
|
| 164 | + (object) array( |
|
| 165 | + 'match' => '/([a-z0-9-]+)-(creek|river)/([a-z-]+)/', |
|
| 166 | + 'controller' => 'WaterfallController'), |
|
| 167 | + (object) array( |
|
| 168 | + 'match' => '/map/', |
|
| 169 | + 'controller' => 'MapController'), |
|
| 170 | 170 | (object) array( |
| 171 | 171 | 'match' => '/map/#[a-z-/]+', |
| 172 | 172 | 'controller' => 'MapController'), |
| 173 | - (object) array( |
|
| 174 | - 'match' => '/journal/', |
|
| 175 | - 'controller' => 'LogListController'), |
|
| 176 | - (object) array( |
|
| 177 | - 'match' => '/journal/([0-9]+)/', |
|
| 178 | - 'controller' => 'LogListController'), |
|
| 179 | - (object) array( |
|
| 180 | - 'match' => '/journal/[a-z-]+/', |
|
| 181 | - 'controller' => 'LogController'), |
|
| 182 | - (object) array( |
|
| 183 | - 'match' => '/companion/([a-z-]+)/', |
|
| 184 | - 'controller' => 'CompanionListController'), |
|
| 185 | - (object) array( |
|
| 186 | - 'match' => '/companion/([a-z-]+)/([0-9]+)/', |
|
| 187 | - 'controller' => 'CompanionListController'), |
|
| 188 | - (object) array( |
|
| 189 | - 'match' => '/period/([a-z-]+)/', |
|
| 190 | - 'controller' => 'PeriodListController'), |
|
| 191 | - (object) array( |
|
| 192 | - 'match' => '/period/([a-z-]+)/([0-9]+)/', |
|
| 193 | - 'controller' => 'PeriodListController'), |
|
| 194 | - (object) array( |
|
| 195 | - 'match' => '/journal/tag/([a-z-]+)/', |
|
| 196 | - 'controller' => 'LogTagListController'), |
|
| 197 | - (object) array( |
|
| 198 | - 'match' => '/journal/tag/([a-z-]+)/([0-9]+)/', |
|
| 199 | - 'controller' => 'LogTagListController'), |
|
| 200 | - (object) array( |
|
| 201 | - 'match' => '/about/', |
|
| 202 | - 'controller' => 'AboutController'), |
|
| 203 | - (object) array( |
|
| 204 | - 'match' => '/contact/', |
|
| 205 | - 'controller' => 'ContactController')); |
|
| 206 | - } |
|
| 173 | + (object) array( |
|
| 174 | + 'match' => '/journal/', |
|
| 175 | + 'controller' => 'LogListController'), |
|
| 176 | + (object) array( |
|
| 177 | + 'match' => '/journal/([0-9]+)/', |
|
| 178 | + 'controller' => 'LogListController'), |
|
| 179 | + (object) array( |
|
| 180 | + 'match' => '/journal/[a-z-]+/', |
|
| 181 | + 'controller' => 'LogController'), |
|
| 182 | + (object) array( |
|
| 183 | + 'match' => '/companion/([a-z-]+)/', |
|
| 184 | + 'controller' => 'CompanionListController'), |
|
| 185 | + (object) array( |
|
| 186 | + 'match' => '/companion/([a-z-]+)/([0-9]+)/', |
|
| 187 | + 'controller' => 'CompanionListController'), |
|
| 188 | + (object) array( |
|
| 189 | + 'match' => '/period/([a-z-]+)/', |
|
| 190 | + 'controller' => 'PeriodListController'), |
|
| 191 | + (object) array( |
|
| 192 | + 'match' => '/period/([a-z-]+)/([0-9]+)/', |
|
| 193 | + 'controller' => 'PeriodListController'), |
|
| 194 | + (object) array( |
|
| 195 | + 'match' => '/journal/tag/([a-z-]+)/', |
|
| 196 | + 'controller' => 'LogTagListController'), |
|
| 197 | + (object) array( |
|
| 198 | + 'match' => '/journal/tag/([a-z-]+)/([0-9]+)/', |
|
| 199 | + 'controller' => 'LogTagListController'), |
|
| 200 | + (object) array( |
|
| 201 | + 'match' => '/about/', |
|
| 202 | + 'controller' => 'AboutController'), |
|
| 203 | + (object) array( |
|
| 204 | + 'match' => '/contact/', |
|
| 205 | + 'controller' => 'ContactController')); |
|
| 206 | + } |
|
| 207 | 207 | |
| 208 | 208 | } |
@@ -2,11 +2,11 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'portfolio/DefaultPageController'); |
| 4 | 4 | |
| 5 | -class ProjectsController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +class ProjectsController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 8 | + protected function set_head_data() |
|
| 9 | + {
|
|
| 10 | 10 | $this->set_title("Projects Page | Jacob Emerick's Portfolio"); |
| 11 | 11 | $this->set_description("Collection of key open-source projects that Jacob has developed and maintained over the years."); |
| 12 | 12 | $this->set_keywords([ |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | ]); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - protected function set_body_data() |
|
| 23 | - { |
|
| 22 | + protected function set_body_data() |
|
| 23 | + {
|
|
| 24 | 24 | $this->set_body('body_view', 'Projects'); |
| 25 | 25 | $this->set_body('body_data', []); |
| 26 | 26 | |
@@ -2,11 +2,11 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'portfolio/DefaultPageController'); |
| 4 | 4 | |
| 5 | -class AboutController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +class AboutController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 8 | + protected function set_head_data() |
|
| 9 | + {
|
|
| 10 | 10 | $this->set_title("Jacob Emerick's Portfolio"); |
| 11 | 11 | $this->set_description("Jacob Emerick's Portfolio - collection of programming projects and resume"); |
| 12 | 12 | $this->set_keywords([ |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | ]); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - protected function set_body_data() |
|
| 24 | - { |
|
| 23 | + protected function set_body_data() |
|
| 24 | + {
|
|
| 25 | 25 | $this->set_body('body_view', 'About'); |
| 26 | 26 | $this->set_body('body_data', []); |
| 27 | 27 | |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'waterfalls/DefaultPageController'); |
| 4 | 4 | |
| 5 | -final class AboutController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +final class AboutController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | 8 | private static $TITLE = 'About the Website | Waterfalls of the Keweenaw'; |
| 9 | 9 | private static $DESCRIPTION = 'A little bit about the website, the area, and the reason why someone would hunt down a hundred and fifty waterfalls in the Upper Peninsula.'; |
@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | 'Jacob Emerick', |
| 15 | 15 | ); |
| 16 | 16 | |
| 17 | - protected function set_head_data() |
|
| 18 | - { |
|
| 17 | + protected function set_head_data() |
|
| 18 | + {
|
|
| 19 | 19 | parent::set_head_data(); |
| 20 | 20 | |
| 21 | 21 | $this->set_title(self::$TITLE); |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | $this->set_keywords(self::$KEYWORD_ARRAY); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - protected function set_body_data($page_type = 'normal') |
|
| 27 | - { |
|
| 26 | + protected function set_body_data($page_type = 'normal') |
|
| 27 | + {
|
|
| 28 | 28 | parent::set_body_data($page_type); |
| 29 | 29 | |
| 30 | 30 | $this->set_body('view', 'About'); |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlTagRepository implements TagRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlTagRepository implements TagRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + {
|
|
| 18 | 18 | $this->connections = $connections; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return array|false |
| 25 | 25 | */ |
| 26 | - public function findTagByTitle($title) |
|
| 27 | - { |
|
| 26 | + public function findTagByTitle($title) |
|
| 27 | + {
|
|
| 28 | 28 | $query = " |
| 29 | 29 | SELECT * |
| 30 | 30 | FROM `jpemeric_blog`.`tag` |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | ->fetchOne($query, $bindings); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - public function getAllTags() |
|
| 44 | - { |
|
| 43 | + public function getAllTags() |
|
| 44 | + {
|
|
| 45 | 45 | $query = " |
| 46 | 46 | SELECT * |
| 47 | 47 | FROM `jpemeric_blog`.`tag` |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | ->fetchAll($query); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - public function getTagCloud() |
|
| 57 | - { |
|
| 56 | + public function getTagCloud() |
|
| 57 | + {
|
|
| 58 | 58 | $query = " |
| 59 | 59 | SELECT COUNT(1) AS `count`, `tag` |
| 60 | 60 | FROM `jpemeric_blog`.`tag` |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | ->fetchAll($query, $bindings); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - public function getTagsForPost($post) |
|
| 76 | - { |
|
| 75 | + public function getTagsForPost($post) |
|
| 76 | + {
|
|
| 77 | 77 | $query = " |
| 78 | 78 | SELECT `tag`.* |
| 79 | 79 | FROM `jpemeric_blog`.`tag` |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlIntroductionRepository implements IntroductionRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlIntroductionRepository implements IntroductionRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + {
|
|
| 18 | 18 | $this->connections = $connections; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | * |
| 25 | 25 | * @return array|false |
| 26 | 26 | */ |
| 27 | - public function findByType($type, $value = '') |
|
| 28 | - { |
|
| 27 | + public function findByType($type, $value = '') |
|
| 28 | + {
|
|
| 29 | 29 | $query = " |
| 30 | 30 | SELECT `title`, `content`, `image` |
| 31 | 31 | FROM `jpemeric_blog`.`introduction` |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlSeriesRepository implements SeriesRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlSeriesRepository implements SeriesRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + {
|
|
| 18 | 18 | $this->connections = $connections; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return array|false |
| 25 | 25 | */ |
| 26 | - public function getSeriesForPost($post) |
|
| 27 | - { |
|
| 26 | + public function getSeriesForPost($post) |
|
| 27 | + {
|
|
| 28 | 28 | $query = " |
| 29 | 29 | SELECT `series`.`title` AS `series_title`, `series`.`description` AS `series_description`, |
| 30 | 30 | `post`.`id` AS `post`, `post`.`title`, `post`.`category`, `post`.`path` |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | use Jacobemerick\CommentService\Api\DefaultApi; |
| 7 | 7 | use Jacobemerick\CommentService\Model\Commenter; |
| 8 | 8 | |
| 9 | -class ServiceCommenterRepository implements CommenterRepositoryInterface |
|
| 10 | -{ |
|
| 9 | +class ServiceCommenterRepository implements CommenterRepositoryInterface |
|
| 10 | +{
|
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * @var DefaultApi |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * @param DefaultApi $api |
| 19 | 19 | */ |
| 20 | - public function __construct(DefaultApi $api) |
|
| 21 | - { |
|
| 20 | + public function __construct(DefaultApi $api) |
|
| 21 | + {
|
|
| 22 | 22 | $this->api = $api; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | * @return array |
| 28 | 28 | * @throws ApiException |
| 29 | 29 | */ |
| 30 | - public function createCommenter(array $commenter) |
|
| 31 | - { |
|
| 30 | + public function createCommenter(array $commenter) |
|
| 31 | + {
|
|
| 32 | 32 | $response = $this->api->createCommenter($commenter); |
| 33 | 33 | return $this->deserializeCommenter($response); |
| 34 | 34 | } |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | * @return array |
| 39 | 39 | * @throws ApiException |
| 40 | 40 | */ |
| 41 | - public function getCommenter($commenterId) |
|
| 42 | - { |
|
| 41 | + public function getCommenter($commenterId) |
|
| 42 | + {
|
|
| 43 | 43 | $response = $this->api->getCommenter($commenterId); |
| 44 | 44 | return $this->deserializeCommenter($response); |
| 45 | 45 | } |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | * @return array |
| 51 | 51 | * @throws ApiException |
| 52 | 52 | */ |
| 53 | - public function getCommenters($page = null, $perPage = null) |
|
| 54 | - { |
|
| 53 | + public function getCommenters($page = null, $perPage = null) |
|
| 54 | + {
|
|
| 55 | 55 | $response = $this->api->getCommenters($page, $perPage); |
| 56 | 56 | return array_map([$this, 'deserializeCommenter'], $response); |
| 57 | 57 | } |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | * @param Commenter |
| 61 | 61 | * @return array |
| 62 | 62 | */ |
| 63 | - protected function deserializeCommenter(Commenter $commenter) |
|
| 64 | - { |
|
| 63 | + protected function deserializeCommenter(Commenter $commenter) |
|
| 64 | + {
|
|
| 65 | 65 | return [ |
| 66 | 66 | 'id' => $commenter->getId(), |
| 67 | 67 | 'name' => $commenter->getName(), |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlChangelogRepository implements ChangelogRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlChangelogRepository implements ChangelogRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param ConnectonLocator $connections |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + {
|
|
| 18 | 18 | $this->connections = $connections; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | * |
| 25 | 25 | * @return array|false |
| 26 | 26 | */ |
| 27 | - public function getChanges($limit = null, $offset = 0) |
|
| 28 | - { |
|
| 27 | + public function getChanges($limit = null, $offset = 0) |
|
| 28 | + {
|
|
| 29 | 29 | $query = " |
| 30 | 30 | SELECT `id`, `message`, `message_short`, `datetime`, `commit_link` |
| 31 | 31 | FROM `jpemeric_stream`.`changelog` |