Passed
Push — Showing-Posts ( 0498b6...15c50f )
by Stone
01:42
created
App/Models/PostModel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->query($sql);
114 114
         if ($select != null) {
115 115
             foreach ($select as $col => $val) {
116
-                $this->bind(":" . $col, $val);
116
+                $this->bind(":".$col, $val);
117 117
             }
118 118
         }
119 119
         $this->bind(":limit", $limit);
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
      * @return int number of posts
131 131
      * @throws Exception
132 132
      */
133
-    private function countNumberPosts(array $select = [], $published=true): int
133
+    private function countNumberPosts(array $select = [], $published = true): int
134 134
     {
135 135
         $sql = "SELECT COUNT(*) FROM $this->postsTbl";
136 136
         if ($this->queryWithTags) {
137 137
             $sql .= " LEFT JOIN $this->postTagTbl ON $this->postsTbl.idposts = $this->postTagTbl.post_idposts";
138 138
         }
139
-        if($published)
139
+        if ($published)
140 140
         {
141 141
             $sql .= " WHERE published = 1";
142 142
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $this->query($sql);
152 152
         if ($select != null) {
153 153
             foreach ($select as $col => $val) {
154
-                $this->bind(":" . $col, $val);
154
+                $this->bind(":".$col, $val);
155 155
             }
156 156
         }
157 157
         $this->execute();
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
         $this->execute();
336 336
 
337
-        return (int)$this->dbh->lastInsertId();
337
+        return (int) $this->dbh->lastInsertId();
338 338
     }
339 339
 
340 340
     /**
Please login to merge, or discard this patch.