Completed
Push — master ( 8bc312...e53390 )
by Gino
02:00
created
components/TagPosts.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public $lastPage;
63 63
 
64
-     /**
65
-     * Reference to the page name for linking to posts.
66
-     * @var string
67
-     */
64
+        /**
65
+         * Reference to the page name for linking to posts.
66
+         * @var string
67
+         */
68 68
     public $postPage;
69 69
 
70 70
     /**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             ->orWhere('slug', $this->property('tag'))
163 163
             ->with(['posts' => function($posts) {
164 164
                 $posts->skip($this->resultsPerPage * ($this->currentPage - 1))
165
-                      ->take($this->resultsPerPage);
165
+                        ->take($this->resultsPerPage);
166 166
             }])
167 167
             ->first();
168 168
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,8 +218,12 @@
 block discarded – undo
218 218
         $this->lastPage = ceil($this->totalPosts / $this->resultsPerPage);
219 219
 
220 220
         // Prevent the current page from being one that doesn't exist
221
-        if ($this->currentPage < 1) $this->currentPage = 1;
222
-        if ($this->currentPage > $this->lastPage) $this->currentPage = $this->lastPage;
221
+        if ($this->currentPage < 1) {
222
+            $this->currentPage = 1;
223
+        }
224
+        if ($this->currentPage > $this->lastPage) {
225
+            $this->currentPage = $this->lastPage;
226
+        }
223 227
 
224 228
         // Calculate the previous page
225 229
         $this->previousPage = $this->currentPage > 1
Please login to merge, or discard this patch.
components/TagList.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,8 +130,9 @@
 block discarded – undo
130 130
         $query->orderBy($key, $this->property('direction'));
131 131
 
132 132
         // Limit the number of results
133
-        if ($take = intval($this->property('results')))
134
-            $query->take($take);
133
+        if ($take = intval($this->property('results'))) {
134
+                    $query->take($take);
135
+        }
135 136
 
136 137
         $tags = $query->get();
137 138
 
Please login to merge, or discard this patch.
components/RelatedPosts.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,9 @@
 block discarded – undo
121 121
             ->first();
122 122
 
123 123
         // Abort if there is no source, or it has no tags
124
-        if (!$post || (!$tagIds = $post->tags->lists('id')))
125
-            return;
124
+        if (!$post || (!$tagIds = $post->tags->lists('id'))) {
125
+                    return;
126
+        }
126 127
 
127 128
         // Start building our query for related posts
128 129
         $query = Post::isPublished()
Please login to merge, or discard this patch.