Passed
Push — master ( 192b85...66bfa3 )
by Tomasz
03:58
created
web/lib/admin/PageDecoration.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -206,8 +206,7 @@
 block discarded – undo
206 206
             $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "accountstatus/");
207 207
         } elseif (strrpos($_SERVER['PHP_SELF'], "diag/")) {
208 208
             $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "diag/");
209
-        }
210
-            else {
209
+        } else {
211 210
             $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/");
212 211
         }
213 212
 
Please login to merge, or discard this patch.
core/diag/Telepath.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -120,6 +120,9 @@
 block discarded – undo
120 120
         return Telepath::STATUS_GOOD;
121 121
     }
122 122
 
123
+    /**
124
+     * @param string $homeFlr
125
+     */
123 126
     private function checkNROFlow($visitedFlr, $homeFlr) {
124 127
         // TODO: this is a stub, need eduroam OT API to query the current server status
125 128
         // APIQueryNRODirect($visitedFlr, $homeFlr);
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Doc Comments   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,6 +120,9 @@  discard block
 block discarded – undo
120 120
         return $find[0];
121 121
     }
122 122
 
123
+    /**
124
+     * @param string $input
125
+     */
123 126
     public function tooltip($input) {
124 127
         $descriptions = [];
125 128
         if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0) {
@@ -256,6 +259,10 @@  discard block
 block discarded – undo
256 259
         return $number . " B";
257 260
     }
258 261
 
262
+    /**
263
+     * @param string $ref
264
+     * @param boolean $checkpublic
265
+     */
259 266
     public static function getBlobFromDB($ref, $checkpublic) {
260 267
         $validator = new \web\lib\common\InputValidation();
261 268
         $reference = $validator->databaseReference($ref);
@@ -402,7 +409,7 @@  discard block
 block discarded – undo
402 409
      * @param string $text the text to display
403 410
      * @param string $caption the caption to display
404 411
      * @param bool $omittabletags the output usually has tr/td table tags, this option suppresses them
405
-     * @return type
412
+     * @return string
406 413
      */
407 414
     public function boxOkay(string $text = NULL, string $caption = NULL, bool $omittabletags = FALSE) {
408 415
         return $this->boxFlexible(\core\common\Entity::L_OK, $text, $caption, $omittabletags);
@@ -414,7 +421,7 @@  discard block
 block discarded – undo
414 421
      * @param string $text the text to display
415 422
      * @param string $caption the caption to display
416 423
      * @param bool $omittabletags the output usually has tr/td table tags, this option suppresses them
417
-     * @return type
424
+     * @return string
418 425
      */
419 426
     public function boxRemark(string $text = NULL, string $caption = NULL, bool $omittabletags = FALSE) {
420 427
         return $this->boxFlexible(\core\common\Entity::L_REMARK, $text, $caption, $omittabletags);
@@ -426,7 +433,7 @@  discard block
 block discarded – undo
426 433
      * @param string $text the text to display
427 434
      * @param string $caption the caption to display
428 435
      * @param bool $omittabletags the output usually has tr/td table tags, this option suppresses them
429
-     * @return type
436
+     * @return string
430 437
      */
431 438
     public function boxWarning(string $text = NULL, string $caption = NULL, bool $omittabletags = FALSE) {
432 439
         return $this->boxFlexible(\core\common\Entity::L_WARN, $text, $caption, $omittabletags);
@@ -438,7 +445,7 @@  discard block
 block discarded – undo
438 445
      * @param string $text the text to display
439 446
      * @param string $caption the caption to display
440 447
      * @param bool $omittabletags the output usually has tr/td table tags, this option suppresses them
441
-     * @return type
448
+     * @return string
442 449
      */
443 450
     public function boxError(string $text = NULL, string $caption = NULL, bool $omittabletags = FALSE) {
444 451
         return $this->boxFlexible(\core\common\Entity::L_ERROR, $text, $caption, $omittabletags);
Please login to merge, or discard this patch.
core/UserAPI.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,6 +125,7 @@  discard block
 block discarded – undo
125 125
      * 
126 126
      * @param string $device
127 127
      * @param AbstractProfile $profile
128
+     * @param string $generatedFor
128 129
      * @return array info about the new installer (mime and link)
129 130
      */
130 131
     private function generateNewInstaller($device, $profile, $generatedFor, $token, $password) {
@@ -459,6 +460,10 @@  discard block
 block discarded – undo
459 460
         readfile($file);
460 461
     }
461 462
 
463
+    /**
464
+     * @param string $destFile
465
+     * @param integer $resize
466
+     */
462 467
     private function processImage($inputImage, $destFile, $width, $height, $resize) {
463 468
         $info = new \finfo();
464 469
         $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE);
@@ -485,7 +490,6 @@  discard block
 block discarded – undo
485 490
      * When called for DiscoJuice, first check if file cache exists
486 491
      * If not then generate the file and save it in the cache
487 492
      * @param int $idp IdP identifier
488
-     * @param int $disco flag turning on image generation for DiscoJuice
489 493
      * @param int $width maximum width of the generated image 
490 494
      * @param int $height  maximum height of the generated image
491 495
      * if one of these is 0 then it is treated as no upper bound
Please login to merge, or discard this patch.
core/DeviceConfig.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -260,6 +260,9 @@  discard block
 block discarded – undo
260 260
         return _("Sorry, this should not happen - no additional information is available");
261 261
     }
262 262
     
263
+    /**
264
+     * @param string $file
265
+     */
263 266
     private function findSourceFile($file) {
264 267
         if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) {
265 268
             return $this->module_path . '/Files/' . $this->device_id . '/' . $file;
@@ -540,6 +543,9 @@  discard block
 block discarded – undo
540 543
         'application/pdf' => 'pdf',
541 544
     ];
542 545
 
546
+    /**
547
+     * @param string $type
548
+     */
543 549
     private function saveLogoFile($logos,$type) {
544 550
         $iterator = 0;
545 551
         $returnarray = [];
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Doc Comments   +10 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,6 +96,12 @@  discard block
 block discarded – undo
96 96
      */
97 97
     protected $frontendHandle;
98 98
 
99
+    /**
100
+     * @param integer $idpIdentifier
101
+     * @param string $deviceId
102
+     * @param string $area
103
+     * @param string $lang
104
+     */
99 105
     protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType) {
100 106
         if (CONFIG['PATHS']['logdir']) {
101 107
             $f = fopen(CONFIG['PATHS']['logdir'] . "/download_details.log", "a");
@@ -285,6 +291,9 @@  discard block
 block discarded – undo
285 291
      * 
286 292
      * @param string device the device identifier string
287 293
      * @param string path the path where the new installer can be found
294
+     * @param string $device
295
+     * @param string $path
296
+     * @param integer $integerEapType
288 297
      */
289 298
     abstract public function updateCache($device, $path, $mime, $integerEapType);
290 299
 
@@ -600,7 +609,7 @@  discard block
 block discarded – undo
600 609
      * it? Silverbullet will always return TRUE; RADIUS profiles need to do some
601 610
      * heavy lifting here.
602 611
      * 
603
-     * * @return boolean TRUE if enough info is set to enable installers
612
+     * * @return integer TRUE if enough info is set to enable installers
604 613
      */
605 614
     public function readinessLevel() {
606 615
         $result = $this->databaseHandle->exec("SELECT sufficient_config, showtime FROM profile WHERE profile_id = ?", "i", $this->identifier);
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
      * @param int $rowid the HTML field base name of the option to be displayed
206 206
      * @param string $optionName the name of the option to display
207 207
      * @param string $optionValue the value of the option to display
208
-     * @param mixed $optionLang the language of the option to display
208
+     * @param null|string $optionLang the language of the option to display
209 209
      * @return string HTML code
210 210
      * @throws Exception
211 211
      */
Please login to merge, or discard this patch.
web/diag/action_userdiag.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -134,8 +134,9 @@  discard block
 block discarded – undo
134 134
                     array_multisort($name, SORT_ASC, SORT_LOCALE_STRING, $displaylist);
135 135
                     setlocale(LC_ALL, $current_locale);
136 136
 
137
-                    foreach ($displaylist as $id => $oneinst)
138
-                        echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>";
137
+                    foreach ($displaylist as $id => $oneinst) {
138
+                                            echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>";
139
+                    }
139 140
                     ?>
140 141
                 </select>
141 142
                 <button type='submit' class='submit'><?php echo _("Submit Information"); ?></button>
@@ -198,10 +199,12 @@  discard block
 block discarded – undo
198 199
                 $checkresult[$number] = $check['instance']->udpReachability($number, FALSE, FALSE);
199 200
                 if ($checkresult[$number] == \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { // so now things work?!
200 201
                     // either a packet size or Operator-Name problem!
201
-                    if ($check['instance']->udpReachability($number, TRUE, FALSE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT)
202
-                        $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""];
203
-                    if ($check['instance']->udpReachability($number, FALSE, TRUE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT)
204
-                        $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""];
202
+                    if ($check['instance']->udpReachability($number, TRUE, FALSE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) {
203
+                                            $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""];
204
+                    }
205
+                    if ($check['instance']->udpReachability($number, FALSE, TRUE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) {
206
+                                            $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""];
207
+                    }
205 208
                 } else { // still no response or immediate reject
206 209
                     // if this is a CAT realm with anon ID set, we can't be seeing an NPS ignorance problem
207 210
                     // and consequently, the realm has actual issues
@@ -235,12 +238,13 @@  discard block
 block discarded – undo
235 238
 // re-write check history with that extra knowledge
236 239
     $copycat = $realmproblems;
237 240
 
238
-    foreach ($realmproblems as &$problem)
239
-        if ($problem['STATUS'] == "REALM_POSSIBLY_NPS")
241
+    foreach ($realmproblems as &$problem) {
242
+            if ($problem['STATUS'] == "REALM_POSSIBLY_NPS")
240 243
             foreach ($copycat as $otherproblem)
241 244
                 if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] != "REALM_POSSIBLY_NPS")
242 245
                     if ($otherproblem['STATUS'] == "REACHABLE") { // worked elsewhere, but not on this probe:
243 246
                         $problem['STATUS'] = "REALM_DOWN";
247
+    }
244 248
                     } else { // inherit other problem; in any case not an NPS problem
245 249
                         $problem['STATUS'] = $otherproblem['STATUS'];
246 250
                     }
@@ -250,11 +254,12 @@  discard block
 block discarded – undo
250 254
 
251 255
     $copycat = $realmproblems;
252 256
 
253
-    foreach ($realmproblems as &$problem)
254
-        if ($problem['STATUS'] == "REALM_DOWN")
257
+    foreach ($realmproblems as &$problem) {
258
+            if ($problem['STATUS'] == "REALM_DOWN")
255 259
             foreach ($copycat as $otherproblem)
256 260
                 if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] == "REACHABLE")
257 261
                     $problem['STATUS'] = "INFRASTRUCTURE";
262
+    }
258 263
     unset($problem);
259 264
 
260 265
 // finally, extract all certprobs we got from the reachability checks; merge from all
@@ -265,8 +270,9 @@  discard block
 block discarded – undo
265 270
     foreach ($checks as $check) {
266 271
         $instance = $check['instance'];
267 272
         $resultset = $instance->UDP_reachability_result;
268
-        foreach ($resultset as $result)
269
-            $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']);
273
+        foreach ($resultset as $result) {
274
+                    $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']);
275
+        }
270 276
     }
271 277
 
272 278
 // now we have something to say...
Please login to merge, or discard this patch.
devices/linux/Device_Linux.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@
 block discarded – undo
124 124
         $out .= "Config.eap_inner = '" . $eapMethod['INNER'] . "'\n";
125 125
         if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') {
126 126
             $out .= "Config.use_other_tls_id = True\n";
127
-        }
128
-        else {
127
+        } else {
129 128
             $out .= "Config.use_other_tls_id = False\n";
130 129
         }
131 130
         $tou = $this->mkUserConsent();
Please login to merge, or discard this patch.