@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | return $this->counter; |
127 | 127 | } |
128 | 128 | |
129 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
129 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
130 | 130 | if ($cachedNumber !== FALSE) { |
131 | 131 | $numberData = unserialize($cachedNumber); |
132 | 132 | $now = new \DateTime(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } else { // data in cache is too old or doesn't exist. We really need to ask the database |
140 | 140 | $list = $this->listAllServiceProviders(); |
141 | 141 | $this->counter = count($list); |
142 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
142 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
143 | 143 | return $this->counter; |
144 | 144 | } |
145 | 145 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $returnarray = []; |
189 | 189 | $query = "SELECT id_institution AS id, country, inst_realm as realmlist, name AS collapsed_name, contact AS collapsed_contact, type FROM view_active_institution WHERE country = ?"; |
190 | 190 | if ($eduroamDbType !== NULL) { |
191 | - $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')"; |
|
191 | + $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')"; |
|
192 | 192 | } |
193 | 193 | $externals = $this->db->exec($query, "s", $tld); |
194 | 194 | // was a SELECT query, so a resource and not a boolean |
@@ -284,19 +284,19 @@ discard block |
||
284 | 284 | * |
285 | 285 | * @return array |
286 | 286 | */ |
287 | - public function listExternalTlsServersInstitution($tld, $include_not_ready=FALSE) { |
|
287 | + public function listExternalTlsServersInstitution($tld, $include_not_ready = FALSE) { |
|
288 | 288 | $retval = []; |
289 | 289 | // this includes servers of type "staging", which is fine |
290 | 290 | $query = "SELECT ROid, instid, type, inst_name, servers, contacts, ts FROM eduroamv2.view_tls_inst WHERE country = ?"; |
291 | 291 | if (!$include_not_ready) { |
292 | - $query = $query . " AND servers IS NOT NULL AND contacts IS NOT NULL"; |
|
292 | + $query = $query." AND servers IS NOT NULL AND contacts IS NOT NULL"; |
|
293 | 293 | } |
294 | 294 | $instServerTransaction = $this->db->exec($query, "s", $tld); |
295 | 295 | while ($instServerResponses = mysqli_fetch_object(/** @scrutinizer ignore-type */ $instServerTransaction)) { |
296 | 296 | $contactList = $this::dissectCollapsedContacts($instServerResponses->contacts); |
297 | 297 | $names = $this->splitNames($instServerResponses->inst_name); |
298 | 298 | $thelanguage = $names[$this->languageInstance->getLang()] ?? $names["en"] ?? array_shift($names); |
299 | - $retval[$instServerResponses->ROid . "-". $instServerResponses->instid] = [ |
|
299 | + $retval[$instServerResponses->ROid."-".$instServerResponses->instid] = [ |
|
300 | 300 | "names" => $names, |
301 | 301 | "name" => $thelanguage, |
302 | 302 | "type" => array_search($instServerResponses->type, self::TYPE_MAPPING), |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // for now (no OpenRoaming client certs available) only run server-side tests |
333 | 333 | foreach ($listOfIPs as $oneIP) { |
334 | 334 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
335 | - if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
335 | + if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
336 | 336 | $allHostsOkay = FALSE; |
337 | 337 | } else { |
338 | 338 | $oneHostOkay = TRUE; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | // which is different from the outer username we put into installers |
487 | 487 | return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm; |
488 | 488 | } |
489 | - if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL ) { |
|
489 | + if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL) { |
|
490 | 490 | // no special check username, but there is an anon outer ID for |
491 | 491 | // installers - so let's use that one |
492 | 492 | return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm; |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | } |
643 | 643 | |
644 | 644 | $monthlyList = []; |
645 | - $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier); |
|
645 | + $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier); |
|
646 | 646 | while ($statsQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $monthly)) { |
647 | 647 | $monthlyList[$statsQuery->device_id] = $statsQuery->downloads_user; |
648 | 648 | } |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | } |
655 | 655 | |
656 | 656 | \core\common\Entity::intoThePotatoes(); |
657 | - ksort($finalarray, SORT_STRING|SORT_FLAG_CASE); |
|
657 | + ksort($finalarray, SORT_STRING | SORT_FLAG_CASE); |
|
658 | 658 | \core\common\Entity::outOfThePotatoes(); |
659 | 659 | return $finalarray; |
660 | 660 | } |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | $profileStatus = self::CERT_STATUS_NONE; |
965 | 965 | foreach ($rows as $row) { |
966 | 966 | $encodedCert = $row[0]; |
967 | - $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time(); |
|
967 | + $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time(); |
|
968 | 968 | if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) { |
969 | 969 | $certStatus = self::CERT_STATUS_ERROR; |
970 | 970 | } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) { |