@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | protected function execute($is_absolute = true) |
13 | 13 | { |
14 | 14 | preg_match_all(self::$LINK_PLACEHOLDER_MATCH, $this->content, $matches); |
15 | - foreach($matches[1] as $key => $match) |
|
15 | + foreach ($matches[1] as $key => $match) |
|
16 | 16 | { |
17 | - if(isset($matches[3][$key])) |
|
17 | + if (isset($matches[3][$key])) |
|
18 | 18 | $link_content = $this->get_link($match, $is_absolute, $matches[3][$key]); |
19 | 19 | else |
20 | 20 | $link_content = $this->get_link($match, $is_absolute); |
@@ -29,20 +29,20 @@ discard block |
||
29 | 29 | |
30 | 30 | $link = ''; |
31 | 31 | |
32 | - switch($type) |
|
32 | + switch ($type) |
|
33 | 33 | { |
34 | 34 | case 'blog' : |
35 | 35 | global $container; |
36 | 36 | $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
37 | 37 | $post = $repository->findPostByPath($uri); |
38 | 38 | |
39 | - if($post === NULL) |
|
39 | + if ($post === NULL) |
|
40 | 40 | return; |
41 | 41 | |
42 | 42 | $link .= ($is_absolute) ? Loader::getRootURL('blog') : '/'; |
43 | 43 | $link .= "{$post['category']}/{$post['path']}/"; |
44 | 44 | |
45 | - if($anchor == '') |
|
45 | + if ($anchor == '') |
|
46 | 46 | $anchor = $post['title']; |
47 | 47 | |
48 | 48 | break; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $link .= ($is_absolute) ? Loader::getRootURL('blog') : '/'; |
51 | 51 | $link .= "tag/{$uri}/"; |
52 | 52 | |
53 | - if($anchor == '') |
|
53 | + if ($anchor == '') |
|
54 | 54 | { |
55 | 55 | $anchor = $uri; |
56 | 56 | $anchor = str_replace('-', ' ', $anchor); |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | Loader::load('collector', 'waterfall/LogCollector'); |
63 | 63 | $log = LogCollector::getByAlias($uri); |
64 | 64 | |
65 | - if($log === NULL) |
|
65 | + if ($log === NULL) |
|
66 | 66 | return; |
67 | 67 | |
68 | 68 | $link .= ($is_absolute) ? Loader::getRootURL('waterfalls') : '/'; |
69 | 69 | $link .= "journal/{$log->alias}/"; |
70 | 70 | |
71 | - if($anchor == '') |
|
71 | + if ($anchor == '') |
|
72 | 72 | $anchor = $log->title; |
73 | 73 | |
74 | 74 | break; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | protected function execute($is_absolute = false, $size = 'medium') |
13 | 13 | { |
14 | 14 | preg_match_all(self::$PHOTO_PLACEHOLDER_MATCH, $this->content, $matches); |
15 | - foreach($matches[1] as $key => $match) |
|
15 | + foreach ($matches[1] as $key => $match) |
|
16 | 16 | { |
17 | 17 | $photo_content = $this->get_photo_content($match, $size, $is_absolute); |
18 | 18 | $this->content = str_replace($matches[0][$key], $photo_content, $this->content); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | Loader::load('collector', 'image/PhotoCollector'); |
39 | 39 | $photo_result = PhotoCollector::fetchRow($category, $photo); |
40 | - if($photo_result == false) |
|
40 | + if ($photo_result == false) |
|
41 | 41 | return ''; |
42 | 42 | |
43 | 43 | $height = $file_size[1]; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $description = $photo_result->description; |
46 | 46 | |
47 | 47 | $domain = '/'; |
48 | - if($is_absolute) |
|
48 | + if ($is_absolute) |
|
49 | 49 | $domain = Loader::getRootUrl('blog'); |
50 | 50 | |
51 | 51 | return sprintf(self::$PHOTO_CONTENT, $domain, $category, $photo, $size, $height, $width, $description, $description); |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | parent::__construct(); |
21 | 21 | |
22 | 22 | $id = URLDecode::getPiece(2); |
23 | - if(!$id || !is_numeric($id)) |
|
23 | + if (!$id || !is_numeric($id)) |
|
24 | 24 | $this->eject(); |
25 | 25 | |
26 | 26 | $post = $this->activityRepository->getActivityById($id); |
27 | - if(!$post) |
|
27 | + if (!$post) |
|
28 | 28 | $this->eject(); |
29 | 29 | |
30 | - if(URLDecode::getPiece(1) != $post['type']) |
|
30 | + if (URLDecode::getPiece(1) != $post['type']) |
|
31 | 31 | $this->eject(); |
32 | 32 | |
33 | 33 | $this->post = $post; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | private function get_title() |
61 | 61 | { |
62 | - switch($this->post['type']) |
|
62 | + switch ($this->post['type']) |
|
63 | 63 | { |
64 | 64 | case 'blog' : |
65 | 65 | return 'Jacob blogged'; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | private function get_description() |
89 | 89 | { |
90 | - switch($this->post['type']) |
|
90 | + switch ($this->post['type']) |
|
91 | 91 | { |
92 | 92 | case 'blog' : |
93 | 93 | return 'Another awesome blog post from Jacob. Did I mention it was awesome?'; |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); |
38 | 38 | $introduction_result = $repository->findByType('about'); |
39 | 39 | |
40 | - if($introduction_result !== null) |
|
40 | + if ($introduction_result !== null) |
|
41 | 41 | { |
42 | 42 | $introduction = array(); |
43 | 43 | $introduction['title'] = $introduction_result['title']; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $changelogRepository = new MysqlChangelogRepository($container['db_connection_locator']); |
33 | 33 | $changelog_result = $changelogRepository->getChanges(40); |
34 | 34 | |
35 | - foreach($changelog_result as $change) |
|
35 | + foreach ($changelog_result as $change) |
|
36 | 36 | { |
37 | 37 | $changelog[] = (object) array( |
38 | 38 | 'date' => (object) array( |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | parent::__construct(); |
25 | 25 | |
26 | - $this->add_js('https://maps.googleapis.com/maps/api/js?key=' . self::$API_KEY . '&sensor=false'); |
|
26 | + $this->add_js('https://maps.googleapis.com/maps/api/js?key='.self::$API_KEY.'&sensor=false'); |
|
27 | 27 | $this->add_waterfall_js(); |
28 | 28 | } |
29 | 29 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | parent::set_head_data(); |
33 | 33 | |
34 | - $this->set_title(self::$TITLE . ' | ' . self::$WEBSITE_TITLE); |
|
34 | + $this->set_title(self::$TITLE.' | '.self::$WEBSITE_TITLE); |
|
35 | 35 | $this->set_description(self::$DESCRIPTION); |
36 | 36 | $this->set_keywords(self::$KEYWORD_ARRAY); |
37 | 37 | } |