Passed
Push — release_2_1 ( 81e271...fc59fc )
by Tomasz
12:32
created
core/Federation.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             } else { // this device has stats, but doesn't exist in current config. We don't even know its display name, so display its raw representation
108 108
                 $displayName = sprintf(_("(discontinued) %s"), $queryResult->dev_id);
109 109
             }
110
-            if (! isset($dataArray[$inst_id])) {
110
+            if (!isset($dataArray[$inst_id])) {
111 111
                 $dataArray[$inst_id] = [];
112 112
             }            
113 113
             if ($detail === 'ORGANISATIONS') {       
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             }
116 116
             if ($detail === 'PROFILES') {
117 117
                 $profile_id = $queryResult->profile_id;
118
-                if (! isset($dataArray[$inst_id][$profile_id])) {
118
+                if (!isset($dataArray[$inst_id][$profile_id])) {
119 119
                     $dataArray[$inst_id][$profile_id] = [];
120 120
                 }
121 121
                 $dataArray[$inst_id][$profile_id][$displayName] = ["ADMIN" => $queryResult->dl_admin, "SILVERBULLET" => $queryResult->dl_sb, "USER" => $queryResult->dl_user];
@@ -159,20 +159,20 @@  discard block
 block discarded – undo
159 159
                     if ($device == "TOTAL") {
160 160
                         continue;
161 161
                     }
162
-                    $retstring .= "<tr><td>$device</td><td>" . $numbers['ADMIN'] . "</td><td>" . $numbers['SILVERBULLET'] . "</td><td>" . $numbers['USER'] . "</td></tr>";
162
+                    $retstring .= "<tr><td>$device</td><td>".$numbers['ADMIN']."</td><td>".$numbers['SILVERBULLET']."</td><td>".$numbers['USER']."</td></tr>";
163 163
                 }
164
-                $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>" . $data['TOTAL']['ADMIN'] . "</strong></td><td><strong>" . $data['TOTAL']['SILVERBULLET'] . "</strong></td><td><strong>" . $data['TOTAL']['USER'] . "</strong></td></tr>";
164
+                $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>".$data['TOTAL']['ADMIN']."</strong></td><td><strong>".$data['TOTAL']['SILVERBULLET']."</strong></td><td><strong>".$data['TOTAL']['USER']."</strong></td></tr>";
165 165
                 break;
166 166
             case "XML":
167 167
                 // the calls to date() operate on current date, so there is no chance for a FALSE to be returned. Silencing scrutinizer.
168
-                $retstring .= "<federation id='$this->tld' ts='" . /** @scrutinizer ignore-type */ date("Y-m-d") . "T" . /** @scrutinizer ignore-type */ date("H:i:s") . "'>\n";
168
+                $retstring .= "<federation id='$this->tld' ts='"./** @scrutinizer ignore-type */ date("Y-m-d")."T"./** @scrutinizer ignore-type */ date("H:i:s")."'>\n";
169 169
                 foreach ($data as $device => $numbers) {
170 170
                     if ($device == "TOTAL") {
171 171
                         continue;
172 172
                     }
173
-                    $retstring .= "  <device name='" . $device . "'>\n    <downloads group='admin'>" . $numbers['ADMIN'] . "</downloads>\n    <downloads group='managed_idp'>" . $numbers['SILVERBULLET'] . "</downloads>\n    <downloads group='user'>" . $numbers['USER'] . "</downloads>\n  </device>";
173
+                    $retstring .= "  <device name='".$device."'>\n    <downloads group='admin'>".$numbers['ADMIN']."</downloads>\n    <downloads group='managed_idp'>".$numbers['SILVERBULLET']."</downloads>\n    <downloads group='user'>".$numbers['USER']."</downloads>\n  </device>";
174 174
                 }
175
-                $retstring .= "<total>\n  <downloads group='admin'>" . $data['TOTAL']['ADMIN'] . "</downloads>\n  <downloads group='managed_idp'>" . $data['TOTAL']['SILVERBULLET'] . "</downloads>\n  <downloads group='user'>" . $data['TOTAL']['USER'] . "</downloads>\n</total>\n";
175
+                $retstring .= "<total>\n  <downloads group='admin'>".$data['TOTAL']['ADMIN']."</downloads>\n  <downloads group='managed_idp'>".$data['TOTAL']['SILVERBULLET']."</downloads>\n  <downloads group='user'>".$data['TOTAL']['USER']."</downloads>\n</total>\n";
176 176
                 $retstring .= "</federation>";
177 177
                 break;
178 178
             case "array":
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $identifier = $this->databaseHandle->lastID();
273 273
 
274 274
         if ($identifier == 0 || !$this->loggerInstance->writeAudit($ownerId, "NEW", "Organisation $identifier")) {
275
-            $text = "<p>Could not create a new " . common\Entity::$nomenclature_participant . "!</p>";
275
+            $text = "<p>Could not create a new ".common\Entity::$nomenclature_participant."!</p>";
276 276
             echo $text;
277 277
             throw new Exception($text);
278 278
         }
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
             return; // no update to fetch
417 417
         }
418 418
         $certDetails = openssl_x509_parse($entryInQuestion['CERT']);
419
-        $expiry = "20" . $certDetails['validTo'][0] . $certDetails['validTo'][1] . "-" . $certDetails['validTo'][2] . $certDetails['validTo'][3] . "-" . $certDetails['validTo'][4] . $certDetails['validTo'][5];
419
+        $expiry = "20".$certDetails['validTo'][0].$certDetails['validTo'][1]."-".$certDetails['validTo'][2].$certDetails['validTo'][3]."-".$certDetails['validTo'][4].$certDetails['validTo'][5];
420 420
         openssl_x509_export($entryInQuestion['CERT'], $pem);
421 421
         $updateQuery = "UPDATE federation_servercerts SET status = 'ISSUED', certificate = ?, expiry = ? WHERE ca_name = 'eduPKI' AND request_serial = ?";
422 422
         $this->databaseHandle->exec($updateQuery, "ssi", $pem, $expiry, $reqSerial);
Please login to merge, or discard this patch.