@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @param string $domain |
26 | 26 | * @return boolean |
27 | 27 | */ |
28 | -$buildSitemap = function (array $entries, $domain, $folder) { |
|
28 | +$buildSitemap = function(array $entries, $domain, $folder) { |
|
29 | 29 | $urlSet = new Urlset(); |
30 | 30 | foreach ($entries as $path => $entry) { |
31 | 31 | $url = new Url("{$domain}{$path}"); // todo better detection of domain by env |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | /********************************************* |
53 | 53 | * blog.jacobemerick.com |
54 | 54 | *********************************************/ |
55 | -$reduceToMostRecentBlogPost = function ($recentPost, $post) { |
|
55 | +$reduceToMostRecentBlogPost = function($recentPost, $post) { |
|
56 | 56 | if (is_null($recentPost)) { |
57 | 57 | return $post; |
58 | 58 | } |
59 | 59 | $postDate = new DateTime($post['date']); |
60 | 60 | $recentPostDate = new DateTime($recentPost['date']); |
61 | - return ($postDate > $recentPostDate) ? $post: $recentPost; |
|
61 | + return ($postDate > $recentPostDate) ? $post : $recentPost; |
|
62 | 62 | }; |
63 | 63 | |
64 | 64 | $blogPostsPerPage = 10; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | ]; |
94 | 94 | |
95 | 95 | foreach ($blogCategoryArray as $blogCategory) { |
96 | - $blogCategoryPosts = array_filter($activeBlogPosts, function ($post) use ($blogCategory) { |
|
96 | + $blogCategoryPosts = array_filter($activeBlogPosts, function($post) use ($blogCategory) { |
|
97 | 97 | return $post['category'] == $blogCategory; |
98 | 98 | }); |
99 | 99 | $mostRecentBlogCategoryPost = array_reduce($blogCategoryPosts, $reduceToMostRecentBlogPost); |
@@ -206,13 +206,13 @@ discard block |
||
206 | 206 | /********************************************* |
207 | 207 | * lifestream.jacobemerick.com |
208 | 208 | *********************************************/ |
209 | -$reduceToMostRecentStreamPost = function ($recentPost, $post) { |
|
209 | +$reduceToMostRecentStreamPost = function($recentPost, $post) { |
|
210 | 210 | if (is_null($recentPost)) { |
211 | 211 | return $post; |
212 | 212 | } |
213 | 213 | $postDate = new DateTime($post['date']); |
214 | 214 | $recentPostDate = new DateTime($recentPost['date']); |
215 | - return ($postDate > $recentPostDate) ? $post: $recentPost; |
|
215 | + return ($postDate > $recentPostDate) ? $post : $recentPost; |
|
216 | 216 | }; |
217 | 217 | |
218 | 218 | $streamPostsPerPage = 15; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | ]; |
250 | 250 | |
251 | 251 | foreach ($streamTypeArray as $streamType) { |
252 | - $streamTypePosts = array_filter($streamPosts, function ($post) use ($streamType) { |
|
252 | + $streamTypePosts = array_filter($streamPosts, function($post) use ($streamType) { |
|
253 | 253 | return $post['type'] == $streamType; |
254 | 254 | }); |
255 | 255 | $mostRecentStreamTypePost = array_reduce($streamTypePosts, $reduceToMostRecentStreamPost); |
@@ -379,13 +379,13 @@ discard block |
||
379 | 379 | /********************************************* |
380 | 380 | * waterfall.jacobemerick.com |
381 | 381 | *********************************************/ |
382 | -$reduceToMostRecentJournalLog = function ($recentLog, $log) { |
|
382 | +$reduceToMostRecentJournalLog = function($recentLog, $log) { |
|
383 | 383 | if (is_null($recentLog)) { |
384 | 384 | return $log; |
385 | 385 | } |
386 | 386 | $logDate = new DateTime($log['publish_date']); |
387 | 387 | $recentLogDate = new DateTime($recentLog['publish_date']); |
388 | - return ($logDate > $recentLogDate) ? log: $recentLog; |
|
388 | + return ($logDate > $recentLogDate) ? log : $recentLog; |
|
389 | 389 | }; |
390 | 390 | |
391 | 391 | $waterfallRepository = new WaterfallRepository($container['db_connection_locator']); |
@@ -4,5 +4,5 @@ |
||
4 | 4 | |
5 | 5 | interface PieceRepositoryInterface |
6 | 6 | { |
7 | - public function getPieces($limit = null, $offset= 0); |
|
7 | + public function getPieces($limit = null, $offset = 0); |
|
8 | 8 | } |
@@ -4,5 +4,5 @@ |
||
4 | 4 | |
5 | 5 | interface LogRepositoryInterface |
6 | 6 | { |
7 | - public function getActiveLogs($limit = null, $offset= 0); |
|
7 | + public function getActiveLogs($limit = null, $offset = 0); |
|
8 | 8 | } |
@@ -4,5 +4,5 @@ |
||
4 | 4 | |
5 | 5 | interface WaterfallRepositoryInterface |
6 | 6 | { |
7 | - public function getWaterfalls($limit = null, $offset= 0); |
|
7 | + public function getWaterfalls($limit = null, $offset = 0); |
|
8 | 8 | } |
@@ -4,5 +4,5 @@ |
||
4 | 4 | |
5 | 5 | interface CommentRepositoryInterface |
6 | 6 | { |
7 | - public function getActiveCommentsBySite($site, $limit = null, $offset= 0); |
|
7 | + public function getActiveCommentsBySite($site, $limit = null, $offset = 0); |
|
8 | 8 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @param string $folder |
17 | 17 | * @return boolean |
18 | 18 | */ |
19 | -$buildFeed = function (Feed $feed, $folder, $name = 'rss') { |
|
19 | +$buildFeed = function(Feed $feed, $folder, $name = 'rss') { |
|
20 | 20 | $tempFeed = __DIR__ . "/../../public/{$folder}/{$name}-new.xml"; |
21 | 21 | $finalFeed = __DIR__ . "/../../public/{$folder}/{$name}.xml"; |
22 | 22 |
@@ -406,7 +406,7 @@ |
||
406 | 406 | |
407 | 407 | $messageLong = $twitterData['text']; |
408 | 408 | krsort($entityHolder); |
409 | - foreach($entityHolder as $entity) |
|
409 | + foreach ($entityHolder as $entity) |
|
410 | 410 | { |
411 | 411 | $messageLong = substr_replace( |
412 | 412 | $messageLong, |