|  | @@ -115,12 +115,12 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 115 | 115 |          $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname')); | 
                                                                                                            
                                                            | 116 | 116 |          $eligibility = $this->eligibility($instQuery->type); | 
                                                                                                            
                                                            | 117 | 117 |          if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) { | 
                                                                                                            
                                                            | 118 |  | -            $eligType = IdP::TYPE_IDPSP . ""; | 
                                                                                                            
                                                            |  | 118 | +            $eligType = IdP::TYPE_IDPSP.""; | 
                                                                                                            
                                                            | 119 | 119 |              $this->type = $eligType; | 
                                                                                                            
                                                            | 120 | 120 |          } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) { | 
                                                                                                            
                                                            | 121 |  | -            $eligType = IdP::TYPE_IDP . ""; | 
                                                                                                            
                                                            |  | 121 | +            $eligType = IdP::TYPE_IDP.""; | 
                                                                                                            
                                                            | 122 | 122 |          } else { | 
                                                                                                            
                                                            | 123 |  | -            $eligType = IdP::TYPE_SP . ""; | 
                                                                                                            
                                                            |  | 123 | +            $eligType = IdP::TYPE_SP.""; | 
                                                                                                            
                                                            | 124 | 124 |          } | 
                                                                                                            
                                                            | 125 | 125 |          $this->type = $eligType; | 
                                                                                                            
                                                            | 126 | 126 |          $this->loggerInstance->debug(4, "--- END Constructing new IdP object $instId ... ---\n"); | 
                                                                                                                                                        
                                                        |  | @@ -134,7 +134,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 134 | 134 |       */ | 
                                                                                                            
                                                            | 135 | 135 |      public function listProfiles(bool $activeOnly = FALSE) | 
                                                                                                            
                                                            | 136 | 136 |      { | 
                                                                                                            
                                                            | 137 |  | -        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : ""); | 
                                                                                                            
                                                            |  | 137 | +        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : ""); | 
                                                                                                            
                                                            | 138 | 138 |          $allProfiles = $this->databaseHandle->exec($query); | 
                                                                                                            
                                                            | 139 | 139 |          $returnarray = []; | 
                                                                                                            
                                                            | 140 | 140 |          // SELECT -> resource, not boolean | 
                                                                                                                                                        
                                                        |  | @@ -144,7 +144,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 144 | 144 |              $returnarray[] = $oneProfile; | 
                                                                                                            
                                                            | 145 | 145 |          } | 
                                                                                                            
                                                            | 146 | 146 |   | 
                                                                                                            
                                                            | 147 |  | -        $this->loggerInstance->debug(4, "listProfiles: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); | 
                                                                                                            
                                                            |  | 147 | +        $this->loggerInstance->debug(4, "listProfiles: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); | 
                                                                                                            
                                                            | 148 | 148 |          return $returnarray; | 
                                                                                                            
                                                            | 149 | 149 |      } | 
                                                                                                            
                                                            | 150 | 150 |   | 
                                                                                                                                                        
                                                        |  | @@ -156,7 +156,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 156 | 156 |       */ | 
                                                                                                            
                                                            | 157 | 157 |      public function listDeployments(bool $activeOnly = FALSE) | 
                                                                                                            
                                                            | 158 | 158 |      { | 
                                                                                                            
                                                            | 159 |  | -        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : ""); | 
                                                                                                            
                                                            |  | 159 | +        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : ""); | 
                                                                                                            
                                                            | 160 | 160 |          $allDeployments = $this->databaseHandle->exec($query); | 
                                                                                                            
                                                            | 161 | 161 |          $returnarray = []; | 
                                                                                                            
                                                            | 162 | 162 |          // SELECT -> resource, not boolean | 
                                                                                                                                                        
                                                        |  | @@ -164,7 +164,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 164 | 164 |              $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id); | 
                                                                                                            
                                                            | 165 | 165 |          } | 
                                                                                                            
                                                            | 166 | 166 |   | 
                                                                                                            
                                                            | 167 |  | -        $this->loggerInstance->debug(4, "listDeployments: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); | 
                                                                                                            
                                                            |  | 167 | +        $this->loggerInstance->debug(4, "listDeployments: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); | 
                                                                                                            
                                                            | 168 | 168 |          return $returnarray; | 
                                                                                                            
                                                            | 169 | 169 |      } | 
                                                                                                            
                                                            | 170 | 170 |   | 
                                                                                                                                                        
                                                        |  | @@ -190,7 +190,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 190 | 190 |          $redirectProfileIds = []; | 
                                                                                                            
                                                            | 191 | 191 |          $allProfileLevels = $this->databaseHandle->exec("SELECT profile_id, sufficient_config + showtime AS maxlevel FROM profile WHERE inst_id = $this->identifier ORDER BY maxlevel DESC"); | 
                                                                                                            
                                                            | 192 | 192 |          // SELECT yields a resource, not a boolean | 
                                                                                                            
                                                            | 193 |  | -        if ($allProfileLevels->num_rows == 0 ) { | 
                                                                                                            
                                                            |  | 193 | +        if ($allProfileLevels->num_rows == 0) { | 
                                                                                                            
                                                            | 194 | 194 |              return self::PROFILES_INCOMPLETE; | 
                                                                                                            
                                                            | 195 | 195 |          } | 
                                                                                                            
                                                            | 196 | 196 |          $allProfilesArray = $allProfileLevels->fetch_all(MYSQLI_ASSOC); | 
                                                                                                                                                        
                                                        |  | @@ -218,7 +218,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 218 | 218 |          $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier"); | 
                                                                                                            
                                                            | 219 | 219 |          // SELECT yields a resource, not a boolean | 
                                                                                                            
                                                            | 220 | 220 |          while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) { | 
                                                                                                            
                                                            | 221 |  | -            return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO" | 
                                                                                                            
                                                            |  | 221 | +            return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO" | 
                                                                                                            
                                                            | 222 | 222 |          } | 
                                                                                                            
                                                            | 223 | 223 |          return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO; | 
                                                                                                            
                                                            | 224 | 224 |      } | 
                                                                                                                                                        
                                                        |  | @@ -349,7 +349,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 349 | 349 |                  case AbstractProfile::PROFILETYPE_SILVERBULLET: | 
                                                                                                            
                                                            | 350 | 350 |                      $theProfile = new ProfileSilverbullet($identifier, $this); | 
                                                                                                            
                                                            | 351 | 351 |                      $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); | 
                                                                                                            
                                                            | 352 |  | -                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); | 
                                                                                                            
                                                            |  | 352 | +                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); | 
                                                                                                            
                                                            | 353 | 353 |                      return $theProfile; | 
                                                                                                            
                                                            | 354 | 354 |                  default: | 
                                                                                                            
                                                            | 355 | 355 |                      throw new Exception("This type of profile is unknown and can not be added."); | 
                                                                                                                                                        
                                                        |  | @@ -492,7 +492,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 492 | 492 |      public function getExternalDBId() | 
                                                                                                            
                                                            | 493 | 493 |      { | 
                                                                                                            
                                                            | 494 | 494 |          if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED | 
                                                                                                            
                                                            | 495 |  | -            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED); | 
                                                                                                            
                                                            |  | 495 | +            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED); | 
                                                                                                            
                                                            | 496 | 496 |              // SELECT -> it's a resource, not a boolean | 
                                                                                                            
                                                            | 497 | 497 |              if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) { | 
                                                                                                            
                                                            | 498 | 498 |                  return FALSE; | 
                                                                                                                                                        
                                                        |  | @@ -558,16 +558,16 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 558 | 558 |          } | 
                                                                                                            
                                                            | 559 | 559 |          foreach ($baseline as $lang => $value) { | 
                                                                                                            
                                                            | 560 | 560 |              if (!key_exists($lang, $newvalues)) { | 
                                                                                                            
                                                            | 561 |  | -                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED"; | 
                                                                                                            
                                                            |  | 561 | +                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED"; | 
                                                                                                            
                                                            | 562 | 562 |              } else { | 
                                                                                                            
                                                            | 563 | 563 |                  if ($value != $newvalues[$lang]) { | 
                                                                                                            
                                                            | 564 |  | -                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'"; | 
                                                                                                            
                                                            |  | 564 | +                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'"; | 
                                                                                                            
                                                            | 565 | 565 |                  } | 
                                                                                                            
                                                            | 566 | 566 |              } | 
                                                                                                            
                                                            | 567 | 567 |          } | 
                                                                                                            
                                                            | 568 | 568 |          foreach ($newvalues as $lang => $value) { | 
                                                                                                            
                                                            | 569 | 569 |              if (!key_exists($lang, $baseline)) { | 
                                                                                                            
                                                            | 570 |  | -                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'"; | 
                                                                                                            
                                                            |  | 570 | +                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'"; | 
                                                                                                            
                                                            | 571 | 571 |              } | 
                                                                                                            
                                                            | 572 | 572 |          } | 
                                                                                                            
                                                            | 573 | 573 |          return $retval; |