Passed
Push — release_2_1 ( 3be856...c918e0 )
by Tomasz
10:45
created
core/IdP.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -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();
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 ... ---\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
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier");
198 198
         // SELECT yields a resource, not a boolean
199 199
         while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) {
200
-            return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO"
200
+            return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO"
201 201
         }
202 202
         return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO;
203 203
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                 case AbstractProfile::PROFILETYPE_SILVERBULLET:
332 332
                     $theProfile = new ProfileSilverbullet($identifier, $this);
333 333
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
334
-                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
334
+                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
335 335
                     return $theProfile;
336 336
                 default:
337 337
                     throw new Exception("This type of profile is unknown and can not be added.");
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
     public function getExternalDBId()
475 475
     {
476 476
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
477
-            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED);
477
+            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED);
478 478
             // SELECT -> it's a resource, not a boolean
479 479
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) {
480 480
                 return FALSE;
@@ -540,16 +540,16 @@  discard block
 block discarded – undo
540 540
         }
541 541
         foreach ($baseline as $lang => $value) {
542 542
             if (!key_exists($lang, $newvalues)) {
543
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED";
543
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED";
544 544
             } else {
545 545
                 if ($value != $newvalues[$lang]) {
546
-                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'";
546
+                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'";
547 547
                 }
548 548
             }
549 549
         }
550 550
         foreach ($newvalues as $lang => $value) {
551 551
             if (!key_exists($lang, $baseline)) {
552
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'";
552
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'";
553 553
             }
554 554
         }
555 555
         return $retval;
Please login to merge, or discard this patch.