Completed
Push — master ( cde30c...460d04 )
by Jacob
03:56
created
script/cron/generate-rss-feeds.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
script/cron/generate-sitemaps.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.