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.9 ( 049f50...aebb6c )
by Thorsten
20:29 queued 05:57
created
phpmyfaq/send2friend.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
 
48 48
 $send2friendLink = sprintf('%sindex.php?action=artikel&cat=%d&id=%d&artlang=%s',
49 49
     $faqConfig->getDefaultUrl(),
50
-    (int) $cat,
51
-    (int) $id,
50
+    (int)$cat,
51
+    (int)$id,
52 52
     urlencode($artlang));
53 53
 
54 54
 $captchaHelper = new PMF_Helper_Captcha($faqConfig);
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Date.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,6 @@
 block discarded – undo
38 38
  * @author    Anatoliy Belsky <[email protected]>
39 39
  * @copyright 2009-2015 phpMyFAQ Team
40 40
  * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
41
- 
42 41
  * @link      http://www.phpmyfaq.de
43 42
  * @since     2009-04-06
44 43
  */
Please login to merge, or discard this patch.
phpmyfaq/admin/record.comments.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@
 block discarded – undo
80 80
                     <?php print $date->format(date('Y-m-d H:i', $faqcomment['date']));
81 81
             ?> |
82 82
                     <a href="<?php printf('../?action=artikel&cat=%d&id=%d&artlang=%s',
83
-                       $faqcomment['category_id'],
84
-                       $faqcomment['record_id'],
85
-                       $LANGCODE);
83
+                        $faqcomment['category_id'],
84
+                        $faqcomment['record_id'],
85
+                        $LANGCODE);
86 86
             ?>">
87 87
                         <?php print $faq->getRecordTitle($faqcomment['record_id']);
88 88
             ?>
Please login to merge, or discard this patch.
phpmyfaq/setup/update.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 // 2.5 versions only
161 161
                 if (version_compare($version, '2.6.0-alpha', '<') && !is_writeable('../template')) {
162 162
                     echo '<p class="alert alert-danger text-center"><strong>Please change the directory ../template '.
163
-                         'and its contents writable (777 on Linux/UNIX).</strong></p>';
163
+                            'and its contents writable (777 on Linux/UNIX).</strong></p>';
164 164
                 }
165 165
 
166 166
                 // We only support updates from 2.6+
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     if (file_exists(PMF_ROOT_DIR.'/config/database.php')) {
207 207
         if (!copy(PMF_ROOT_DIR.'/config/database.php', PMF_ROOT_DIR.'/config/database.bak.php')) {
208 208
             echo '<p class="alert alert-danger"><strong>Error:</strong> The backup file ../config/database.bak.php '.
209
-                  'could not be written. Please correct this!</p>';
209
+                    'could not be written. Please correct this!</p>';
210 210
         } else {
211 211
             $checkDatabaseSetupFile = true;
212 212
         }
@@ -574,8 +574,8 @@  discard block
 block discarded – undo
574 574
             if (!$result) {
575 575
                 echo '</div>';
576 576
                 echo '<p class="alert alert-danger"><strong>Error:</strong> Please update your version of phpMyFAQ '.
577
-                      'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.'.
578
-                      '</p>';
577
+                        'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.'.
578
+                        '</p>';
579 579
                 printf(
580 580
                     '<p class="alert alert-danger"><strong>DB error:</strong> %s</p>',
581 581
                     $faqConfig->getDb()->error()
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
             printf('<span title="%s"><i class="fa fa-circle"></i></span>', $executeQuery);
852 852
             if (!$result) {
853 853
                 echo '<p class="alert alert-danger"><strong>Error:</strong> Please install your version of phpMyFAQ once again '.
854
-                      'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>';
854
+                        'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>';
855 855
                 printf('<p class="error"><strong>DB error:</strong> %s</p>', $faqConfig->getDb()->error());
856 856
                 printf('<code>%s</code>', htmlentities($executeQuery));
857 857
                 PMF_System::renderFooter();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     // Backup of config/elasticsearch.php if exists
230 230
     if (file_exists(PMF_ROOT_DIR.'/config/elasticsearch.php')) {
231 231
         if (!copy(PMF_ROOT_DIR.'/config/elasticsearch.php', PMF_ROOT_DIR.'/config/elasticsearch.bak.php')) {
232
-            echo '<p class="alert alert-danger"><strong>Error:</strong> The backup file ' .
232
+            echo '<p class="alert alert-danger"><strong>Error:</strong> The backup file '.
233 233
                 '../config/elasticsearch.bak.php could not be written. Please correct this!</p>';
234 234
         } else {
235 235
             $checkElasticsearchSetupFile = true;
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
         foreach ($query as $key => $executeQuery) {
598 598
             $result = $faqConfig->getDb()->query($executeQuery);
599 599
             echo '.';
600
-            if (!($key % 100)) {
600
+            if (!($key%100)) {
601 601
                 echo '<br />';
602 602
             }
603 603
             if (!$result) {
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
             }
618 618
             usleep(10000);
619 619
             ++$count;
620
-            if (!($count % 10)) {
620
+            if (!($count%10)) {
621 621
                 ob_flush();
622 622
             }
623 623
         }
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Configuration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -395,12 +395,12 @@
 block discarded – undo
395 395
     public function update(Array $newConfigs)
396 396
     {
397 397
         $runtimeConfigs = [
398
-            'core.database',           // PMF_DB_Driver
399
-            'core.instance',           // PMF_Instance
400
-            'core.language',           // Language
401
-            'core.ldap',               // PMF_Ldap
402
-            'core.ldapConfig',         // $PMF_LDAP
403
-            'core.elasticsearch',      // Elasticsearch\Client
398
+            'core.database', // PMF_DB_Driver
399
+            'core.instance', // PMF_Instance
400
+            'core.language', // Language
401
+            'core.ldap', // PMF_Ldap
402
+            'core.ldapConfig', // $PMF_LDAP
403
+            'core.elasticsearch', // Elasticsearch\Client
404 404
             'core.elasticsearchConfig' // $PMF_ES
405 405
         ];
406 406
 
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Instance/Elasticsearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function createIndex()
93 93
     {
94 94
         $this->client->indices()->create($this->getParams());
95
-        return $this->putMapping();;
95
+        return $this->putMapping(); ;
96 96
     }
97 97
 
98 98
     /**
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                 'categories' => $faq['category_id']
178 178
             ];
179 179
 
180
-            if ($i % 1000 == 0) {
180
+            if ($i%1000 == 0) {
181 181
                 $responses = $this->client->bulk($params);
182 182
                 $params = ['body' => []];
183 183
                 unset($responses);
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Faq.php 3 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1766,16 +1766,16 @@  discard block
 block discarded – undo
1766 1766
         return true;
1767 1767
     }
1768 1768
 
1769
-     /**
1770
-      * Returns the visibility of a question.
1771
-      *
1772
-      * @param   int $questionId
1773
-      *
1774
-      * @return  string
1775
-      */
1776
-     public function getVisibilityOfQuestion($questionId)
1777
-     {
1778
-         $query = sprintf("
1769
+        /**
1770
+         * Returns the visibility of a question.
1771
+         *
1772
+         * @param   int $questionId
1773
+         *
1774
+         * @return  string
1775
+         */
1776
+        public function getVisibilityOfQuestion($questionId)
1777
+        {
1778
+            $query = sprintf("
1779 1779
             SELECT
1780 1780
                 is_visible
1781 1781
             FROM
@@ -1789,15 +1789,15 @@  discard block
 block discarded – undo
1789 1789
             $this->_config->getLanguage()->getLanguage()
1790 1790
         );
1791 1791
 
1792
-         $result = $this->_config->getDb()->query($query);
1793
-         if ($this->_config->getDb()->numRows($result) > 0) {
1794
-             $row = $this->_config->getDb()->fetchObject($result);
1792
+            $result = $this->_config->getDb()->query($query);
1793
+            if ($this->_config->getDb()->numRows($result) > 0) {
1794
+                $row = $this->_config->getDb()->fetchObject($result);
1795 1795
 
1796
-             return $row->is_visible;
1797
-         }
1796
+                return $row->is_visible;
1797
+            }
1798 1798
 
1799
-         return;
1800
-     }
1799
+            return;
1800
+        }
1801 1801
 
1802 1802
     /**
1803 1803
      * Sets the visibilty of a question.
@@ -2318,18 +2318,18 @@  discard block
 block discarded – undo
2318 2318
         return $question;
2319 2319
     }
2320 2320
 
2321
-     /**
2322
-      * Returns all open questions.
2323
-      *
2324
-      * @param  $all boolean If true, then return visible and unvisble questions; otherwise only visible ones
2325
-      *
2326
-      * @return array
2327
-      */
2328
-     public function getAllOpenQuestions($all = true)
2329
-     {
2330
-         $questions = [];
2331
-
2332
-         $query = sprintf("
2321
+        /**
2322
+         * Returns all open questions.
2323
+         *
2324
+         * @param  $all boolean If true, then return visible and unvisble questions; otherwise only visible ones
2325
+         *
2326
+         * @return array
2327
+         */
2328
+        public function getAllOpenQuestions($all = true)
2329
+        {
2330
+            $questions = [];
2331
+
2332
+            $query = sprintf("
2333 2333
             SELECT
2334 2334
                 id, lang, username, email, category_id, question, created, answer_id, is_visible
2335 2335
             FROM
@@ -2344,9 +2344,9 @@  discard block
 block discarded – undo
2344 2344
             ($all == false ? " AND is_visible = 'Y'" : '')
2345 2345
         );
2346 2346
 
2347
-         if ($result = $this->_config->getDb()->query($query)) {
2348
-             while ($row = $this->_config->getDb()->fetchObject($result)) {
2349
-                 $questions[] = array(
2347
+            if ($result = $this->_config->getDb()->query($query)) {
2348
+                while ($row = $this->_config->getDb()->fetchObject($result)) {
2349
+                    $questions[] = array(
2350 2350
                     'id' => $row->id,
2351 2351
                     'lang' => $row->lang,
2352 2352
                     'username' => $row->username,
@@ -2357,11 +2357,11 @@  discard block
 block discarded – undo
2357 2357
                     'answer_id' => $row->answer_id,
2358 2358
                     'is_visible' => $row->is_visible,
2359 2359
                 );
2360
-             }
2361
-         }
2360
+                }
2361
+            }
2362 2362
 
2363
-         return $questions;
2364
-     }
2363
+            return $questions;
2364
+        }
2365 2365
 
2366 2366
     /**
2367 2367
      * Updates an existing voting record.
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
  * SQL constants definitions
29 29
  */
30 30
 define('FAQ_SQL_ACTIVE_YES', 'yes');
31
-define('FAQ_SQL_ACTIVE_NO',  'no');
31
+define('FAQ_SQL_ACTIVE_NO', 'no');
32 32
 
33 33
 /*
34 34
  * Query type definitions
35 35
  */
36
-define('FAQ_QUERY_TYPE_DEFAULT',      'faq_default');
37
-define('FAQ_QUERY_TYPE_APPROVAL',     'faq_approval');
38
-define('FAQ_QUERY_TYPE_EXPORT_PDF',   'faq_export_pdf');
36
+define('FAQ_QUERY_TYPE_DEFAULT', 'faq_default');
37
+define('FAQ_QUERY_TYPE_APPROVAL', 'faq_approval');
38
+define('FAQ_QUERY_TYPE_EXPORT_PDF', 'faq_export_pdf');
39 39
 define('FAQ_QUERY_TYPE_EXPORT_XHTML', 'faq_export_xhtml');
40
-define('FAQ_QUERY_TYPE_EXPORT_XML',   'faq_export_xml');
41
-define('FAQ_QUERY_TYPE_RSS_LATEST',   'faq_rss_latest');
40
+define('FAQ_QUERY_TYPE_EXPORT_XML', 'faq_export_xml');
41
+define('FAQ_QUERY_TYPE_RSS_LATEST', 'faq_rss_latest');
42 42
 
43 43
 /*
44 44
  * Sorting type definitions
@@ -384,12 +384,12 @@  discard block
 block discarded – undo
384 384
 
385 385
         $result = $this->_config->getDb()->query($query);
386 386
         $num = $this->_config->getDb()->numRows($result);
387
-        $pages = (int) ceil($num / $numPerPage);
387
+        $pages = (int)ceil($num/$numPerPage);
388 388
 
389 389
         if ($page == 1) {
390 390
             $first = 0;
391 391
         } else {
392
-            $first = $page * $numPerPage - $numPerPage;
392
+            $first = $page*$numPerPage - $numPerPage;
393 393
         }
394 394
 
395 395
         if ($num > 0) {
@@ -570,12 +570,12 @@  discard block
 block discarded – undo
570 570
         $result = $this->_config->getDb()->query($query);
571 571
 
572 572
         $num = $this->_config->getDb()->numRows($result);
573
-        $pages = ceil($num / $this->_config->get('records.numberOfRecordsPerPage'));
573
+        $pages = ceil($num/$this->_config->get('records.numberOfRecordsPerPage'));
574 574
 
575 575
         if ($page == 1) {
576 576
             $first = 0;
577 577
         } else {
578
-            $first = ($page * $this->_config->get('records.numberOfRecordsPerPage')) - $this->_config->get('records.numberOfRecordsPerPage');
578
+            $first = ($page*$this->_config->get('records.numberOfRecordsPerPage')) - $this->_config->get('records.numberOfRecordsPerPage');
579 579
         }
580 580
 
581 581
         if ($num > 0) {
@@ -1258,7 +1258,7 @@  discard block
 block discarded – undo
1258 1258
                 AND
1259 1259
                 lang = '%s'",
1260 1260
             PMF_Db::getTablePrefix(),
1261
-            (int) $faqId,
1261
+            (int)$faqId,
1262 1262
             $this->_config->getDb()->escape($faqLang)
1263 1263
         );
1264 1264
 
@@ -2311,7 +2311,7 @@  discard block
 block discarded – undo
2311 2311
                     'category_id' => $row->category_id,
2312 2312
                     'question' => $row->question,
2313 2313
                     'created' => $row->created,
2314
-                    'is_visible' => $row->is_visible, );
2314
+                    'is_visible' => $row->is_visible,);
2315 2315
             }
2316 2316
         }
2317 2317
 
@@ -2479,7 +2479,7 @@  discard block
 block discarded – undo
2479 2479
                     'revision_id' => $row->revision_id,
2480 2480
                     'user' => $row->usr,
2481 2481
                     'date' => $row->datum,
2482
-                    'changelog' => $row->what, );
2482
+                    'changelog' => $row->what,);
2483 2483
             }
2484 2484
         }
2485 2485
 
@@ -2790,13 +2790,13 @@  discard block
 block discarded – undo
2790 2790
             $mode,
2791 2791
             PMF_Db::getTablePrefix(),
2792 2792
             $mode,
2793
-            (int) $recordId);
2793
+            (int)$recordId);
2794 2794
 
2795 2795
         $result = $this->_config->getDb()->query($query);
2796 2796
 
2797 2797
         if ($this->_config->getDb()->numRows($result) > 0) {
2798 2798
             while (($row = $this->_config->getDb()->fetchObject($result))) {
2799
-                $permissions[] = (int) $row->permission;
2799
+                $permissions[] = (int)$row->permission;
2800 2800
             }
2801 2801
         }
2802 2802
 
@@ -3043,7 +3043,7 @@  discard block
 block discarded – undo
3043 3043
                 $lang
3044 3044
             );
3045 3045
 
3046
-            $retval = (bool) $this->_config->getDb()->query($update);
3046
+            $retval = (bool)$this->_config->getDb()->query($update);
3047 3047
         }
3048 3048
 
3049 3049
         return $retval;
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
      * @param int    $record_id  Record id
1070 1070
      * @param string $language   Language
1071 1071
      *
1072
-     * @return int
1072
+     * @return boolean
1073 1073
      */
1074 1074
     public function addCategoryRelations(Array $categories, $record_id, $language)
1075 1075
     {
@@ -1534,7 +1534,7 @@  discard block
 block discarded – undo
1534 1534
      * @param int    $record_id   Record id
1535 1535
      * @param string $record_lang Record language
1536 1536
      *
1537
-     * @return array
1537
+     * @return boolean
1538 1538
      */
1539 1539
     public function addNewRevision($record_id, $record_lang)
1540 1540
     {
@@ -2534,7 +2534,7 @@  discard block
 block discarded – undo
2534 2534
      * Build a logic sequence, for a WHERE statement, of those category IDs
2535 2535
      * children of the provided category ID, if any.
2536 2536
      *
2537
-     * @param   $nCatid
2537
+     * @param   integer $nCatid
2538 2538
      * @param   $logicOp
2539 2539
      * @param   $oCat
2540 2540
      *
@@ -2564,14 +2564,14 @@  discard block
 block discarded – undo
2564 2564
     /**
2565 2565
      * Build the SQL query for retrieving faq records according to the constraints provided.
2566 2566
      *
2567
-     * @param   $QueryType
2568
-     * @param   $nCatid
2569
-     * @param   $bDownwards
2570
-     * @param   $lang
2571
-     * @param   $date
2567
+     * @param   string $QueryType
2568
+     * @param   integer $nCatid
2569
+     * @param   boolean $bDownwards
2570
+     * @param   string $lang
2571
+     * @param   string $date
2572 2572
      * @param   $faqid
2573 2573
      *
2574
-     * @return array
2574
+     * @return string
2575 2575
      *
2576 2576
      * @since   2005-11-02
2577 2577
      *
Please login to merge, or discard this patch.
phpmyfaq/admin/category.main.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -321,19 +321,19 @@  discard block
 block discarded – undo
321 321
 
322 322
         if ($cat['lang'] == $lang) {
323 323
             // add sub category (if current language)
324
-           printf('
324
+            printf('
325 325
             <a class="btn btn-info btn-sm" href="?action=addcategory&amp;cat=%s&amp;lang=%s"><span title="%s" class="fa fa-plus fa-fw"></span></a> ',
326
-               $cat['id'],
327
-               $cat['lang'],
328
-               $PMF_LANG['ad_quick_category']
329
-           );
326
+                $cat['id'],
327
+                $cat['lang'],
328
+                $PMF_LANG['ad_quick_category']
329
+            );
330 330
 
331
-           // rename (sub) category (if current language)
332
-           printf('
331
+            // rename (sub) category (if current language)
332
+            printf('
333 333
                <a class="btn btn-info btn-sm" href="?action=editcategory&amp;cat=%s"><span title="%s" class="fa fa-edit fa-fw"></a> ',
334
-               $cat['id'],
335
-               $PMF_LANG['ad_kateg_rename']
336
-           );
334
+                $cat['id'],
335
+                $PMF_LANG['ad_kateg_rename']
336
+            );
337 337
         }
338 338
 
339 339
         // translate category (always)
@@ -357,20 +357,20 @@  discard block
 block discarded – undo
357 357
 
358 358
         if ($cat['lang'] == $lang) {
359 359
             // cut category (if current language)
360
-           printf(
361
-               '<a class="btn btn-warning btn-sm" href="?action=cutcategory&amp;cat=%s"><span title="%s" class="fa fa-cut fa-fw"></a> ',
362
-               $cat['id'],
363
-               $PMF_LANG['ad_categ_cut']
364
-           );
360
+            printf(
361
+                '<a class="btn btn-warning btn-sm" href="?action=cutcategory&amp;cat=%s"><span title="%s" class="fa fa-cut fa-fw"></a> ',
362
+                $cat['id'],
363
+                $PMF_LANG['ad_categ_cut']
364
+            );
365 365
 
366 366
             if ($category->numParent($cat['parent_id']) > 1) {
367 367
                 // move category (if current language) AND more than 1 category at the same level)
368
-              printf(
369
-                  '<a class="btn btn-warning btn-sm" href="?action=movecategory&amp;cat=%s&amp;parent_id=%s"><span title="%s" class="fa fa-sort fa-fw"></a> ',
370
-                  $cat['id'],
371
-                  $cat['parent_id'],
372
-                  $PMF_LANG['ad_categ_move']
373
-              );
368
+                printf(
369
+                    '<a class="btn btn-warning btn-sm" href="?action=movecategory&amp;cat=%s&amp;parent_id=%s"><span title="%s" class="fa fa-sort fa-fw"></a> ',
370
+                    $cat['id'],
371
+                    $cat['parent_id'],
372
+                    $PMF_LANG['ad_categ_move']
373
+                );
374 374
             }
375 375
         }
376 376
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                             <i aria-hidden="true" class="fa fa-plus fa-fw"></i> <?php echo $PMF_LANG['ad_kateg_add']; ?>
37 37
                         </a>
38 38
                         <a class="btn btn-info" href="?action=showcategory">
39
-                            <i aria-hidden="true" class="fa fa-th fa-fw"></i> <?php echo $PMF_LANG['ad_categ_show'];?>
39
+                            <i aria-hidden="true" class="fa fa-th fa-fw"></i> <?php echo $PMF_LANG['ad_categ_show']; ?>
40 40
                         </a>
41 41
                     </div>
42 42
                 </h2>
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Mail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -490,8 +490,8 @@
 block discarded – undo
490 490
         $this->headers['X-Mailer'] = $this->_mailer;
491 491
 
492 492
         // X-MSMail-Priority
493
-        if (isset($this->priorities[(int) $this->priority])) {
494
-            $this->headers['X-MSMail-Priority'] = $this->priorities[(int) $this->priority];
493
+        if (isset($this->priorities[(int)$this->priority])) {
494
+            $this->headers['X-MSMail-Priority'] = $this->priorities[(int)$this->priority];
495 495
         }
496 496
 
497 497
         // X-Originating-IP
Please login to merge, or discard this patch.