@@ -18,7 +18,7 @@ |
||
18 | 18 | * @param string $folder |
19 | 19 | * @return boolean |
20 | 20 | */ |
21 | -$buildFeed = function (Feed $feed, $folder) { |
|
21 | +$buildFeed = function(Feed $feed, $folder) { |
|
22 | 22 | $tempFeed = __DIR__ . "/../../public/{$folder}/rss-new.xml"; |
23 | 23 | $finalFeed = __DIR__ . "/../../public/{$folder}/rss.xml"; |
24 | 24 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * @param string $domain |
17 | 17 | * @return boolean |
18 | 18 | */ |
19 | -$buildSitemap = function (array $entries, $domain, $folder) { |
|
19 | +$buildSitemap = function(array $entries, $domain, $folder) { |
|
20 | 20 | $urlSet = new Urlset(); |
21 | 21 | foreach ($entries as $path => $entry) { |
22 | 22 | $url = new Url("{$domain}{$path}"); // todo better detection of domain by env |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | /********************************************* |
44 | 44 | * blog.jacobemerick.com |
45 | 45 | *********************************************/ |
46 | -$reduceToMostRecentBlogPost = function ($recentPost, $post) { |
|
46 | +$reduceToMostRecentBlogPost = function($recentPost, $post) { |
|
47 | 47 | if (is_null($recentPost)) { |
48 | 48 | return $post; |
49 | 49 | } |
50 | 50 | $postDate = new DateTime($post['date']); |
51 | 51 | $recentPostDate = new DateTime($recentPost['date']); |
52 | - return ($postDate > $recentPostDate) ? $post: $recentPost; |
|
52 | + return ($postDate > $recentPostDate) ? $post : $recentPost; |
|
53 | 53 | }; |
54 | 54 | |
55 | 55 | $blogPostsPerPage = 10; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ]; |
85 | 85 | |
86 | 86 | foreach ($blogCategoryArray as $blogCategory) { |
87 | - $blogCategoryPosts = array_filter($activeBlogPosts, function ($post) use ($blogCategory) { |
|
87 | + $blogCategoryPosts = array_filter($activeBlogPosts, function($post) use ($blogCategory) { |
|
88 | 88 | return $post['category'] == $blogCategory; |
89 | 89 | }); |
90 | 90 | $mostRecentBlogCategoryPost = array_reduce($blogCategoryPosts, $reduceToMostRecentBlogPost); |