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 — 3.0 ( 49ab7a...0a9b70 )
by Thorsten
19:57 queued 13:30
created
phpmyfaq/src/phpMyFAQ/Language/Plurals.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function __construct($translation)
69 69
     {
70 70
         $this->PMF_TRANSL = $translation;
71
-        $this->nPlurals = (int) $this->PMF_TRANSL['nplurals'];
71
+        $this->nPlurals = (int)$this->PMF_TRANSL['nplurals'];
72 72
         $this->lang = $this->PMF_TRANSL['metaLanguage'];
73 73
 
74 74
         if ($this->plural($this->lang, 0) != -1) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             // Note: expressions in .po files are not strict C expressions, so extra braces might be
157 157
             // needed for that expression to work here (for example see 'lt')
158 158
             case 'ar':
159
-                return ($n == 0) ? 0 : ($n == 1 ? 1 : ($n == 2 ? 2 : (($n % 100 >= 3 && $n % 100 <= 10) ? 3 : (($n % 100 >= 11 && $n % 100 <= 99) || ($n % 100 == 1) || ($n % 100 == 2) ? 4 : 5))));
159
+                return ($n == 0) ? 0 : ($n == 1 ? 1 : ($n == 2 ? 2 : (($n%100 >= 3 && $n%100 <= 10) ? 3 : (($n%100 >= 11 && $n%100 <= 99) || ($n%100 == 1) || ($n%100 == 2) ? 4 : 5))));
160 160
             case 'bn':
161 161
                 return 0;
162 162
             case 'cy':
@@ -196,27 +196,27 @@  discard block
 block discarded – undo
196 196
             case 'ko':
197 197
                 return 0;
198 198
             case 'lt':
199
-                return ($n % 10 == 1 && $n % 100 != 11) ? 0 : ($n % 10 >= 2 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
199
+                return ($n%10 == 1 && $n%100 != 11) ? 0 : ($n%10 >= 2 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2);
200 200
             case 'lv':
201
-                return ($n % 10 == 1 && $n % 100 != 11) ? 0 : ($n != 0 ? 1 : 2);
201
+                return ($n%10 == 1 && $n%100 != 11) ? 0 : ($n != 0 ? 1 : 2);
202 202
             case 'nb':
203 203
                 return $n != 1;
204 204
             case 'nl':
205 205
                 return $n != 1;
206 206
             case 'pl':
207
-                return ($n == 1) ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
207
+                return ($n == 1) ? 0 : ($n%10 >= 2 && $n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2);
208 208
             case 'pt':
209 209
                 return $n != 1;
210 210
             case 'pt-br':
211 211
                 return $n > 1;
212 212
             case 'ro':
213
-                return ($n == 1) ? 0 : (($n == 0 || ($n % 100 > 0 && $n % 100 < 20)) ? 1 : 2);
213
+                return ($n == 1) ? 0 : (($n == 0 || ($n%100 > 0 && $n%100 < 20)) ? 1 : 2);
214 214
             case 'ru':
215
-                return ($n % 10 == 1 && $n % 100 != 11) ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
215
+                return ($n%10 == 1 && $n%100 != 11) ? 0 : ($n%10 >= 2 && $n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2);
216 216
             case 'sl':
217
-                return ($n % 100 == 1) ? 0 : ($n % 100 == 2 ? 1 : ($n % 100 == 3 || n % 100 == 4 ? 2 : 3));
217
+                return ($n%100 == 1) ? 0 : ($n%100 == 2 ? 1 : ($n%100 == 3 || n%100 == 4 ? 2 : 3));
218 218
             case 'sr':
219
-                return ($n % 10 == 1 && $n % 100 != 11) ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
219
+                return ($n%10 == 1 && $n%100 != 11) ? 0 : ($n%10 >= 2 && $n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2);
220 220
             case 'sv':
221 221
                 return $n != 1;
222 222
             case 'th':
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             case 'tw':
227 227
                 return 0;
228 228
             case 'uk':
229
-                return ($n % 10 == 1 && $n % 100 != 11) ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
229
+                return ($n%10 == 1 && $n%100 != 11) ? 0 : ($n%10 >= 2 && $n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2);
230 230
             case 'vi':
231 231
                 return 0;
232 232
             case 'zh':
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Glossary.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             WHERE
217 217
                 id = %d AND lang = '%s'",
218 218
             Db::getTablePrefix(),
219
-            (int) $id,
219
+            (int)$id,
220 220
             $this->config->getLanguage()->getLanguage()
221 221
         );
222 222
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             Db::getTablePrefix(),
292 292
             Strings::htmlspecialchars($this->item),
293 293
             Strings::htmlspecialchars($this->definition),
294
-            (int) $id,
294
+            (int)$id,
295 295
             $this->config->getLanguage()->getLanguage()
296 296
         );
297 297
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             WHERE
318 318
                 id = %d AND lang = '%s'",
319 319
             Db::getTablePrefix(),
320
-            (int) $id,
320
+            (int)$id,
321 321
             $this->config->getLanguage()->getLanguage()
322 322
         );
323 323
 
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Permission/LargePermission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $comma = '';
195 195
 
196 196
         foreach ($sectionData as $key => $val) {
197
-            $set .= $comma . $key . " = '" . $this->config->getDb()->escape($checkedData[$key]) . "'";
197
+            $set .= $comma.$key." = '".$this->config->getDb()->escape($checkedData[$key])."'";
198 198
             $comma = ",\n                ";
199 199
         }
200 200
 
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
             return false;
485 485
         }
486 486
 
487
-        $delete =  sprintf('
487
+        $delete = sprintf('
488 488
             DELETE FROM
489 489
                 %sfaqsection_group
490 490
             WHERE
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Permission/MediumPermission.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             $nextId,
288 288
             $groupData['name'],
289 289
             $groupData['description'],
290
-            (int) $groupData['auto_join']
290
+            (int)$groupData['auto_join']
291 291
         );
292 292
 
293 293
         $res = $this->config->getDb()->query($insert);
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
                 %sfaqgroup',
673 673
             Db::getTablePrefix()
674 674
         );
675
-        if ($userId != 1){
675
+        if ($userId != 1) {
676 676
             $select = sprintf('
677 677
                 SELECT
678 678
                     fg.group_id
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
         if (!isset($groupData['auto_join'])) {
795 795
             $groupData['auto_join'] = $this->defaultGroupData['auto_join'];
796 796
         }
797
-        $groupData['auto_join'] = (int) $groupData['auto_join'];
797
+        $groupData['auto_join'] = (int)$groupData['auto_join'];
798 798
 
799 799
         return $groupData;
800 800
     }
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Permission/BasicPermission.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -270,9 +270,9 @@  discard block
 block discarded – undo
270 270
 
271 271
         // process right data
272 272
         $rightData = $this->config->getDb()->fetchArray($res);
273
-        $rightData['for_users'] = (bool) $rightData['for_users'];
274
-        $rightData['for_groups'] = (bool) $rightData['for_groups'];
275
-        $rightData['for_sections'] = (bool) $rightData['for_sections'];
273
+        $rightData['for_users'] = (bool)$rightData['for_users'];
274
+        $rightData['for_groups'] = (bool)$rightData['for_groups'];
275
+        $rightData['for_sections'] = (bool)$rightData['for_sections'];
276 276
 
277 277
         return $rightData;
278 278
     }
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
             $nextId,
319 319
             $rightData['name'],
320 320
             $rightData['description'],
321
-            isset($rightData['for_users']) ? (int) $rightData['for_users'] : 1,
322
-            isset($rightData['for_groups']) ? (int) $rightData['for_groups'] : 1,
323
-            isset($rightData['for_sections']) ? (int) $rightData['for_sections'] : 1
321
+            isset($rightData['for_users']) ? (int)$rightData['for_users'] : 1,
322
+            isset($rightData['for_groups']) ? (int)$rightData['for_groups'] : 1,
323
+            isset($rightData['for_sections']) ? (int)$rightData['for_sections'] : 1
324 324
         );
325 325
 
326 326
         if (!$this->config->getDb()->query($insert)) {
@@ -582,9 +582,9 @@  discard block
 block discarded – undo
582 582
             $rightData['for_sections'] = $this->defaultRightData['for_sections'];
583 583
         }
584 584
 
585
-        $rightData['for_users'] = (int) $rightData['for_users'];
586
-        $rightData['for_groups'] = (int) $rightData['for_groups'];
587
-        $rightData['for_sections'] = (int) $rightData['for_sections'];
585
+        $rightData['for_users'] = (int)$rightData['for_users'];
586
+        $rightData['for_groups'] = (int)$rightData['for_groups'];
587
+        $rightData['for_sections'] = (int)$rightData['for_sections'];
588 588
 
589 589
         return $rightData;
590 590
     }
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Init.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
         return $filename;
140 140
     }
141 141
 
142
-   /**
143
-    * Clean the filename of any uploaded file by the user and force an error
144
-    * when calling is_uploaded_file($_FILES[key]['tmp_name']) if the cleanup goes wrong.
145
-    */
146
-   private static function _cleanFilenames()
147
-   {
148
-       reset($_FILES);
149
-       foreach ($_FILES as $key => $value) {
150
-           if (is_array($_FILES[$key]['name'])) {
151
-               reset($_FILES[$key]['name']);
152
-               // We have a multiple upload with the same name for <input />
153
-               foreach ($_FILES[$key]['name'] as $idx => $valu2) {
142
+    /**
143
+     * Clean the filename of any uploaded file by the user and force an error
144
+     * when calling is_uploaded_file($_FILES[key]['tmp_name']) if the cleanup goes wrong.
145
+     */
146
+    private static function _cleanFilenames()
147
+    {
148
+        reset($_FILES);
149
+        foreach ($_FILES as $key => $value) {
150
+            if (is_array($_FILES[$key]['name'])) {
151
+                reset($_FILES[$key]['name']);
152
+                // We have a multiple upload with the same name for <input />
153
+                foreach ($_FILES[$key]['name'] as $idx => $valu2) {
154 154
                     $_FILES[$key]['name'][$idx] = self::_basicFilenameClean($_FILES[$key]['name'][$idx]);
155 155
                     if ('' == $_FILES[$key]['name'][$idx]) {
156 156
                         $_FILES[$key]['type'][$idx] = '';
@@ -159,19 +159,19 @@  discard block
 block discarded – undo
159 159
                         $_FILES[$key]['error'][$idx] = UPLOAD_ERR_NO_FILE;
160 160
                     }
161 161
                 }
162
-               reset($_FILES[$key]['name']);
163
-           } else {
164
-               $_FILES[$key]['name'] = self::_basicFilenameClean($_FILES[$key]['name']);
165
-               if ('' == $_FILES[$key]['name']) {
166
-                   $_FILES[$key]['type'] = '';
167
-                   $_FILES[$key]['tmp_name'] = '';
168
-                   $_FILES[$key]['size'] = 0;
169
-                   $_FILES[$key]['error'] = UPLOAD_ERR_NO_FILE;
170
-               }
171
-           }
172
-       }
173
-       reset($_FILES);
174
-   }
162
+                reset($_FILES[$key]['name']);
163
+            } else {
164
+                $_FILES[$key]['name'] = self::_basicFilenameClean($_FILES[$key]['name']);
165
+                if ('' == $_FILES[$key]['name']) {
166
+                    $_FILES[$key]['type'] = '';
167
+                    $_FILES[$key]['tmp_name'] = '';
168
+                    $_FILES[$key]['size'] = 0;
169
+                    $_FILES[$key]['error'] = UPLOAD_ERR_NO_FILE;
170
+                }
171
+            }
172
+        }
173
+        reset($_FILES);
174
+    }
175 175
 
176 176
     /**
177 177
      * Cleans a html string from some xss issues.
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Strings/StringsAbstract.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,14 +77,14 @@
 block discarded – undo
77 77
             return mb_detect_encoding($str, 'UTF-8', true);
78 78
         } else {
79 79
             $regex = '/^([\x00-\x7f]|'
80
-                   .'[\xc2-\xdf][\x80-\xbf]|'
81
-                   .'\xe0[\xa0-\xbf][\x80-\xbf]|'
82
-                   .'[\xe1-\xec][\x80-\xbf]{2}|'
83
-                   .'\xed[\x80-\x9f][\x80-\xbf]|'
84
-                   .'[\xee-\xef][\x80-\xbf]{2}|'
85
-                   .'\xf0[\x90-\xbf][\x80-\xbf]{2}|'
86
-                   .'[\xf1-\xf3][\x80-\xbf]{3}|'
87
-                   .'\xf4[\x80-\x8f][\x80-\xbf]{2})*$/';
80
+                    .'[\xc2-\xdf][\x80-\xbf]|'
81
+                    .'\xe0[\xa0-\xbf][\x80-\xbf]|'
82
+                    .'[\xe1-\xec][\x80-\xbf]{2}|'
83
+                    .'\xed[\x80-\x9f][\x80-\xbf]|'
84
+                    .'[\xee-\xef][\x80-\xbf]{2}|'
85
+                    .'\xf0[\x90-\xbf][\x80-\xbf]{2}|'
86
+                    .'[\xf1-\xf3][\x80-\xbf]{3}|'
87
+                    .'\xf4[\x80-\x8f][\x80-\xbf]{2})*$/';
88 88
 
89 89
             return preg_match($regex, $str) === 1;
90 90
         }
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Strings/Basic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
      */
156 156
     public function strstr($haystack, $needle, $part = false)
157 157
     {
158
-        return strstr($haystack, $needle, (boolean) $part);
158
+        return strstr($haystack, $needle, (boolean)$part);
159 159
     }
160 160
 
161 161
     /**
Please login to merge, or discard this patch.
phpmyfaq/src/phpMyFAQ/Permission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     public static function selectPerm($permLevel, Configuration $config)
88 88
     {
89 89
         if (isset($permLevel)) {
90
-            $permClass = '\phpMyFAQ\Permission\\' . ucfirst(strtolower($permLevel)) . 'Permission';
90
+            $permClass = '\phpMyFAQ\Permission\\'.ucfirst(strtolower($permLevel)).'Permission';
91 91
             if (class_exists($permClass)) {
92 92
                 return new $permClass($config);
93 93
             }
Please login to merge, or discard this patch.