Passed
Push — Showing-Posts ( f3dee8...5be296 )
by Stone
02:03
created
App/Models/CategoryModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         $categories = $this->getCategories();
30 30
         foreach ($categories as $category) {
31 31
             $data += [
32
-                $category->category_name => '/category/posts/' . $category->categories_slug
32
+                $category->category_name => '/category/posts/'.$category->categories_slug
33 33
             ];
34 34
         }
35 35
         return $data;
Please login to merge, or discard this patch.
App/Controllers/Modules/Pagination.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             throw new \Exception("Pagination Error", "404");
27 27
         }
28 28
         $pageNo = $this->removeFromBeginning($page, "page-");
29
-        if(!filter_var($pageNo, FILTER_VALIDATE_INT)){
29
+        if (!filter_var($pageNo, FILTER_VALIDATE_INT)) {
30 30
             throw new \Exception("Invalid page number");
31 31
         }
32 32
         $offset = ($pageNo - 1) * $rowsPerPage;
Please login to merge, or discard this patch.
App/Controllers/Ajax/ImageUpload.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
     private function getFilename(string $folder, string $file):string
43 43
     {
44 44
 
45
-        $fileUrl = $folder . $file;
45
+        $fileUrl = $folder.$file;
46 46
         $filePath = $_SERVER['DOCUMENT_ROOT']."/public/".$fileUrl;
47
-        if(file_exists($filePath) !== 1)
47
+        if (file_exists($filePath) !== 1)
48 48
         {
49 49
             $fileNum = 0;
50
-            while(file_exists($filePath))
50
+            while (file_exists($filePath))
51 51
             {
52 52
                 $fileUrl = $folder.$fileNum."_".$file;
53 53
                 $filePath = $_SERVER['DOCUMENT_ROOT']."/public/".$fileUrl;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
             // Respond to the successful upload with JSON.
77 77
             echo json_encode(array('location' => $filetowrite));
78
-        } else {
78
+        }else {
79 79
             // Notify editor that the upload failed
80 80
             echo json_encode(array('error' => 'Upload failed'));
81 81
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
             // Respond to the successful upload with JSON.
111 111
             echo json_encode(array('location' => $filetowrite));
112
-        } else {
112
+        }else {
113 113
             // Notify editor that the upload failed
114 114
             header("HTTP/1.1 500 Server Error");
115 115
         }
Please login to merge, or discard this patch.