Passed
Branch master (4bae09)
by Gino
02:07
created
components/TagPosts.php 1 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.