Test Failed
Push — master ( 94949b...be3e2f )
by Tomasz
10:33
created
core/diag/Sociopath.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 "TXT" => _("If you use more than one device: do your other devices still work?"),
109 109
                 "FACTOR_YES" => 0.33, // seems that all is okay with the account as such
110 110
                 "FACTOR_NO" => 3, // now that is suspicious indeed
111
-                "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),],
111
+                "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"), ],
112 112
             6 => ["AREA" => AbstractTest::INFRA_SP_80211,
113 113
                 "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"),
114 114
                 "FACTOR_YES" => 3,
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
         $questionDetails = $this->qaArray[$questionNumber];
145 145
         if ($answer === TRUE) {
146 146
             $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_YES"];
147
-            $this->loggerInstance->debug(4, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR_YES"] . "\n");
147
+            $this->loggerInstance->debug(4, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n");
148 148
             $factor = $questionDetails["FACTOR_YES"];
149 149
         } elseif ($answer === FALSE) {
150 150
             $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_NO"];
151
-            $this->loggerInstance->debug(4, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR_NO"] . "\n");
151
+            $this->loggerInstance->debug(4, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n");
152 152
             $factor = $questionDetails["FACTOR_NO"];
153 153
         } else {
154 154
             $factor = 1;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         // if both are identical, take any of the questions in the pool of both
184 184
         foreach ($this->qaArray as $questionNumber => $questionDetails) {
185 185
             // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it
186
-            if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) {
186
+            if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) {
187 187
                 return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]);
188 188
             }
189 189
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $text = $this->genericVerdictTexts[$area];
212 212
         foreach ($this->previousQuestions as $number => $factor) {
213 213
             if ($this->qaArray[$number]["AREA"] == $area && $factor > 1) {
214
-                $text .= "\n\n" . $this->qaArray[$number]["VERDICTLECTURE"];
214
+                $text .= "\n\n".$this->qaArray[$number]["VERDICTLECTURE"];
215 215
             }
216 216
         }
217 217
         return $text;
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -493,17 +493,17 @@  discard block
 block discarded – undo
493 493
                 }
494 494
                 echo "<td class='inst_td'>
495 495
                          <input type='hidden' name='inst' value='" 
496
-                       . $index."'>"
497
-                       . "<span style='display:none' class='inst_name'>".$my_idp."</span>"
498
-                       . "<span>".$idp_instance->name."</span>"
499
-                       . " (<a href='overview_org.php?inst_id="
500
-                       . $idp_instance->identifier."'>" 
501
-                       . (in_array($index, $userIdps) ? _("manage") : _("view"))
502
-                       . "</a>)"
503
-                       . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>") 
504
-                       . implode("</li><li>", $listOfSilverbulletRealms) 
505
-                       . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>")
506
-                       . "</td>";
496
+                        . $index."'>"
497
+                        . "<span style='display:none' class='inst_name'>".$my_idp."</span>"
498
+                        . "<span>".$idp_instance->name."</span>"
499
+                        . " (<a href='overview_org.php?inst_id="
500
+                        . $idp_instance->identifier."'>" 
501
+                        . (in_array($index, $userIdps) ? _("manage") : _("view"))
502
+                        . "</a>)"
503
+                        . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>") 
504
+                        . implode("</li><li>", $listOfSilverbulletRealms) 
505
+                        . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>")
506
+                        . "</td>";
507 507
                 // deployment status; need to dive into profiles for this
508 508
                 // show happy eyeballs if at least one profile is configured/showtime     
509 509
                 if (\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] !== 'MSP') {
@@ -560,8 +560,8 @@  discard block
 block discarded – undo
560 560
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
561 561
                                 <input type='hidden' name='invitation_id' value='".$oneinvite['token']."'/>
562 562
                                 <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
563
-                           . sprintf(_("(expires %s)"), $oneinvite['expiry'])
564
-                           . "</form>";
563
+                            . sprintf(_("(expires %s)"), $oneinvite['expiry'])
564
+                            . "</form>";
565 565
                         }
566 566
                         echo "      </td>";                          
567 567
                         echo "         </tr>";
Please login to merge, or discard this patch.
devices/eap_config/DeviceXML.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $dom = new \DOMDocument('1.0', 'utf-8');
145 145
         $root = $dom->createElement($rootname);
146 146
         $dom->appendChild($root);
147
-        $ns = $dom->createAttributeNS( 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation' );
147
+        $ns = $dom->createAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation');
148 148
         $ns->value = "eap-metadata.xsd";
149 149
         $root->appendChild($ns);
150 150
         $this->openRoamingToU = sprintf(_("I have read and agree to OpenRoaming Terms of Use at %s."), "https://wballiance.com/openroaming/toc-2020/");
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 if ($netDefinition['condition'] === 'internal:openroaming' &&
182 182
                         $this->attributes['internal:openroaming']) {
183 183
                     $this->setORtou();
184
-                    if (preg_match("/^ask/",$this->attributes['media:openroaming'][0])) {
184
+                    if (preg_match("/^ask/", $this->attributes['media:openroaming'][0])) {
185 185
                         $orNetwork = $netDefinition;
186 186
                         continue;                        
187 187
                     }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     }
239 239
     
240 240
     private function setORtou() {
241
-        if (preg_match("/preagreed/",$this->attributes['media:openroaming'][0])) {
241
+        if (preg_match("/preagreed/", $this->attributes['media:openroaming'][0])) {
242 242
             $this->addORtou = false;
243 243
         } else {
244 244
             $this->addORtou = true;
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $authMethods = new \core\DeviceXMLmain();
263 263
         $authMethods->setChild('AuthenticationMethod', $this->authMethodsList);
264 264
         $eapIdp->setChild('AuthenticationMethods', $authMethods);
265
-        $eapIdp->setChild('CredentialApplicability', $this->getCredentialApplicability($ssids,$oids));
265
+        $eapIdp->setChild('CredentialApplicability', $this->getCredentialApplicability($ssids, $oids));
266 266
 // TODO   $eap_idp->setChild('ValidUntil',$this->getValidUntil());
267 267
         $eapIdp->setChild('ProviderInfo', $this->providerInfo);
268 268
 // TODO   $eap_idp->setChild('VendorSpecific',$this->getVendorSpecific());
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         $attr = $this->attributes;
377 377
         if (isset($attr['general:logo_file'][0])) {
378 378
             $rawLogoBlob = $attr['general:logo_file'][0];
379
-            $logoMime= $attr['internal:logo_file'][0]['mime'];
379
+            $logoMime = $attr['internal:logo_file'][0]['mime'];
380 380
             [$scaledBlob, $scaledMime] = $this->scaleLogo($rawLogoBlob, $logoMime);
381 381
             if ($scaledMime == 'none') {
382 382
                 return NULL;
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
      */
405 405
     private function scaleLogo($blob, $mime)
406 406
     {
407
-        $maxByte = 1024*50;
408
-        $maxPixelSize = [400,300,200,100];
407
+        $maxByte = 1024 * 50;
408
+        $maxPixelSize = [400, 300, 200, 100];
409 409
         // start with the actual file size
410 410
         $logoSize = strlen($blob);
411 411
         \core\common\Logging::debug_s(4, $logoSize, "Logo file size: ", "\n");
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
             return ['', 'none'];
428 428
         }
429 429
         $imageSize = $imageObject->getImageGeometry();
430
-        \core\common\Logging::debug_s(4, $imageSize, "Input logo pixel size: ","\n");        
430
+        \core\common\Logging::debug_s(4, $imageSize, "Input logo pixel size: ", "\n");        
431 431
         foreach ($maxPixelSize as $size) {
432 432
             $tmpImage = $imageObject;
433 433
             $tmpImage->setImageFormat('PNG');
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
                 $lng = $lngAttr['lang'] === 'any' ? \config\Master::APPEARANCE['defaultlocale'] : $lngAttr['lang'];
478 478
                 $tou .= "\n".$this->openRoamingToUArray[$lng];
479 479
                 $touObj->setValue($tou);
480
-                $out[] =  $touObj;
480
+                $out[] = $touObj;
481 481
             } 
482 482
         } else {
483 483
             $tou = $standardTou[0];
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 'display' => sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP),
150 150
                 'help' => _("Set of default CAs to add to new IdPs on signup")],
151 151
             "fed:openroaming" => [
152
-                'display' => sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant),
152
+                'display' => sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant),
153 153
                 'help' => _("Allow IdP to set OpenRoaming support for its users.")],
154 154
             "fed:openroaming_customtarget" => ['display' => _("OpenRoaming: Custom NAPTR Target"), 'help' => "If you want your IdPs to use your own OpenRoaming → eduroam proxy then you can configure the hostname here; the realm check feature for IdPs will then warn them if the OpenRoaming destination server is not yours. This attribute does not need to be set, and the realm checks default to checking for the OpenRoaming → eduroam proxy operated by eduroam OT."],
155 155
             "fed:autoregister-synced" => [
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
         foreach ($optionlist as $option) {
211 211
             $type = $optioninfo->optionType($option['name']);
212
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
212
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
213 213
                 // all non-multilang attribs get this assignment ...
214 214
                 $language = "";
215 215
                 $content = $option['value'];
@@ -227,19 +227,19 @@  discard block
 block discarded – undo
227 227
                         $locationMarkers[] = $coords;
228 228
                         break;
229 229
                     case "file":
230
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
230
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
231 231
                         switch ($option['name']) {
232 232
                             case "general:logo_file":
233 233
                             case "fed:logo_file":
234
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
234
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
235 235
                                 break;
236 236
                             case "eap:ca_file":
237 237
                             // fall-through intended: display both the same way
238 238
                             case "fed:minted_ca_file":
239
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
239
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
240 240
                                 break;
241 241
                             case "support:info_file":
242
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
242
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
243 243
                                 break;
244 244
                             default:
245 245
                         }
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
250 250
                             break;
251 251
                         }
252
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
252
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
253 253
                         break;
254 254
                     default:
255
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
255
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
256 256
                 }
257 257
             }
258 258
         }
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
             $locationCount = 0;
262 262
             foreach ($locationMarkers as $g) {
263 263
                 $locationCount++;
264
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
264
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
265 265
             }
266 266
             $marker .= '<\/markers>'; // some validator says this should be escaped
267 267
             $jMarker = json_encode($locationMarkers);
268
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
268
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
269 269
         }
270 270
         \core\common\Entity::outOfThePotatoes();
271 271
         return $retval;
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
         \core\common\Entity::intoThePotatoes();
282 282
         $idpoptions = $myInst->getAttributes();
283 283
         $retval = "<div class='infobox'>
284
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2>
284
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2>
285 285
         <table>
286 286
             <tr>
287 287
                 <td>
288
-                    " . _("Country:") . "
288
+                    " . _("Country:")."
289 289
                 </td>
290 290
                 <td>
291 291
                 </td>
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         $retval .= $myFed->name;
296 296
         $retval .= "</strong>
297 297
                 </td>
298
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
298
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
299 299
         </table>
300 300
     </div>";
301 301
         $blocks = [["support", _("Global Helpdesk Details")]];        
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
         }
305 305
         foreach ($blocks as $block) {
306 306
             $retval .= "<div class='infobox'>
307
-            <h2>" . $block[1] . "</h2>
307
+            <h2>" . $block[1]."</h2>
308 308
             <table>" .
309
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
309
+                    $this->infoblock($idpoptions, $block[0], "IdP").
310 310
                     "</table>
311 311
         </div>";
312 312
         }
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
      */
322 322
     private function displaySize(int $number) {
323 323
         if ($number > 1024 * 1024) {
324
-            return round($number / 1024 / 1024, 2) . " MiB";
324
+            return round($number / 1024 / 1024, 2)." MiB";
325 325
         }
326 326
         if ($number > 1024) {
327
-            return round($number / 1024, 2) . " KiB";
327
+            return round($number / 1024, 2)." KiB";
328 328
         }
329
-        return $number . " B";
329
+        return $number." B";
330 330
     }
331 331
 
332 332
     /**
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         $caExpiryTrashhold = \config\ConfAssistant::CERT_WARNINGS['expiry_warning'];
382 382
         $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
383 383
         if (is_bool($rawResult)) { // we didn't actually get a CA!
384
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
384
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
385 385
             \core\common\Entity::outOfThePotatoes();
386 386
             return $retval;
387 387
         }
@@ -397,8 +397,8 @@  discard block
 block discarded – undo
397 397
 
398 398
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
399 399
         $details['name'] = preg_replace('/\//', "", $details['name']);
400
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
401
-        $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
400
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
401
+        $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
402 402
         $innerbgColor = "#0000ff";
403 403
         $leftBorderColor = "#00ff00";
404 404
         $message = "";
@@ -406,35 +406,35 @@  discard block
 block discarded – undo
406 406
             $leftBorderColor = "red";
407 407
             $message = _("This is a <strong>SERVER</strong> certificate!");
408 408
             if (\config\ConfAssistant::CERT_GUIDELINES !== '') {
409
-                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>";
409
+                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>";
410 410
             }
411 411
             $message .= "<br/>";
412
-            $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . $message . $details['name'] . "</div>";
412
+            $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>".$message.$details['name']."</div>";
413 413
             \core\common\Entity::outOfThePotatoes();
414 414
             return $retval;
415 415
         }
416 416
         $now = time();
417 417
         if ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_critical'] > $details['full_details']['validTo_time_t']) {
418 418
             $leftBorderColor = "red";
419
-            $message = _("Certificate expired!") . "<br>";
420
-        } elseif($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning']  > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) {
419
+            $message = _("Certificate expired!")."<br>";
420
+        } elseif ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) {
421 421
             if ($leftBorderColor == "#00ff00") {
422 422
                 $leftBorderColor = "yellow";
423 423
             }
424
-            $message = _("Certificate close to expiry!") . "<br/>";            
424
+            $message = _("Certificate close to expiry!")."<br/>";            
425 425
         }
426 426
    
427 427
         if ($details['root'] == 1 && $details['basicconstraints_set'] == 0) {
428 428
             if ($leftBorderColor == "#00ff00") {
429 429
                 $leftBorderColor = "yellow";
430 430
             }
431
-            $message .= "<div style='max-width: 25em'><strong>" . _("Improper root certificate, required critical CA extension missing, will not reliably install!") . "</strong>";
431
+            $message .= "<div style='max-width: 25em'><strong>"._("Improper root certificate, required critical CA extension missing, will not reliably install!")."</strong>";
432 432
             if (\config\ConfAssistant::CERT_GUIDELINES !== '') {
433
-                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>";
433
+                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>";
434 434
             }
435 435
             $message .= "</div><br/>";
436 436
         }
437
-        $retval =  "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $message . $details['name'] . "<br>" . $this->displayName('eap:ca_vailduntil') . " " . gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t']) . " UTC</div>";
437
+        $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$message.$details['name']."<br>".$this->displayName('eap:ca_vailduntil')." ".gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t'])." UTC</div>";
438 438
         \core\common\Entity::outOfThePotatoes();
439 439
         return $retval;
440 440
     }
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
      */
448 448
     public function previewImageinHTML($imageReference) {
449 449
         \core\common\Entity::intoThePotatoes();
450
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
450
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
451 451
         \core\common\Entity::outOfThePotatoes();
452 452
         return $retval;
453 453
     }
@@ -464,13 +464,13 @@  discard block
 block discarded – undo
464 464
         $ref = $validator->databaseReference($fileReference);
465 465
         $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
466 466
         if (is_bool($fileBlob)) { // we didn't actually get a file!
467
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
467
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
468 468
             \core\common\Entity::outOfThePotatoes();
469 469
             return $retval;
470 470
         }
471 471
         $decodedFileBlob = base64_decode($fileBlob);
472 472
         $fileinfo = new \finfo();
473
-        $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>";
473
+        $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>";
474 474
         \core\common\Entity::outOfThePotatoes();
475 475
         return $retval;
476 476
     }
@@ -627,8 +627,8 @@  discard block
 block discarded – undo
627 627
             return "";
628 628
         }
629 629
 
630
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
631
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
630
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
631
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
632 632
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
633 633
             return "";
634 634
         }
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         imagecolorallocate($whiteimage, 255, 255, 255);
655 655
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
656 656
         $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize));
657
-        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize));
657
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize));
658 658
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
659 659
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
660 660
         ob_start();
@@ -704,9 +704,9 @@  discard block
 block discarded – undo
704 704
                 $message = "Your configuration appears to be fine.";
705 705
                 break;
706 706
             default:
707
-                throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
707
+                throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
708 708
         }
709
-        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
709
+        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
710 710
         foreach ($test->out as $testValue) {
711 711
             foreach ($testValue as $o) {
712 712
                 $out .= $this->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
core/Options.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,17 +159,17 @@
 block discarded – undo
159 159
         foreach (array_keys($this->typeDb) as $name) {
160 160
             if ($className === 0) {
161 161
                 $tempArray[] = $name;
162
-            } elseif (preg_match('/^' . $className . ':/', $name) > 0) {
162
+            } elseif (preg_match('/^'.$className.':/', $name) > 0) {
163 163
                 $tempArray[] = $name;
164 164
             }
165 165
         }
166 166
         $returnArray = $tempArray;
167 167
         // remove silverbullet-specific options if this deployment is not SB
168 168
         foreach ($tempArray as $key => $val) {
169
-            if (( \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] != 'LOCAL') && (preg_match('/^fed:silverbullet/', $val) > 0)) {
169
+            if ((\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] != 'LOCAL') && (preg_match('/^fed:silverbullet/', $val) > 0)) {
170 170
                 unset($returnArray[$key]);
171 171
             }
172
-            if (( \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] != 'LOCAL') && (preg_match('/^fed:minted_ca_file/', $val) > 0)) {
172
+            if ((\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] != 'LOCAL') && (preg_match('/^fed:minted_ca_file/', $val) > 0)) {
173 173
                 unset($returnArray[$key]);
174 174
             }
175 175
         }
Please login to merge, or discard this patch.