GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 2.8 ( 41d2f7...b9ed1f )
by Thorsten
25:52 queued 10:52
created
phpmyfaq/inc/PMF/DB/Mysql.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string $password MySQL Password
69 69
      * @param string $database       MySQL Database name
70 70
      *
71
-     * @return boolean
71
+     * @return null|boolean
72 72
      */
73 73
     public function connect($host, $user, $password, $database = '')
74 74
     {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     /**
135 135
      * Fetch a result row as an object
136 136
      *
137
-     * @param  mixed $result Resultset
137
+     * @param  resource $result Resultset
138 138
      * @return mixed
139 139
      */
140 140
     public function fetchObject($result)
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      *
274 274
      * @param  string $prefix Table prefix
275 275
      *
276
-     * @return array
276
+     * @return string[]
277 277
      */
278 278
     public function getTableNames($prefix = '')
279 279
     {
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     {
175 175
         $ret = array();
176 176
         if (false === $result) {
177
-            throw new Exception('Error while fetching result: ' . $this->error());
177
+            throw new Exception('Error while fetching result: '.$this->error());
178 178
         }
179 179
         
180 180
         while ($row = $this->fetchObject($result)) {
@@ -303,41 +303,41 @@  discard block
 block discarded – undo
303 303
     public function getTableNames($prefix = '')
304 304
     {
305 305
         return $this->tableNames[] = array(
306
-            $prefix . 'faqadminlog',
307
-            $prefix . 'faqattachment',
308
-            $prefix . 'faqattachment_file',
309
-            $prefix . 'faqcaptcha',
310
-            $prefix . 'faqcategories',
311
-            $prefix . 'faqcategory_group',
312
-            $prefix . 'faqcategory_user',
313
-            $prefix . 'faqcategoryrelations',
314
-            $prefix . 'faqchanges',
315
-            $prefix . 'faqcomments',
316
-            $prefix . 'faqconfig',
317
-            $prefix . 'faqdata',
318
-            $prefix . 'faqdata_group',
319
-            $prefix . 'faqdata_revisions',
320
-            $prefix . 'faqdata_tags',
321
-            $prefix . 'faqdata_user',
322
-            $prefix . 'faqglossary',
323
-            $prefix . 'faqgroup',
324
-            $prefix . 'faqgroup_right',
325
-            $prefix . 'faqinstances',
326
-            $prefix . 'faqinstances_config',
327
-            $prefix . 'faqnews',
328
-            $prefix . 'faqquestions',
329
-            $prefix . 'faqright',
330
-            $prefix . 'faqsearches',
331
-            $prefix . 'faqsessions',
332
-            $prefix . 'faqstopwords',
333
-            $prefix . 'faqtags',
334
-            $prefix . 'faquser',
335
-            $prefix . 'faquser_group',
336
-            $prefix . 'faquser_right',
337
-            $prefix . 'faquserdata',
338
-            $prefix . 'faquserlogin',
339
-            $prefix . 'faqvisits',
340
-            $prefix . 'faqvoting'
306
+            $prefix.'faqadminlog',
307
+            $prefix.'faqattachment',
308
+            $prefix.'faqattachment_file',
309
+            $prefix.'faqcaptcha',
310
+            $prefix.'faqcategories',
311
+            $prefix.'faqcategory_group',
312
+            $prefix.'faqcategory_user',
313
+            $prefix.'faqcategoryrelations',
314
+            $prefix.'faqchanges',
315
+            $prefix.'faqcomments',
316
+            $prefix.'faqconfig',
317
+            $prefix.'faqdata',
318
+            $prefix.'faqdata_group',
319
+            $prefix.'faqdata_revisions',
320
+            $prefix.'faqdata_tags',
321
+            $prefix.'faqdata_user',
322
+            $prefix.'faqglossary',
323
+            $prefix.'faqgroup',
324
+            $prefix.'faqgroup_right',
325
+            $prefix.'faqinstances',
326
+            $prefix.'faqinstances_config',
327
+            $prefix.'faqnews',
328
+            $prefix.'faqquestions',
329
+            $prefix.'faqright',
330
+            $prefix.'faqsearches',
331
+            $prefix.'faqsessions',
332
+            $prefix.'faqstopwords',
333
+            $prefix.'faqtags',
334
+            $prefix.'faquser',
335
+            $prefix.'faquser_group',
336
+            $prefix.'faquser_right',
337
+            $prefix.'faquserdata',
338
+            $prefix.'faquserlogin',
339
+            $prefix.'faqvisits',
340
+            $prefix.'faqvoting'
341 341
         );
342 342
     }
343 343
 
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_DB_Mysql class provides methods and functions for MySQL 5.0.x,
4
- * 5.1.x, and 5.5.x databases.
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   DB
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @author    Meikel Katzengreis <[email protected]>
16
- * @author    Tom Rochester <[email protected]>
17
- * @copyright 2003-2016 phpMyFAQ Team
18
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
19
- * @link      http://www.phpmyfaq.de
20
- * @package   2003-02-24
21
- */
3
+     * The PMF_DB_Mysql class provides methods and functions for MySQL 5.0.x,
4
+     * 5.1.x, and 5.5.x databases.
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   DB
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @author    Meikel Katzengreis <[email protected]>
16
+     * @author    Tom Rochester <[email protected]>
17
+     * @copyright 2003-2016 phpMyFAQ Team
18
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
19
+     * @link      http://www.phpmyfaq.de
20
+     * @package   2003-02-24
21
+     */
22 22
 
23 23
 if (!defined('IS_VALID_PHPMYFAQ')) {
24 24
     exit();
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
              MAX(%s) AS current_id
228 228
          FROM
229 229
              %s",
230
-           $id,
231
-           $table);
230
+            $id,
231
+            $table);
232 232
            
233 233
         $result    = $this->query($select);
234 234
         $currentId = mysql_result($result, 0, 'current_id');
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
         return ($currentId + 1);
237 237
     }
238 238
 
239
-     /**
240
-      * Returns the error string.
241
-      *
242
-      * @return string
243
-      */
239
+        /**
240
+         * Returns the error string.
241
+         *
242
+         * @return string
243
+         */
244 244
     public function error()
245 245
     {
246 246
         return mysql_error();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/DB/Mysqli.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @throws PMF_Exception
70 70
      *
71
-     * @return  boolean true, if connected, otherwise false
71
+     * @return  null|boolean true, if connected, otherwise false
72 72
      */
73 73
     public function connect($host, $user, $password, $database = '')
74 74
     {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      *
138 138
      * This function fetches a result row as an object.
139 139
      *
140
-     * @param   mixed $result
140
+     * @param   resource $result
141 141
      * @return  mixed
142 142
      */
143 143
     public function fetchObject($result)
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      *
283 283
      * @param  string $prefix Table prefix
284 284
      *
285
-     * @return array
285
+     * @return string[]
286 286
      */
287 287
     public function getTableNames($prefix = '')
288 288
     {
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $this->conn = new mysqli($host, $user, $password);
76 76
 
77 77
         if ($this->conn->connect_error) {
78
-            PMF_Db::errorPage($this->conn->connect_errno . ': ' . $this->conn->connect_error);
78
+            PMF_Db::errorPage($this->conn->connect_errno.': '.$this->conn->connect_error);
79 79
             die();
80 80
         }
81 81
         
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
         }
86 86
 
87 87
         if ('' !== $database) {
88
-            if (! $this->conn->select_db($database)) {
89
-                throw new PMF_Exception('Cannot connect to database ' . $database);
88
+            if (!$this->conn->select_db($database)) {
89
+                throw new PMF_Exception('Cannot connect to database '.$database);
90 90
             }
91 91
         }
92 92
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $ret = array();
173 173
 
174 174
         if (false === $result) {
175
-            throw new Exception('Error while fetching result: ' . $this->error());
175
+            throw new Exception('Error while fetching result: '.$this->error());
176 176
         }
177 177
         
178 178
         while ($row = $this->fetchObject($result)) {
@@ -287,41 +287,41 @@  discard block
 block discarded – undo
287 287
     public function getTableNames($prefix = '')
288 288
     {
289 289
         return $this->tableNames[] = array(
290
-            $prefix . 'faqadminlog',
291
-            $prefix . 'faqattachment',
292
-            $prefix . 'faqattachment_file',
293
-            $prefix . 'faqcaptcha',
294
-            $prefix . 'faqcategories',
295
-            $prefix . 'faqcategory_group',
296
-            $prefix . 'faqcategory_user',
297
-            $prefix . 'faqcategoryrelations',
298
-            $prefix . 'faqchanges',
299
-            $prefix . 'faqcomments',
300
-            $prefix . 'faqconfig',
301
-            $prefix . 'faqdata',
302
-            $prefix . 'faqdata_group',
303
-            $prefix . 'faqdata_revisions',
304
-            $prefix . 'faqdata_tags',
305
-            $prefix . 'faqdata_user',
306
-            $prefix . 'faqglossary',
307
-            $prefix . 'faqgroup',
308
-            $prefix . 'faqgroup_right',
309
-            $prefix . 'faqinstances',
310
-            $prefix . 'faqinstances_config',
311
-            $prefix . 'faqnews',
312
-            $prefix . 'faqquestions',
313
-            $prefix . 'faqright',
314
-            $prefix . 'faqsearches',
315
-            $prefix . 'faqsessions',
316
-            $prefix . 'faqstopwords',
317
-            $prefix . 'faqtags',
318
-            $prefix . 'faquser',
319
-            $prefix . 'faquser_group',
320
-            $prefix . 'faquser_right',
321
-            $prefix . 'faquserdata',
322
-            $prefix . 'faquserlogin',
323
-            $prefix . 'faqvisits',
324
-            $prefix . 'faqvoting'
290
+            $prefix.'faqadminlog',
291
+            $prefix.'faqattachment',
292
+            $prefix.'faqattachment_file',
293
+            $prefix.'faqcaptcha',
294
+            $prefix.'faqcategories',
295
+            $prefix.'faqcategory_group',
296
+            $prefix.'faqcategory_user',
297
+            $prefix.'faqcategoryrelations',
298
+            $prefix.'faqchanges',
299
+            $prefix.'faqcomments',
300
+            $prefix.'faqconfig',
301
+            $prefix.'faqdata',
302
+            $prefix.'faqdata_group',
303
+            $prefix.'faqdata_revisions',
304
+            $prefix.'faqdata_tags',
305
+            $prefix.'faqdata_user',
306
+            $prefix.'faqglossary',
307
+            $prefix.'faqgroup',
308
+            $prefix.'faqgroup_right',
309
+            $prefix.'faqinstances',
310
+            $prefix.'faqinstances_config',
311
+            $prefix.'faqnews',
312
+            $prefix.'faqquestions',
313
+            $prefix.'faqright',
314
+            $prefix.'faqsearches',
315
+            $prefix.'faqsessions',
316
+            $prefix.'faqstopwords',
317
+            $prefix.'faqtags',
318
+            $prefix.'faquser',
319
+            $prefix.'faquser_group',
320
+            $prefix.'faquser_right',
321
+            $prefix.'faquserdata',
322
+            $prefix.'faquserlogin',
323
+            $prefix.'faqvisits',
324
+            $prefix.'faqvoting'
325 325
         );
326 326
     }
327 327
 
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_DB_Mysqli class provides methods and functions for MySQL 5.x and
4
- * MariaDB 5.x databases
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   DB
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @author    David Soria Parra <[email protected]>
16
- * @copyright 2005-2016 phpMyFAQ Team
17
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
- * @link      http://www.phpmyfaq.de
19
- * @package   2005-02-21
20
- */
3
+     * The PMF_DB_Mysqli class provides methods and functions for MySQL 5.x and
4
+     * MariaDB 5.x databases
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   DB
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @author    David Soria Parra <[email protected]>
16
+     * @copyright 2005-2016 phpMyFAQ Team
17
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
+     * @link      http://www.phpmyfaq.de
19
+     * @package   2005-02-21
20
+     */
21 21
 
22 22
 if (!defined('IS_VALID_PHPMYFAQ')) {
23 23
     exit();
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
     }
123 123
 
124 124
     /**
125
-    * Escapes a string for use in a query
126
-    *
127
-    * @param   string
128
-    * @return  string
129
-    */
125
+     * Escapes a string for use in a query
126
+     *
127
+     * @param   string
128
+     * @return  string
129
+     */
130 130
     public function escape($string)
131 131
     {
132 132
         return $this->conn->real_escape_string($string);
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
         return $this->sqllog;
208 208
     }
209 209
 
210
-     /**
211
-      * This function returns the table status.
212
-      *
213
-      * @return array
214
-      */
210
+        /**
211
+         * This function returns the table status.
212
+         *
213
+         * @return array
214
+         */
215 215
     public function getTableStatus()
216 216
     {
217 217
         $arr = array();
@@ -237,19 +237,19 @@  discard block
 block discarded – undo
237 237
                MAX(%s) AS current_id
238 238
            FROM
239 239
                %s",
240
-           $id,
241
-           $table);
240
+            $id,
241
+            $table);
242 242
            
243 243
         $result  = $this->query($select);
244 244
         $current = $result->fetch_row();
245 245
         return $current[0] + 1;
246 246
     }
247 247
 
248
-     /**
249
-      * Returns the error string.
250
-      *
251
-      * @return string
252
-      */
248
+        /**
249
+         * Returns the error string.
250
+         *
251
+         * @return string
252
+         */
253 253
     public function error()
254 254
     {
255 255
         return $this->conn->error;
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/DB/Pgsql.php 3 patches
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @param string $password Password
67 67
      * @param string $database Database name
68 68
      *
69
-     * @return boolean true, if connected, otherwise false
69
+     * @return null|boolean true, if connected, otherwise false
70 70
      */
71 71
     public function connect ($host, $user, $password, $database = '')
72 72
     {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Fetch a result row as an object
134 134
      *
135
-     * @param   mixed $result
135
+     * @param   resource $result
136 136
      * @return  mixed
137 137
      */
138 138
     public function fetchObject($result)
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     /**
191 191
      * Logs the queries
192 192
      *
193
-     * @return  integer
193
+     * @return  string
194 194
      */
195 195
     public function log()
196 196
     {
@@ -201,6 +201,7 @@  discard block
 block discarded – undo
201 201
      * Returns just one row
202 202
      *
203 203
      * @param  string
204
+     * @param string $query
204 205
      * @return string
205 206
      */
206 207
     private function getOne($query)
@@ -287,7 +288,7 @@  discard block
 block discarded – undo
287 288
      *
288 289
      * @param  string $prefix Table prefix
289 290
      *
290
-     * @return array
291
+     * @return string[]
291 292
      */
292 293
     public function getTableNames($prefix = '')
293 294
     {
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @return boolean true, if connected, otherwise false
70 70
      */
71
-    public function connect ($host, $user, $password, $database = '')
71
+    public function connect($host, $user, $password, $database = '')
72 72
     {
73 73
         $connectionString = sprintf(
74 74
             'host=%s port=5432 dbname=%s user=%s password=%s',
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     {
167 167
         $ret = array();
168 168
         if (false === $result) {
169
-            throw new Exception('Error while fetching result: ' . $this->error());
169
+            throw new Exception('Error while fetching result: '.$this->error());
170 170
         }
171 171
         
172 172
         while ($row = $this->fetchObject($result)) {
@@ -292,41 +292,41 @@  discard block
 block discarded – undo
292 292
     public function getTableNames($prefix = '')
293 293
     {
294 294
         return $this->tableNames[] = array(
295
-            $prefix . 'faqadminlog',
296
-            $prefix . 'faqattachment',
297
-            $prefix . 'faqattachment_file',
298
-            $prefix . 'faqcaptcha',
299
-            $prefix . 'faqcategories',
300
-            $prefix . 'faqcategory_group',
301
-            $prefix . 'faqcategory_user',
302
-            $prefix . 'faqcategoryrelations',
303
-            $prefix . 'faqchanges',
304
-            $prefix . 'faqcomments',
305
-            $prefix . 'faqconfig',
306
-            $prefix . 'faqdata',
307
-            $prefix . 'faqdata_group',
308
-            $prefix . 'faqdata_revisions',
309
-            $prefix . 'faqdata_tags',
310
-            $prefix . 'faqdata_user',
311
-            $prefix . 'faqglossary',
312
-            $prefix . 'faqgroup',
313
-            $prefix . 'faqgroup_right',
314
-            $prefix . 'faqinstances',
315
-            $prefix . 'faqinstances_config',
316
-            $prefix . 'faqnews',
317
-            $prefix . 'faqquestions',
318
-            $prefix . 'faqright',
319
-            $prefix . 'faqsearches',
320
-            $prefix . 'faqsessions',
321
-            $prefix . 'faqstopwords',
322
-            $prefix . 'faqtags',
323
-            $prefix . 'faquser',
324
-            $prefix . 'faquser_group',
325
-            $prefix . 'faquser_right',
326
-            $prefix . 'faquserdata',
327
-            $prefix . 'faquserlogin',
328
-            $prefix . 'faqvisits',
329
-            $prefix . 'faqvoting'
295
+            $prefix.'faqadminlog',
296
+            $prefix.'faqattachment',
297
+            $prefix.'faqattachment_file',
298
+            $prefix.'faqcaptcha',
299
+            $prefix.'faqcategories',
300
+            $prefix.'faqcategory_group',
301
+            $prefix.'faqcategory_user',
302
+            $prefix.'faqcategoryrelations',
303
+            $prefix.'faqchanges',
304
+            $prefix.'faqcomments',
305
+            $prefix.'faqconfig',
306
+            $prefix.'faqdata',
307
+            $prefix.'faqdata_group',
308
+            $prefix.'faqdata_revisions',
309
+            $prefix.'faqdata_tags',
310
+            $prefix.'faqdata_user',
311
+            $prefix.'faqglossary',
312
+            $prefix.'faqgroup',
313
+            $prefix.'faqgroup_right',
314
+            $prefix.'faqinstances',
315
+            $prefix.'faqinstances_config',
316
+            $prefix.'faqnews',
317
+            $prefix.'faqquestions',
318
+            $prefix.'faqright',
319
+            $prefix.'faqsearches',
320
+            $prefix.'faqsessions',
321
+            $prefix.'faqstopwords',
322
+            $prefix.'faqtags',
323
+            $prefix.'faquser',
324
+            $prefix.'faquser_group',
325
+            $prefix.'faquser_right',
326
+            $prefix.'faquserdata',
327
+            $prefix.'faquserlogin',
328
+            $prefix.'faqvisits',
329
+            $prefix.'faqvoting'
330 330
         );
331 331
     }
332 332
 
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_DB_Pgsql class provides methods and functions for a PostgreSQL
4
- * database.
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   DB
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @author    Tom Rochester <[email protected]>
16
- * @copyright 2003-2016 phpMyFAQ Team
17
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
- * @link      http://www.phpmyfaq.de
19
- * @package   2003-02-24
20
- */
3
+     * The PMF_DB_Pgsql class provides methods and functions for a PostgreSQL
4
+     * database.
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   DB
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @author    Tom Rochester <[email protected]>
16
+     * @copyright 2003-2016 phpMyFAQ Team
17
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
+     * @link      http://www.phpmyfaq.de
19
+     * @package   2003-02-24
20
+     */
21 21
 
22 22
 if (!defined('IS_VALID_PHPMYFAQ')) {
23 23
     exit();
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
     }
120 120
 
121 121
     /**
122
-    * Escapes a string for use in a query
123
-    *
124
-    * @param   string
125
-    * @return  string
126
-    */
122
+     * Escapes a string for use in a query
123
+     *
124
+     * @param   string
125
+     * @return  string
126
+     */
127 127
     public function escape($string)
128 128
     {
129 129
         return pg_escape_string($this->conn, $string);
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/DB/Sqlite.php 3 patches
Doc Comments   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string
69 69
      * @param string
70 70
      *
71
-     * @return  boolean
71
+     * @return  null|boolean
72 72
      */
73 73
     public function connect($host, $user, $passwd, $db = '')
74 74
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @param integer $offset
100 100
      * @param integer $rowcount
101 101
      *
102
-     * @return  mixed $result
102
+     * @return  SQLiteResult $result
103 103
      */
104 104
     public function query($query, $offset = 0, $rowcount = 0)
105 105
     {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     /**
146 146
      * Fetch a result row as an associate array
147 147
      *
148
-     * @param   mixed $result
148
+     * @param   SQLiteResult $result
149 149
      * @return  array
150 150
      */
151 151
     public function fetchArray($result)
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     /**
180 180
      * Number of rows in a result
181 181
      *
182
-     * @param   mixed $result
182
+     * @param   SQLiteResult $result
183 183
      * @return  integer
184 184
      */
185 185
     public function numRows($result)
@@ -190,8 +190,7 @@  discard block
 block discarded – undo
190 190
     /**
191 191
      * Logs the queries
192 192
      *
193
-     * @param   mixed $result
194
-     * @return  integer
193
+     * @return  string
195 194
      */
196 195
     public function log()
197 196
     {
@@ -270,7 +269,7 @@  discard block
 block discarded – undo
270 269
      *
271 270
      * @param  string $prefix Table prefix
272 271
      *
273
-     * @return array
272
+     * @return string[]
274 273
      */
275 274
     public function getTableNames($prefix = '')
276 275
     {
@@ -324,7 +323,7 @@  discard block
 block discarded – undo
324 323
     /**
325 324
      * Closes the connection to the database.
326 325
      *
327
-     * @return boolean
326
+     * @return boolean|null
328 327
      */
329 328
     public function close()
330 329
     {
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     {
175 175
         $ret = array();
176 176
         if (false === $result) {
177
-            throw new Exception('Error while fetching result: ' . $this->error());
177
+            throw new Exception('Error while fetching result: '.$this->error());
178 178
         }
179 179
         
180 180
         while ($row = $this->fetchObject($result)) {
@@ -303,41 +303,41 @@  discard block
 block discarded – undo
303 303
     public function getTableNames($prefix = '')
304 304
     {
305 305
         return $this->tableNames[] = array(
306
-            $prefix . 'faqadminlog',
307
-            $prefix . 'faqattachment',
308
-            $prefix . 'faqattachment_file',
309
-            $prefix . 'faqcaptcha',
310
-            $prefix . 'faqcategories',
311
-            $prefix . 'faqcategory_group',
312
-            $prefix . 'faqcategory_user',
313
-            $prefix . 'faqcategoryrelations',
314
-            $prefix . 'faqchanges',
315
-            $prefix . 'faqcomments',
316
-            $prefix . 'faqconfig',
317
-            $prefix . 'faqdata',
318
-            $prefix . 'faqdata_group',
319
-            $prefix . 'faqdata_revisions',
320
-            $prefix . 'faqdata_tags',
321
-            $prefix . 'faqdata_user',
322
-            $prefix . 'faqglossary',
323
-            $prefix . 'faqgroup',
324
-            $prefix . 'faqgroup_right',
325
-            $prefix . 'faqinstances',
326
-            $prefix . 'faqinstances_config',
327
-            $prefix . 'faqnews',
328
-            $prefix . 'faqquestions',
329
-            $prefix . 'faqright',
330
-            $prefix . 'faqsearches',
331
-            $prefix . 'faqsessions',
332
-            $prefix . 'faqstopwords',
333
-            $prefix . 'faqtags',
334
-            $prefix . 'faquser',
335
-            $prefix . 'faquser_group',
336
-            $prefix . 'faquser_right',
337
-            $prefix . 'faquserdata',
338
-            $prefix . 'faquserlogin',
339
-            $prefix . 'faqvisits',
340
-            $prefix . 'faqvoting'
306
+            $prefix.'faqadminlog',
307
+            $prefix.'faqattachment',
308
+            $prefix.'faqattachment_file',
309
+            $prefix.'faqcaptcha',
310
+            $prefix.'faqcategories',
311
+            $prefix.'faqcategory_group',
312
+            $prefix.'faqcategory_user',
313
+            $prefix.'faqcategoryrelations',
314
+            $prefix.'faqchanges',
315
+            $prefix.'faqcomments',
316
+            $prefix.'faqconfig',
317
+            $prefix.'faqdata',
318
+            $prefix.'faqdata_group',
319
+            $prefix.'faqdata_revisions',
320
+            $prefix.'faqdata_tags',
321
+            $prefix.'faqdata_user',
322
+            $prefix.'faqglossary',
323
+            $prefix.'faqgroup',
324
+            $prefix.'faqgroup_right',
325
+            $prefix.'faqinstances',
326
+            $prefix.'faqinstances_config',
327
+            $prefix.'faqnews',
328
+            $prefix.'faqquestions',
329
+            $prefix.'faqright',
330
+            $prefix.'faqsearches',
331
+            $prefix.'faqsessions',
332
+            $prefix.'faqstopwords',
333
+            $prefix.'faqtags',
334
+            $prefix.'faquser',
335
+            $prefix.'faquser_group',
336
+            $prefix.'faquser_right',
337
+            $prefix.'faquserdata',
338
+            $prefix.'faquserlogin',
339
+            $prefix.'faqvisits',
340
+            $prefix.'faqvoting'
341 341
         );
342 342
     }
343 343
 
Please login to merge, or discard this patch.
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_DB_Sqlite class provides methods and functions for a SQLite v2
4
- * database. This class is deprecated for PHP 5.3 and PHP 5.4.
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   DB
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @author    Johannes Schlüter <[email protected]>
16
- * @copyright 2005-2016 phpMyFAQ Team
17
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
- * @link      http://www.phpmyfaq.de
19
- * @since     2005-06-27
20
- */
3
+     * The PMF_DB_Sqlite class provides methods and functions for a SQLite v2
4
+     * database. This class is deprecated for PHP 5.3 and PHP 5.4.
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   DB
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @author    Johannes Schlüter <[email protected]>
16
+     * @copyright 2005-2016 phpMyFAQ Team
17
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
+     * @link      http://www.phpmyfaq.de
19
+     * @since     2005-06-27
20
+     */
21 21
 
22 22
 if (!defined('IS_VALID_PHPMYFAQ')) {
23 23
     exit();
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function escape($string)
128 128
     {
129
-      return sqlite_escape_string($string);
129
+        return sqlite_escape_string($string);
130 130
     }
131 131
 
132 132
     /**
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/DB/Sqlite3.php 3 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param string
66 66
      * @param string
67 67
      *
68
-     * @return  boolean
68
+     * @return  null|boolean
69 69
      */
70 70
     public function connect($host, $user, $passwd, $db = '')
71 71
     {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      * @param integer $offset
85 85
      * @param integer $rowcount
86 86
      *
87
-     * @return  mixed $result
87
+     * @return  SQLite3Result $result
88 88
      */
89 89
     public function query($query, $offset = 0, $rowcount = 0)
90 90
     {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *
151 151
      * @param   SQLite3Result $result
152 152
      *
153
-     * @return  array
153
+     * @return  SQLite3Result
154 154
      */
155 155
     public function fetchAssoc($result)
156 156
     {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     /**
203 203
      * Logs the queries
204 204
      *
205
-     * @return  integer
205
+     * @return  string
206 206
      */
207 207
     public function log()
208 208
     {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      *
235 235
      * @param  string $prefix Table prefix
236 236
      *
237
-     * @return array
237
+     * @return string[]
238 238
      */
239 239
     public function getTableNames($prefix = '')
240 240
     {
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function fetchObject($result)
126 126
     {
127
-        $result->fetchedByPMF= true;
127
+        $result->fetchedByPMF = true;
128 128
         $return = $result->fetchArray(SQLITE3_ASSOC);
129 129
 
130 130
         return $return
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     public function fetchArray($result)
143 143
     {
144
-        $result->fetchedByPMF= true;
144
+        $result->fetchedByPMF = true;
145 145
         return $result->fetchArray();
146 146
     }
147 147
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function fetchAssoc($result)
156 156
     {
157
-        $result->fetchedByPMF= true;
157
+        $result->fetchedByPMF = true;
158 158
         return $result->fetchArray(SQLITE3_ASSOC);
159 159
     }
160 160
 
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
     {
172 172
         $ret = array();
173 173
         if (false === $result) {
174
-            throw new Exception('Error while fetching result: ' . $this->error());
174
+            throw new Exception('Error while fetching result: '.$this->error());
175 175
         }
176 176
         
177
-        $result->fetchedByPMF= true;
178
-        while( $row=$result->fetchArray(SQLITE3_ASSOC) ) {
177
+        $result->fetchedByPMF = true;
178
+        while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
179 179
             $ret[] = (object)$row;
180 180
         }
181 181
 
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function numRows($result)
192 192
     {
193
-        !isset( $result->fetchedByPMF ) || !$result->fetchedByPMF || die( "Do not call numRows() after you've fetched one or more result records, because PMF_DB_Sqlite3::numRows() has to reset the resultset at its end." );
194
-        $numberOfRows= 0;
195
-        while( $result->fetchArray(SQLITE3_NUM) ) {
193
+        !isset($result->fetchedByPMF) || !$result->fetchedByPMF || die("Do not call numRows() after you've fetched one or more result records, because PMF_DB_Sqlite3::numRows() has to reset the resultset at its end.");
194
+        $numberOfRows = 0;
195
+        while ($result->fetchArray(SQLITE3_NUM)) {
196 196
             $numberOfRows++;
197 197
         }
198 198
         $result->reset();
@@ -239,41 +239,41 @@  discard block
 block discarded – undo
239 239
     public function getTableNames($prefix = '')
240 240
     {
241 241
         return $this->tableNames[] = array(
242
-            $prefix . 'faqadminlog',
243
-            $prefix . 'faqattachment',
244
-            $prefix . 'faqattachment_file',
245
-            $prefix . 'faqcaptcha',
246
-            $prefix . 'faqcategories',
247
-            $prefix . 'faqcategory_group',
248
-            $prefix . 'faqcategory_user',
249
-            $prefix . 'faqcategoryrelations',
250
-            $prefix . 'faqchanges',
251
-            $prefix . 'faqcomments',
252
-            $prefix . 'faqconfig',
253
-            $prefix . 'faqdata',
254
-            $prefix . 'faqdata_group',
255
-            $prefix . 'faqdata_revisions',
256
-            $prefix . 'faqdata_tags',
257
-            $prefix . 'faqdata_user',
258
-            $prefix . 'faqglossary',
259
-            $prefix . 'faqgroup',
260
-            $prefix . 'faqgroup_right',
261
-            $prefix . 'faqinstances',
262
-            $prefix . 'faqinstances_config',
263
-            $prefix . 'faqnews',
264
-            $prefix . 'faqquestions',
265
-            $prefix . 'faqright',
266
-            $prefix . 'faqsearches',
267
-            $prefix . 'faqsessions',
268
-            $prefix . 'faqstopwords',
269
-            $prefix . 'faqtags',
270
-            $prefix . 'faquser',
271
-            $prefix . 'faquser_group',
272
-            $prefix . 'faquser_right',
273
-            $prefix . 'faquserdata',
274
-            $prefix . 'faquserlogin',
275
-            $prefix . 'faqvisits',
276
-            $prefix . 'faqvoting'
242
+            $prefix.'faqadminlog',
243
+            $prefix.'faqattachment',
244
+            $prefix.'faqattachment_file',
245
+            $prefix.'faqcaptcha',
246
+            $prefix.'faqcategories',
247
+            $prefix.'faqcategory_group',
248
+            $prefix.'faqcategory_user',
249
+            $prefix.'faqcategoryrelations',
250
+            $prefix.'faqchanges',
251
+            $prefix.'faqcomments',
252
+            $prefix.'faqconfig',
253
+            $prefix.'faqdata',
254
+            $prefix.'faqdata_group',
255
+            $prefix.'faqdata_revisions',
256
+            $prefix.'faqdata_tags',
257
+            $prefix.'faqdata_user',
258
+            $prefix.'faqglossary',
259
+            $prefix.'faqgroup',
260
+            $prefix.'faqgroup_right',
261
+            $prefix.'faqinstances',
262
+            $prefix.'faqinstances_config',
263
+            $prefix.'faqnews',
264
+            $prefix.'faqquestions',
265
+            $prefix.'faqright',
266
+            $prefix.'faqsearches',
267
+            $prefix.'faqsessions',
268
+            $prefix.'faqstopwords',
269
+            $prefix.'faqtags',
270
+            $prefix.'faquser',
271
+            $prefix.'faquser_group',
272
+            $prefix.'faquser_right',
273
+            $prefix.'faquserdata',
274
+            $prefix.'faquserlogin',
275
+            $prefix.'faqvisits',
276
+            $prefix.'faqvoting'
277 277
         );
278 278
     }
279 279
 
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_DB_Sqlite3 class provides methods and functions for a SQLite v3
4
- * database
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   DB
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @copyright 2012-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2012-03-02
19
- */
3
+     * The PMF_DB_Sqlite3 class provides methods and functions for a SQLite v3
4
+     * database
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   DB
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @copyright 2012-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2012-03-02
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/DB/Sqlsrv.php 3 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      *                          SQL Server Authentication
75 75
      * @param  string $database Specifies the name of the database in use for the connection being established
76 76
      * 
77
-     * @return boolean true, if connected, otherwise false
77
+     * @return null|boolean true, if connected, otherwise false
78 78
      */
79 79
     public function connect($host, $user, $password, $database = '')
80 80
     {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @param integer $offset
114 114
      * @param integer $rowcount
115 115
      *
116
-     * @return  mixed $result
116
+     * @return  resource $result
117 117
      */
118 118
     public function query($query, $offset = 0, $rowcount = 0)
119 119
     {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     /**
208 208
      * Logs the queries
209 209
      *
210
-     * @return integer
210
+     * @return string
211 211
      */
212 212
     public function log()
213 213
     {
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     /**
268 268
      * Returns the error string.
269 269
      *
270
-     * @return mixed
270
+     * @return string|null
271 271
      */
272 272
     public function error()
273 273
     {
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      *
310 310
      * @param  string $prefix Table prefix
311 311
      *
312
-     * @return array
312
+     * @return string[]
313 313
      */
314 314
     public function getTableNames($prefix = '')
315 315
     {
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         $ret = array();
184 184
         if (false === $result) {
185
-            throw new Exception('Error while fetching result: ' . $this->error());
185
+            throw new Exception('Error while fetching result: '.$this->error());
186 186
         }
187 187
         
188 188
         while ($row = $this->fetchObject($result)) {
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $errors = sqlsrv_errors();
275 275
 
276 276
         if (null !== $errors) {
277
-            return $errors[0]['SQLSTATE'] . ': ' . $errors[0]['message'];
277
+            return $errors[0]['SQLSTATE'].': '.$errors[0]['message'];
278 278
         } else {
279 279
             return null;
280 280
         }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     public function clientVersion()
289 289
     {
290 290
         $client_info = sqlsrv_client_info($this->conn);
291
-        return $client_info['DriverODBCVer'] . ' ' . $client_info['DriverVer'];
291
+        return $client_info['DriverODBCVer'].' '.$client_info['DriverVer'];
292 292
     }
293 293
 
294 294
     /**
@@ -314,41 +314,41 @@  discard block
 block discarded – undo
314 314
     public function getTableNames($prefix = '')
315 315
     {
316 316
         return $this->tableNames[] = array(
317
-            $prefix . 'faqadminlog',
318
-            $prefix . 'faqattachment',
319
-            $prefix . 'faqattachment_file',
320
-            $prefix . 'faqcaptcha',
321
-            $prefix . 'faqcategories',
322
-            $prefix . 'faqcategory_group',
323
-            $prefix . 'faqcategory_user',
324
-            $prefix . 'faqcategoryrelations',
325
-            $prefix . 'faqchanges',
326
-            $prefix . 'faqcomments',
327
-            $prefix . 'faqconfig',
328
-            $prefix . 'faqdata',
329
-            $prefix . 'faqdata_group',
330
-            $prefix . 'faqdata_revisions',
331
-            $prefix . 'faqdata_tags',
332
-            $prefix . 'faqdata_user',
333
-            $prefix . 'faqglossary',
334
-            $prefix . 'faqgroup',
335
-            $prefix . 'faqgroup_right',
336
-            $prefix . 'faqinstances',
337
-            $prefix . 'faqinstances_config',
338
-            $prefix . 'faqnews',
339
-            $prefix . 'faqquestions',
340
-            $prefix . 'faqright',
341
-            $prefix . 'faqsearches',
342
-            $prefix . 'faqsessions',
343
-            $prefix . 'faqstopwords',
344
-            $prefix . 'faqtags',
345
-            $prefix . 'faquser',
346
-            $prefix . 'faquser_group',
347
-            $prefix . 'faquser_right',
348
-            $prefix . 'faquserdata',
349
-            $prefix . 'faquserlogin',
350
-            $prefix . 'faqvisits',
351
-            $prefix . 'faqvoting'
317
+            $prefix.'faqadminlog',
318
+            $prefix.'faqattachment',
319
+            $prefix.'faqattachment_file',
320
+            $prefix.'faqcaptcha',
321
+            $prefix.'faqcategories',
322
+            $prefix.'faqcategory_group',
323
+            $prefix.'faqcategory_user',
324
+            $prefix.'faqcategoryrelations',
325
+            $prefix.'faqchanges',
326
+            $prefix.'faqcomments',
327
+            $prefix.'faqconfig',
328
+            $prefix.'faqdata',
329
+            $prefix.'faqdata_group',
330
+            $prefix.'faqdata_revisions',
331
+            $prefix.'faqdata_tags',
332
+            $prefix.'faqdata_user',
333
+            $prefix.'faqglossary',
334
+            $prefix.'faqgroup',
335
+            $prefix.'faqgroup_right',
336
+            $prefix.'faqinstances',
337
+            $prefix.'faqinstances_config',
338
+            $prefix.'faqnews',
339
+            $prefix.'faqquestions',
340
+            $prefix.'faqright',
341
+            $prefix.'faqsearches',
342
+            $prefix.'faqsessions',
343
+            $prefix.'faqstopwords',
344
+            $prefix.'faqtags',
345
+            $prefix.'faquser',
346
+            $prefix.'faquser_group',
347
+            $prefix.'faquser_right',
348
+            $prefix.'faquserdata',
349
+            $prefix.'faquserlogin',
350
+            $prefix.'faqvisits',
351
+            $prefix.'faqvoting'
352 352
         );
353 353
     }
354 354
 
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_DB_Sqlsrv class provides methods and functions for SQL Server Driver
4
- * for PHP from Microsoft for Microsoft SQL Server 2012 or later
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   PMF_Db
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @copyright 2009-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2009-02-18
19
- */
3
+     * The PMF_DB_Sqlsrv class provides methods and functions for SQL Server Driver
4
+     * for PHP from Microsoft for Microsoft SQL Server 2012 or later
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   PMF_Db
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @copyright 2009-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2009-02-18
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     exit();
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
     private function setConnectionOptions($user, $passwd, $database)
101 101
     {
102 102
         $this->connectionOptions = array(
103
-           'UID'          => $user,
104
-           'PWD'          => $passwd,
105
-           'Database'     => $database,
106
-           'CharacterSet' => 'UTF-8');
103
+            'UID'          => $user,
104
+            'PWD'          => $passwd,
105
+            'Database'     => $database,
106
+            'CharacterSet' => 'UTF-8');
107 107
     }
108 108
 
109 109
     /**
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
                max(%s) as current_id
257 257
            FROM 
258 258
                %s",
259
-           $id,
260
-           $table);
259
+            $id,
260
+            $table);
261 261
         
262 262
         $result = $this->query($select);
263 263
         sqlsrv_fetch($result);
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Faq.php 3 patches
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
      * @param  array   $categories Array of categories
1026 1026
      * @param  integer $record_id  Record id
1027 1027
      * @param  string  $language   Language
1028
-     * @return integer
1028
+     * @return boolean
1029 1029
      */
1030 1030
     public function addCategoryRelations(Array $categories, $record_id, $language)
1031 1031
     {
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
      *
1448 1448
      * @param  integer $record_id   Record id
1449 1449
      * @param  string  $record_lang Record language
1450
-     * @return array
1450
+     * @return boolean
1451 1451
      */
1452 1452
     public function addNewRevision($record_id, $record_lang)
1453 1453
     {
@@ -2155,7 +2155,7 @@  discard block
 block discarded – undo
2155 2155
     /**
2156 2156
      * Returns a new question
2157 2157
      *
2158
-     * @param    integer    $question_id
2158
+     * @param    integer    $id_question
2159 2159
      * @return   array
2160 2160
      * @access   public
2161 2161
      * @since    2006-11-11
@@ -2409,7 +2409,7 @@  discard block
 block discarded – undo
2409 2409
      * Build a logic sequence, for a WHERE statement, of those category IDs
2410 2410
      * children of the provided category ID, if any
2411 2411
      *
2412
-     * @param   $nCatid
2412
+     * @param   integer $nCatid
2413 2413
      * @param   $logicOp
2414 2414
      * @param   $oCat
2415 2415
      * @return  string
@@ -2437,13 +2437,13 @@  discard block
 block discarded – undo
2437 2437
 /**
2438 2438
      * Build the SQL query for retrieving faq records according to the constraints provided
2439 2439
      *
2440
-     * @param   $QueryType
2441
-     * @param   $nCatid
2442
-     * @param   $bDownwards
2443
-     * @param   $lang
2444
-     * @param   $date
2440
+     * @param   string $QueryType
2441
+     * @param   integer $nCatid
2442
+     * @param   boolean $bDownwards
2443
+     * @param   string $lang
2444
+     * @param   string $date
2445 2445
      * @param   $faqid
2446
-     * @return  array
2446
+     * @return  string
2447 2447
      * @access  private
2448 2448
      * @since   2005-11-02
2449 2449
      * @author  Matteo Scaramuccia <[email protected]>
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -28,20 +28,20 @@  discard block
 block discarded – undo
28 28
 /**
29 29
  * SQL constants definitions
30 30
  */
31
-define('FAQ_SQL_YES',        'y');
32
-define('FAQ_SQL_NO',         'n');
31
+define('FAQ_SQL_YES', 'y');
32
+define('FAQ_SQL_NO', 'n');
33 33
 define('FAQ_SQL_ACTIVE_YES', 'yes');
34
-define('FAQ_SQL_ACTIVE_NO',  'no');
34
+define('FAQ_SQL_ACTIVE_NO', 'no');
35 35
 
36 36
 /**
37 37
  * Query type definitions
38 38
  */
39
-define('FAQ_QUERY_TYPE_DEFAULT',      'faq_default');
40
-define('FAQ_QUERY_TYPE_APPROVAL',     'faq_approval');
41
-define('FAQ_QUERY_TYPE_EXPORT_PDF',   'faq_export_pdf');
39
+define('FAQ_QUERY_TYPE_DEFAULT', 'faq_default');
40
+define('FAQ_QUERY_TYPE_APPROVAL', 'faq_approval');
41
+define('FAQ_QUERY_TYPE_EXPORT_PDF', 'faq_export_pdf');
42 42
 define('FAQ_QUERY_TYPE_EXPORT_XHTML', 'faq_export_xhtml');
43
-define('FAQ_QUERY_TYPE_EXPORT_XML',   'faq_export_xml');
44
-define('FAQ_QUERY_TYPE_RSS_LATEST',   'faq_rss_latest');
43
+define('FAQ_QUERY_TYPE_EXPORT_XML', 'faq_export_xml');
44
+define('FAQ_QUERY_TYPE_RSS_LATEST', 'faq_rss_latest');
45 45
 
46 46
 /**
47 47
  * Sorting type definitions
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                     $visits = $row->visits;
257 257
                 }
258 258
 
259
-                $url   = sprintf(
259
+                $url = sprintf(
260 260
                     '%s?%saction=artikel&amp;cat=%d&amp;id=%d&amp;artlang=%s',
261 261
                     PMF_Link::getSystemRelativeUri(),
262 262
                     $sids,
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                     $row->lang
266 266
                 );
267 267
                 $oLink = new PMF_Link($url, $this->_config);
268
-                $oLink->itemTitle = $oLink->text = $oLink->tooltip = $row->thema;;
268
+                $oLink->itemTitle = $oLink->text = $oLink->tooltip = $row->thema; ;
269 269
 
270 270
                 $faqdata[] = array(
271 271
                     'record_id'      => $row->id,
@@ -379,20 +379,20 @@  discard block
 block discarded – undo
379 379
 
380 380
         $result = $this->_config->getDb()->query($query);
381 381
         $num    = $this->_config->getDb()->numRows($result);
382
-        $pages  = (int)ceil($num / $numPerPage);
382
+        $pages  = (int)ceil($num/$numPerPage);
383 383
 
384 384
         if ($page == 1) {
385 385
             $first = 0;
386 386
         } else {
387
-            $first = $page * $numPerPage - $numPerPage;
387
+            $first = $page*$numPerPage - $numPerPage;
388 388
         }
389 389
 
390 390
         if ($num > 0) {
391 391
             if ($pages > 1) {
392 392
                 $output .= sprintf('<p><strong>%s %s %s</strong></p>',
393
-                    $this->pmf_lang['msgPage'] . $page,
393
+                    $this->pmf_lang['msgPage'].$page,
394 394
                     $this->pmf_lang['msgVoteFrom'],
395
-                    $pages . $this->pmf_lang['msgPages']);
395
+                    $pages.$this->pmf_lang['msgPages']);
396 396
             }
397 397
             $output .= '<ul class="phpmyfaq_ul">';
398 398
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
             $displayedCounter = 0;
401 401
             $renderedItems    = array();
402 402
             while (($row = $this->_config->getDb()->fetchObject($result)) && $displayedCounter < $numPerPage) {
403
-                $counter ++;
403
+                $counter++;
404 404
                 if ($counter <= $first) {
405 405
                     continue;
406 406
                 }
@@ -564,20 +564,20 @@  discard block
 block discarded – undo
564 564
         $result = $this->_config->getDb()->query($query);
565 565
 
566 566
         $num = $this->_config->getDb()->numRows($result);
567
-        $pages = ceil($num / $this->_config->get('records.numberOfRecordsPerPage'));
567
+        $pages = ceil($num/$this->_config->get('records.numberOfRecordsPerPage'));
568 568
 
569 569
         if ($page == 1) {
570 570
             $first = 0;
571 571
         } else {
572
-            $first = ($page * $this->_config->get('records.numberOfRecordsPerPage')) - $this->_config->get('records.numberOfRecordsPerPage');
572
+            $first = ($page*$this->_config->get('records.numberOfRecordsPerPage')) - $this->_config->get('records.numberOfRecordsPerPage');
573 573
         }
574 574
 
575 575
         if ($num > 0) {
576 576
             if ($pages > 1) {
577 577
                 $output .= sprintf('<p><strong>%s %s %s</strong></p>',
578
-                    $this->pmf_lang['msgPage'] . $page,
578
+                    $this->pmf_lang['msgPage'].$page,
579 579
                     $this->pmf_lang['msgVoteFrom'],
580
-                    $pages . $this->pmf_lang['msgPages']);
580
+                    $pages.$this->pmf_lang['msgPages']);
581 581
             }
582 582
             $output .= '<ul class="phpmyfaq_ul">';
583 583
             $counter = 0;
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 
586 586
             $lastFaqId = 0;
587 587
             while (($row = $this->_config->getDb()->fetchObject($result)) && $displayedCounter < $this->_config->get('records.numberOfRecordsPerPage')) {
588
-                $counter ++;
588
+                $counter++;
589 589
                 if ($counter <= $first) {
590 590
                     continue;
591 591
                 }
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
                 $listItem = sprintf(
618 618
                     '<li>%s<br /><small>(%s)</small></li>',
619 619
                     $oLink->toHtmlAnchor(),
620
-                    $this->plr->GetMsg('plmsgViews',$visits)
620
+                    $this->plr->GetMsg('plmsgViews', $visits)
621 621
                 );
622 622
 
623 623
                 $output .= $listItem;
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
                 fd.lang = '%s'
695 695
                 %s",
696 696
             PMF_Db::getTablePrefix(),
697
-            isset($revisionId) ? 'faqdata_revisions': 'faqdata',
697
+            isset($revisionId) ? 'faqdata_revisions' : 'faqdata',
698 698
             PMF_Db::getTablePrefix(),
699 699
             PMF_Db::getTablePrefix(),
700 700
             $id,
@@ -1633,9 +1633,9 @@  discard block
 block discarded – undo
1633 1633
         $result = $this->getLatestData(PMF_NUMBER_RECORDS_LATEST, $this->_config->getLanguage()->getLanguage());
1634 1634
         $output = array();
1635 1635
         
1636
-        if (count ($result) > 0) {
1636
+        if (count($result) > 0) {
1637 1637
             foreach ($result as $row) {
1638
-                $output['url'][]   =  $row['url'];
1638
+                $output['url'][]   = $row['url'];
1639 1639
                 $output['title'][] = PMF_Utils::makeShorterText($row['thema'], 8);
1640 1640
                 $output['date'][]  = $date->format(PMF_Date::createIsoDate($row['datum']));
1641 1641
             }
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
                 fd.lang = \''.$language.'\'';
1781 1781
         }
1782 1782
         $query .= '
1783
-                ' . $this->queryPermission($this->groupSupport) . '
1783
+                ' . $this->queryPermission($this->groupSupport).'
1784 1784
             ORDER BY
1785 1785
                 avg DESC';
1786 1786
 
@@ -1879,7 +1879,7 @@  discard block
 block discarded – undo
1879 1879
                 fd.lang = \''.$language.'\'';
1880 1880
         }
1881 1881
         $query .= '
1882
-                ' . $this->queryPermission($this->groupSupport) . '
1882
+                ' . $this->queryPermission($this->groupSupport).'
1883 1883
             ORDER BY
1884 1884
                 fv.visits DESC';
1885 1885
 
@@ -1985,7 +1985,7 @@  discard block
 block discarded – undo
1985 1985
                 fd.lang = \''.$language.'\'';
1986 1986
         }
1987 1987
         $query .= '
1988
-                ' . $this->queryPermission($this->groupSupport) . '
1988
+                ' . $this->queryPermission($this->groupSupport).'
1989 1989
             ORDER BY
1990 1990
                 fd.datum DESC';
1991 1991
 
@@ -1995,7 +1995,7 @@  discard block
 block discarded – undo
1995 1995
 
1996 1996
         $i = 0;
1997 1997
         $oldId = 0;
1998
-        while (($row = $this->_config->getDb()->fetchObject($result)) && $i < $count ) {
1998
+        while (($row = $this->_config->getDb()->fetchObject($result)) && $i < $count) {
1999 1999
             if ($oldId != $row->id) {
2000 2000
 
2001 2001
                 if ($this->groupSupport) {
@@ -2294,7 +2294,7 @@  discard block
 block discarded – undo
2294 2294
      */
2295 2295
     function createChangeEntry($id, $userId, $text, $lang, $revision_id = 0)
2296 2296
     {
2297
-        if (   !is_numeric($id)
2297
+        if (!is_numeric($id)
2298 2298
             && !is_numeric($userId)
2299 2299
             && !is_string($text)
2300 2300
             && !is_string($lang)
@@ -2851,7 +2851,7 @@  discard block
 block discarded – undo
2851 2851
             );
2852 2852
         }
2853 2853
 
2854
-        return $output . $extraout;
2854
+        return $output.$extraout;
2855 2855
     }
2856 2856
     
2857 2857
     /**
Please login to merge, or discard this patch.
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -1,25 +1,25 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The main FAQ class
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Faq
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Matteo Scaramuccia <[email protected]>
15
- * @author    Georgi Korchev <[email protected]>
16
- * @author    Adrianna Musiol <[email protected]>
17
- * @author    Peter Caesar <[email protected]>
18
- * @copyright 2005-2016 phpMyFAQ Team
19
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
20
- * @link      http://www.phpmyfaq.de
21
- * @since     2005-12-20
22
- */
3
+     * The main FAQ class
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Faq
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @author    Matteo Scaramuccia <[email protected]>
15
+     * @author    Georgi Korchev <[email protected]>
16
+     * @author    Adrianna Musiol <[email protected]>
17
+     * @author    Peter Caesar <[email protected]>
18
+     * @copyright 2005-2016 phpMyFAQ Team
19
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
20
+     * @link      http://www.phpmyfaq.de
21
+     * @since     2005-12-20
22
+     */
23 23
 
24 24
 if (!defined('IS_VALID_PHPMYFAQ')) {
25 25
     exit();
@@ -75,31 +75,31 @@  discard block
 block discarded – undo
75 75
     private $_config;
76 76
 
77 77
     /**
78
-    * Language strings
79
-    *
80
-    * @var  string
81
-    */
78
+     * Language strings
79
+     *
80
+     * @var  string
81
+     */
82 82
     private $pmf_lang;
83 83
 
84 84
     /**
85
-    * Plural form support
86
-    *
87
-    * @var  PMF_Language_Plurals
88
-    */
85
+     * Plural form support
86
+     *
87
+     * @var  PMF_Language_Plurals
88
+     */
89 89
     private $plr;
90 90
 
91 91
     /**
92
-    * The current FAQ record
93
-    *
94
-    * @var  array
95
-    */
92
+     * The current FAQ record
93
+     *
94
+     * @var  array
95
+     */
96 96
     public $faqRecord = array();
97 97
 
98 98
     /**
99
-    * All current FAQ records in an array
100
-    *
101
-    * @var  array
102
-    */
99
+     * All current FAQ records in an array
100
+     *
101
+     * @var  array
102
+     */
103 103
     public $faqRecords = array();
104 104
 
105 105
     /**
@@ -1184,8 +1184,8 @@  discard block
 block discarded – undo
1184 1184
 
1185 1185
         if ($row = $this->_config->getDb()->fetchObject($result)) {
1186 1186
             return array('id'      => $row->id,
1187
-                         'lang'    => $row->lang,
1188
-                         'content' => $row->content);
1187
+                            'lang'    => $row->lang,
1188
+                            'content' => $row->content);
1189 1189
         }
1190 1190
 
1191 1191
         return null;
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
      */
1513 1513
     public function getRecordPreview($recordId, $wordCount = 12)
1514 1514
     {
1515
-    	$answerPreview = '';
1515
+        $answerPreview = '';
1516 1516
     	
1517 1517
         if (isset($this->faqRecord['id']) && ($this->faqRecord['id'] == $recordId)) {
1518 1518
             $answerPreview = $this->faqRecord['content'];
@@ -1677,8 +1677,8 @@  discard block
 block discarded – undo
1677 1677
      * @since   2006-11-04
1678 1678
      * @author  Thorsten Rinne <[email protected]>
1679 1679
      */
1680
-     function getVisibilityOfQuestion($question_id)
1681
-     {
1680
+        function getVisibilityOfQuestion($question_id)
1681
+        {
1682 1682
         $query = sprintf('
1683 1683
             SELECT
1684 1684
                 is_visible
@@ -1695,7 +1695,7 @@  discard block
 block discarded – undo
1695 1695
             return $row->is_visible;
1696 1696
         }
1697 1697
         return null;
1698
-     }
1698
+        }
1699 1699
 
1700 1700
     /**
1701 1701
      * Sets the visibilty of a question
@@ -2210,8 +2210,8 @@  discard block
 block discarded – undo
2210 2210
      * @param  $all boolean If true, then return visible and unvisble questions; otherwise only visible ones
2211 2211
      * @return array
2212 2212
      */
2213
-     public function getAllOpenQuestions($all = true)
2214
-     {
2213
+        public function getAllOpenQuestions($all = true)
2214
+        {
2215 2215
         $questions = array();
2216 2216
 
2217 2217
         $query = sprintf("
@@ -2240,7 +2240,7 @@  discard block
 block discarded – undo
2240 2240
             }
2241 2241
         }
2242 2242
         return $questions;
2243
-     }
2243
+        }
2244 2244
 
2245 2245
     /**
2246 2246
      * Updates an existing voting record
@@ -2347,7 +2347,7 @@  discard block
 block discarded – undo
2347 2347
             $record_id
2348 2348
             );
2349 2349
 
2350
-       if ($result = $this->_config->getDb()->query($query)) {
2350
+        if ($result = $this->_config->getDb()->query($query)) {
2351 2351
             while ($row = $this->_config->getDb()->fetchObject($result)) {
2352 2352
                 $entries[] = array(
2353 2353
                     'revision_id'   => $row->revision_id,
@@ -2435,19 +2435,19 @@  discard block
 block discarded – undo
2435 2435
     }
2436 2436
 
2437 2437
 /**
2438
-     * Build the SQL query for retrieving faq records according to the constraints provided
2439
-     *
2440
-     * @param   $QueryType
2441
-     * @param   $nCatid
2442
-     * @param   $bDownwards
2443
-     * @param   $lang
2444
-     * @param   $date
2445
-     * @param   $faqid
2446
-     * @return  array
2447
-     * @access  private
2448
-     * @since   2005-11-02
2449
-     * @author  Matteo Scaramuccia <[email protected]>
2450
-     */
2438
+ * Build the SQL query for retrieving faq records according to the constraints provided
2439
+ *
2440
+ * @param   $QueryType
2441
+ * @param   $nCatid
2442
+ * @param   $bDownwards
2443
+ * @param   $lang
2444
+ * @param   $date
2445
+ * @param   $faqid
2446
+ * @return  array
2447
+ * @access  private
2448
+ * @since   2005-11-02
2449
+ * @author  Matteo Scaramuccia <[email protected]>
2450
+ */
2451 2451
     private function _getSQLQuery($QueryType, $nCatid, $bDownwards, $lang, $date, $faqid = 0)
2452 2452
     {
2453 2453
         $now = date('YmdHis');
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Helper/Category.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
     /**
164 164
      * Get all categories in <option> tags
165 165
      *
166
-     * @param  array|integer $categoryId Category ID or array of category IDs
166
+     * @param  integer $categoryId Category ID or array of category IDs
167 167
      *
168 168
      * @return string
169 169
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $numCategories = $this->Category->height();
60 60
 
61 61
         if ($numCategories > 0) {
62
-            for ($y = 0 ;$y < $numCategories; $y = $this->Category->getNextLineTree($y)) {
62
+            for ($y = 0; $y < $numCategories; $y = $this->Category->getNextLineTree($y)) {
63 63
                 
64 64
                 list($name, $categoryId, $description) = $this->Category->getLineDisplay($y);
65 65
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             }
202 202
 
203 203
             $categories .= ">";
204
-            $categories .= $indent . $cat['name'] . "</option>\n";
204
+            $categories .= $indent.$cat['name']."</option>\n";
205 205
             $i++;
206 206
         }
207 207
 
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Helper class for phpMyFAQ categories
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Helper
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2009-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2009-09-07
18
- */
3
+     * Helper class for phpMyFAQ categories
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Helper
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2009-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2009-09-07
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Instance.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * Returns all instances
121 121
      *
122
-     * @return array
122
+     * @return PMF_DB_Driver
123 123
      */
124 124
     public function getAllInstances()
125 125
     {
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      * Adds a configuration item for the database
262 262
      *
263 263
      * @param string $name
264
-     * @param mixed  $value
264
+     * @param string  $value
265 265
      *
266 266
      * @return boolean
267 267
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function addInstance(Array $data)
78 78
     {
79
-        $this->setId($this->config->getDb()->nextId(PMF_Db::getTablePrefix() . 'faqinstances', 'id'));
79
+        $this->setId($this->config->getDb()->nextId(PMF_Db::getTablePrefix().'faqinstances', 'id'));
80 80
 
81 81
         $insert = sprintf(
82 82
             "INSERT INTO %sfaqinstances VALUES (%d, '%s', '%s', '%s', %s, %s)",
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $this->config->getDb()->now()
90 90
         );
91 91
 
92
-        if (! $this->config->getDb()->query($insert)) {
92
+        if (!$this->config->getDb()->query($insert)) {
93 93
             return 0;
94 94
         }
95 95
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
         foreach ($deletes as $delete) {
251 251
             $success = $this->config->getDb()->query($delete);
252
-            if (! $success) {
252
+            if (!$success) {
253 253
                 return false;
254 254
             }
255 255
         }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      */
291 291
     public function getConfig($name)
292 292
     {
293
-        if (! isset($this->instanceConfig[$name])) {
293
+        if (!isset($this->instanceConfig[$name])) {
294 294
             $this->getInstanceConfig($this->getId());
295 295
         }
296 296
 
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The main phpMyFAQ instances class
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   PMF_Instance
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2012-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2012-02-20
18
- */
3
+     * The main phpMyFAQ instances class
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   PMF_Instance
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2012-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2012-02-20
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.