Passed
Push — Showing-Posts ( a72031...c030ab )
by Stone
02:07
created
App/Controllers/Admin/Post.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,10 +196,12 @@
 block discarded – undo
196 196
             $this->alertBox->setAlert("empty slug not allowed", "error");
197 197
         }
198 198
 
199
-        if ($postSlug != $originalPostSlug) //if the slug has been updated
199
+        if ($postSlug != $originalPostSlug) {
200
+            //if the slug has been updated
200 201
         {
201 202
             if (!$this->slugModel->isUnique($postSlug, "posts", "posts_slug")) {
202 203
                 $error = true;
204
+        }
203 205
                 $originalPostSlug = $this->slugModel->getSlugFromId($postId, "posts", "idposts", "posts_slug");
204 206
                 $this->alertBox->setAlert("Slug not unique", "error");
205 207
             }
Please login to merge, or discard this patch.
App/Models/PostModel.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -225,13 +225,13 @@
 block discarded – undo
225 225
     }
226 226
 
227 227
     /**
228
- * get the list of all the posts.
229
- * @param int $offset
230
- * @param array $select array of limiters [$key => $val] will convert to "where $key = $val"
231
- * @param int $limit
232
- * @return array
233
- * @throws \ErrorException
234
- */
228
+     * get the list of all the posts.
229
+     * @param int $offset
230
+     * @param array $select array of limiters [$key => $val] will convert to "where $key = $val"
231
+     * @param int $limit
232
+     * @return array
233
+     * @throws \ErrorException
234
+     */
235 235
     public function getPosts(int $offset = 0, array $select = [], int $limit = Constant::POSTS_PER_PAGE): array
236 236
     {
237 237
         return $this->getAllPublishedPosts($offset, $limit, false, $select);
Please login to merge, or discard this patch.