Completed
Pull Request — feature-output-formats (#273)
by Arnaud
06:28 queued 04:24
created
src/Collection/Page/Collection.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     /**
19 19
      * Sort items by date: the most recent first.
20 20
      *
21
-     * @return self
21
+     * @return string|null
22 22
      */
23 23
     public function sortByDate(): self
24 24
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function sortByDate(): self
24 24
     {
25
-        return $this->usort(function ($a, $b) {
25
+        return $this->usort(function($a, $b) {
26 26
             if (!isset($a['date'])) {
27 27
                 return -1;
28 28
             }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function sortByTitle(): self
46 46
     {
47
-        return $this->usort(function ($a, $b) {
47
+        return $this->usort(function($a, $b) {
48 48
             return strnatcmp($a['title'], $b['title']);
49 49
         });
50 50
     }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function sortByWeight(): self
58 58
     {
59
-        return $this->usort(function ($a, $b) {
59
+        return $this->usort(function($a, $b) {
60 60
             if (!isset($a['weight'])) {
61 61
                 return -1;
62 62
             }
Please login to merge, or discard this patch.
src/Generator/Redirect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         $generatedPages = new PagesCollection('generator-redirect');
25 25
 
26
-        $filteredPages = $pagesCollection->filter(function (Page $page) {
26
+        $filteredPages = $pagesCollection->filter(function(Page $page) {
27 27
             return null !== $page->getVariable('redirect')
28 28
                 && $page->getVariable('layout') != 'redirect';
29 29
         });
Please login to merge, or discard this patch.
src/Generator/Pagination.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $paginationSections = $this->config->get('site.pagination.sections');
36 36
 
37 37
         // filter pages: home and sections
38
-        $filteredPages = $pagesCollection->filter(function (Page $page) {
38
+        $filteredPages = $pagesCollection->filter(function(Page $page) {
39 39
             return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION]);
40 40
         });
41 41
         /* @var $page Page */
Please login to merge, or discard this patch.
src/Collection/Page/Prefix.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      *
39 39
      * @param string $string
40 40
      *
41
-     * @return string[]|null
41
+     * @return string|null
42 42
      */
43 43
     public static function getPrefix(string $string): ?string
44 44
     {
Please login to merge, or discard this patch.
src/Generator/Homepage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         $generatedPages = new PagesCollection();
26 26
 
27
-        $subPages = $pagesCollection->filter(function (Page $page) {
27
+        $subPages = $pagesCollection->filter(function(Page $page) {
28 28
             return $page->getType() == TYPE::PAGE;
29 29
         });
30 30
         $pages = $subPages->sortByDate();
Please login to merge, or discard this patch.