Passed
Push — release_2_0 ( 15c6ac...a1bf1f )
by Stefan
08:45
created
core/common/OutsideComm.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX.");
118 118
             return OutsideComm::MAILDOMAIN_NO_MX;
119 119
         }
120
-        $loggerInstance->debug(5, "Domain: $domain MX: " . print_r($mx, TRUE));
120
+        $loggerInstance->debug(5, "Domain: $domain MX: ".print_r($mx, TRUE));
121 121
         // create a pool of A and AAAA records for all the MXes
122 122
         $ipAddrs = [];
123 123
         foreach ($mx as $onemx) {
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
                 $ipAddrs[] = $oneipv4['ip'];
128 128
             }
129 129
             foreach ($v6list as $oneipv6) {
130
-                $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]";
130
+                $ipAddrs[] = "[".$oneipv6['ipv6']."]";
131 131
             }
132 132
         }
133 133
         if (count($ipAddrs) == 0) {
134 134
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts.");
135 135
             return OutsideComm::MAILDOMAIN_NO_HOST;
136 136
         }
137
-        $loggerInstance->debug(5, "Domain: $domain Addrs: " . print_r($ipAddrs, TRUE));
137
+        $loggerInstance->debug(5, "Domain: $domain Addrs: ".print_r($ipAddrs, TRUE));
138 138
         // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. 
139 139
         // If at least one does not support STARTTLS or one of the hosts doesn't connect
140 140
         // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         switch (CONFIG_CONFASSISTANT['SMSSETTINGS']['provider']) {
187 187
             case 'Nexmo':
188 188
                 // taken from https://docs.nexmo.com/messaging/sms-api
189
-                $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
189
+                $url = 'https://rest.nexmo.com/sms/json?'.http_build_query(
190 190
                                 [
191 191
                                     'api_key' => CONFIG_CONFASSISTANT['SMSSETTINGS']['username'],
192 192
                                     'api_secret' => CONFIG_CONFASSISTANT['SMSSETTINGS']['password'],
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
                     $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!');
209 209
                     return OutsideComm::SMS_NOTSENT;
210 210
                 }
211
-                $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.');
211
+                $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.');
212 212
 
213 213
                 $totalFailures = 0;
214 214
                 foreach ($decoded_response['messages'] as $message) {
215 215
                     if ($message['status'] == 0) {
216
-                        $loggerInstance->debug(2, $message['message-id'] . ": Success");
216
+                        $loggerInstance->debug(2, $message['message-id'].": Success");
217 217
                     } else {
218
-                        $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")");
218
+                        $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")");
219 219
                         $totalFailures++;
220 220
                     }
221 221
                 }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             $proto = "https://";
268 268
         }
269 269
         // then, send out the mail
270
-        $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n";
270
+        $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n";
271 271
         // default means we don't have a Reply-To.
272 272
         $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address."));
273 273
 
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
             // see if we are supposed to add a custom message
276 276
             $customtext = $federation->getAttributes('fed:custominvite');
277 277
             if (count($customtext) > 0) {
278
-                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" .
279
-                        wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n";
278
+                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------".
279
+                        wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n";
280 280
             }
281 281
             // and add Reply-To already now
282 282
             foreach ($federation->listFederationAdmins() as $fedadmin_id) {
@@ -291,19 +291,19 @@  discard block
 block discarded – undo
291 291
             }
292 292
         }
293 293
 
294
-        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_inst), 72) . "\n\n" .
295
-                $proto . $_SERVER['SERVER_NAME'] . CONFIG['PATHS']['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" .
296
-                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), CONFIG['APPEARANCE']['productname']), 72) . "\n\n" .
297
-                $proto . $_SERVER['SERVER_NAME'] . CONFIG['PATHS']['cat_base_url'] . "admin/\n\n" .
298
-                _("and enter the invitation token") . "\n\n" .
299
-                $newtoken . "\n\n$replyToMessage\n\n" .
300
-                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "\n\n" .
301
-                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), CONFIG['APPEARANCE']['productname']), 72) . "\n\n" .
294
+        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_inst), 72)."\n\n".
295
+                $proto.$_SERVER['SERVER_NAME'].CONFIG['PATHS']['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n".
296
+                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), CONFIG['APPEARANCE']['productname']), 72)."\n\n".
297
+                $proto.$_SERVER['SERVER_NAME'].CONFIG['PATHS']['cat_base_url']."admin/\n\n".
298
+                _("and enter the invitation token")."\n\n".
299
+                $newtoken."\n\n$replyToMessage\n\n".
300
+                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72)."\n\n".
301
+                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), CONFIG['APPEARANCE']['productname']), 72)."\n\n".
302 302
                 sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
303 303
 
304 304
 
305 305
 // who to whom?
306
-        $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Invitation System";
306
+        $mail->FromName = CONFIG['APPEARANCE']['productname']." Invitation System";
307 307
 
308 308
         if (isset(CONFIG['APPEARANCE']['invitation-bcc-mail']) && CONFIG['APPEARANCE']['invitation-bcc-mail'] !== NULL) {
309 309
             $mail->addBCC(CONFIG['APPEARANCE']['invitation-bcc-mail']);
Please login to merge, or discard this patch.
core/common/EAP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,8 +165,8 @@
 block discarded – undo
165 165
             $key = array_search($eapType, EAP::EAPTYPES_CONVERSION);
166 166
             if ($key !== FALSE) {
167 167
                 // add a type cast to int to make Scrutinizer realise that the key found is always an integer
168
-                $this->intRep = (int)$key; // array index is always an integer
169
-                $this->arrayRep = EAP::EAPTYPES_CONVERSION[(int)$key];
168
+                $this->intRep = (int) $key; // array index is always an integer
169
+                $this->arrayRep = EAP::EAPTYPES_CONVERSION[(int) $key];
170 170
                 return;
171 171
             }
172 172
         }
Please login to merge, or discard this patch.
core/common/Language.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  */
31 31
 namespace core\common;
32 32
 
33
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
33
+require_once dirname(dirname(__DIR__))."/config/_config.php";
34 34
 
35 35
 /**
36 36
  * This class maintains state of the selected language and can set the language.
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
         $loggerInstance = new \core\common\Logging();
73 73
         $olddomain = textdomain(NULL);
74 74
         $loggerInstance->debug(4, "set_locale($domain)\n");
75
-        $loggerInstance->debug(4, ROOT . "\n");
75
+        $loggerInstance->debug(4, ROOT."\n");
76 76
         textdomain($domain);
77
-        bindtextdomain($domain, ROOT . "/translation/");
77
+        bindtextdomain($domain, ROOT."/translation/");
78 78
         return $olddomain;
79 79
     }
80 80
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $langConverted[] = $hardSetLang;
97 97
         }
98 98
         if (!empty($_REQUEST['lang'])) {
99
-            $recoverLang = filter_input(INPUT_GET,'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING);
99
+            $recoverLang = filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING);
100 100
             $langConverted[] = $recoverLang;
101 101
         }
102 102
         CAT_session_start();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $langConverted[] = $_SESSION['language'];
105 105
         }
106 106
         if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
107
-            $langs = explode(",", filter_input(INPUT_SERVER,"HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
107
+            $langs = explode(",", filter_input(INPUT_SERVER, "HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
108 108
             foreach ($langs as $lang) {
109 109
                 $result = [];
110 110
                 preg_match("/(.*);+.*/", $lang, $result);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
             // check if this language is supported by the CAT config
126 126
             foreach (CONFIG['LANGUAGES'] as $language => $value) {
127
-                if (preg_match("/^" . $language . ".*/", $tryLang)) {
127
+                if (preg_match("/^".$language.".*/", $tryLang)) {
128 128
                     $localeTmp = $value['locale'];
129 129
                     $langIndex = $language; // ???
130 130
                     break;
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 }
140 140
             }
141 141
         }
142
-        putenv("LC_ALL=" . $theLocale);
142
+        putenv("LC_ALL=".$theLocale);
143 143
         $_SESSION['language'] = $langIndex;
144 144
         $loggerInstance = new \core\common\Logging();
145 145
         $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n");
Please login to merge, or discard this patch.
core/UserNetAPI.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $returnArray = [];
64 64
         $returnArray['status'] = $status;
65 65
         $returnArray['data'] = $data;
66
-        $returnArray['tou'] = "Please consult Terms of Use at: //" . $host . \core\CAT::getRootUrlPath() . "/tou.php";
66
+        $returnArray['tou'] = "Please consult Terms of Use at: //".$host.\core\CAT::getRootUrlPath()."/tou.php";
67 67
         if (!empty($otherData)) {
68 68
             $returnArray['otherdata'] = $otherData;
69 69
         }
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
      */
270 270
     public function sendLogo($identifier, $type, $width = 0, $height = 0) {
271 271
         $logo = $this->getLogo($identifier, $type, $width, $height);
272
-        $blob = $logo === NULL ? file_get_contents(ROOT . '/web/resources/images/empty.png') : $logo['blob'];
273
-        header("Content-type: " . $logo['filetype']);
272
+        $blob = $logo === NULL ? file_get_contents(ROOT.'/web/resources/images/empty.png') : $logo['blob'];
273
+        header("Content-type: ".$logo['filetype']);
274 274
         header("Cache-Control:max-age=36000, must-revalidate");
275 275
         header($logo['expires']);
276 276
         echo $blob;
Please login to merge, or discard this patch.
core/ProfileSilverbullet.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 // realm is automatically calculated, then stored in DB
91 91
 
92
-        $this->realm = "opaquehash@$myInst->identifier-$this->identifier." . strtolower($myInst->federation) . CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'];
92
+        $this->realm = "opaquehash@$myInst->identifier-$this->identifier.".strtolower($myInst->federation).CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'];
93 93
         $localValueIfAny = "";
94 94
 
95 95
 // but there's some common internal attributes populated directly
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
 
107 107
 // and we need to populate eap:server_name and eap:ca_file with the NRO-specific EAP information
108 108
         $silverbulletAttributes = [
109
-            "eap:server_name" => "auth." . strtolower($myFed->tld) . CONFIG_CONFASSISTANT['SILVERBULLET']['server_suffix'],
109
+            "eap:server_name" => "auth.".strtolower($myFed->tld).CONFIG_CONFASSISTANT['SILVERBULLET']['server_suffix'],
110 110
         ];
111 111
         $x509 = new \core\common\X509();
112
-        $caHandle = fopen(dirname(__FILE__) . "/../config/SilverbulletServerCerts/" . strtoupper($myFed->tld) . "/root.pem", "r");
112
+        $caHandle = fopen(dirname(__FILE__)."/../config/SilverbulletServerCerts/".strtoupper($myFed->tld)."/root.pem", "r");
113 113
         if ($caHandle !== FALSE) {
114 114
             $cAFile = fread($caHandle, 16000000);
115 115
             $silverbulletAttributes["eap:ca_file"] = $x509->der2pem(($x509->pem2der($cAFile)));
@@ -129,26 +129,26 @@  discard block
 block discarded – undo
129 129
         $this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n");
130 130
 
131 131
         $this->termsAndConditions = "<h2>Product Definition</h2>
132
-        <p>" . \core\ProfileSilverbullet::PRODUCTNAME . " outsources the technical setup of " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " functions to the " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " Operations Team. The system includes</p>
132
+        <p>" . \core\ProfileSilverbullet::PRODUCTNAME." outsources the technical setup of ".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']." ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']." functions to the ".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']." Operations Team. The system includes</p>
133 133
             <ul>
134 134
                 <li>a web-based user management interface where user accounts and access credentials can be created and revoked (there is a limit to the number of active users)</li>
135 135
                 <li>a technical infrastructure ('CA') which issues and revokes credentials</li>
136
-                <li>a technical infrastructure ('RADIUS') which verifies access credentials and subsequently grants access to " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . "</li>           
136
+                <li>a technical infrastructure ('RADIUS') which verifies access credentials and subsequently grants access to " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']."</li>           
137 137
             </ul>
138 138
         <h2>User Account Liability</h2>
139
-        <p>As an " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " administrator using this system, you are authorized to create user accounts according to your local " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " policy. You are fully responsible for the accounts you issue and are the data controller for all user information you deposit in this system; the system is a data processor.</p>";
139
+        <p>As an " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']." ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']." administrator using this system, you are authorized to create user accounts according to your local ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']." policy. You are fully responsible for the accounts you issue and are the data controller for all user information you deposit in this system; the system is a data processor.</p>";
140 140
         $this->termsAndConditions .= "<p>Your responsibilities include that you</p>
141 141
         <ul>
142
-            <li>only issue accounts to members of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . ", as defined by your local policy.</li>
142
+            <li>only issue accounts to members of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'].", as defined by your local policy.</li>
143 143
             <li>must make sure that all accounts that you issue can be linked by you to actual human end users</li>
144
-            <li>have to immediately revoke accounts of users when they leave or otherwise stop being a member of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . "</li>
144
+            <li>have to immediately revoke accounts of users when they leave or otherwise stop being a member of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']."</li>
145 145
             <li>will act upon notifications about possible network abuse by your users and will appropriately sanction them</li>
146 146
         </ul>
147 147
         <p>";
148
-        $this->termsAndConditions .= "Failure to comply with these requirements may make your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " act on your behalf, which you authorise, and will ultimately lead to the deletion of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " (and all the users you create inside) in this system.";
148
+        $this->termsAndConditions .= "Failure to comply with these requirements may make your ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." act on your behalf, which you authorise, and will ultimately lead to the deletion of your ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']." (and all the users you create inside) in this system.";
149 149
         $this->termsAndConditions .= "</p>
150 150
         <h2>Privacy</h2>
151
-        <p>With " . \core\ProfileSilverbullet::PRODUCTNAME . ", we are necessarily storing personally identifiable information about the end users you create. While the actual human is only identifiable with your help, we consider all the user data as relevant in terms of privacy jurisdiction. Please note that</p>
151
+        <p>With " . \core\ProfileSilverbullet::PRODUCTNAME.", we are necessarily storing personally identifiable information about the end users you create. While the actual human is only identifiable with your help, we consider all the user data as relevant in terms of privacy jurisdiction. Please note that</p>
152 152
         <ul>
153 153
             <li>You are the only one who needs to be able to make a link to the human behind the usernames you create. The usernames you create in the system have to be rich enough to allow you to make that identification step. Also consider situations when you are unavailable or leave the organisation and someone else needs to perform the matching to an individual.</li>
154 154
             <li>The identifiers we create in the credentials are not linked to the usernames you add to the system; they are randomly generated pseudonyms.</li>
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType) {
131 131
         if (CONFIG['PATHS']['logdir']) {
132
-            $file = fopen(CONFIG['PATHS']['logdir'] . "/download_details.log", "a");
132
+            $file = fopen(CONFIG['PATHS']['logdir']."/download_details.log", "a");
133 133
             if ($file === FALSE) {
134 134
                 throw new Exception("Unable to open file for append: $file");
135 135
             }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $eaptype = new common\EAP($eapQuery->eap_method_id);
156 156
             $eapTypeArray[] = $eaptype;
157 157
         }
158
-        $this->loggerInstance->debug(4, "This profile supports the following EAP types:\n" . print_r($eapTypeArray, true));
158
+        $this->loggerInstance->debug(4, "This profile supports the following EAP types:\n".print_r($eapTypeArray, true));
159 159
         return $eapTypeArray;
160 160
     }
161 161
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         foreach ($new as $attrib) {
211 211
             $ignore = "";
212 212
             foreach ($existing as $approvedAttrib) {
213
-                if (($attrib["name"] == $approvedAttrib["name"] && $approvedAttrib["level"] != $newlevel) && ($approvedAttrib["name"] != "device-specific:redirect") ){
213
+                if (($attrib["name"] == $approvedAttrib["name"] && $approvedAttrib["level"] != $newlevel) && ($approvedAttrib["name"] != "device-specific:redirect")) {
214 214
                     $ignore = "YES";
215 215
                 }
216 216
             }
@@ -253,16 +253,16 @@  discard block
 block discarded – undo
253 253
         if (count($this->getAttributes("internal:checkuser_outer")) > 0) {
254 254
             // we are supposed to use a specific outer username for checks, 
255 255
             // which is different from the outer username we put into installers
256
-            return $this->getAttributes("internal:checkuser_value")[0]['value'] . "@" . $realm;
256
+            return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm;
257 257
         }
258 258
         if (count($this->getAttributes("internal:use_anon_outer")) > 0) {
259 259
             // no special check username, but there is an anon outer ID for
260 260
             // installers - so let's use that one
261
-            return $this->getAttributes("internal:anon_local_value")[0]['value'] . "@" . $realm;
261
+            return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm;
262 262
         }
263 263
         // okay, no guidance on outer IDs at all - but we need *something* to
264 264
         // test with for the RealmChecks. So:
265
-        return "@" . $realm;
265
+        return "@".$realm;
266 266
     }
267 267
 
268 268
     /**
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      * @param boolean $shallwe TRUE to enable outer identities (needs valid $realm), FALSE to disable
343 343
      * @return void
344 344
      */
345
-    abstract public function setAnonymousIDSupport($shallwe) ;
345
+    abstract public function setAnonymousIDSupport($shallwe);
346 346
     
347 347
     /**
348 348
      * Log a new download for our stats
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
      */
697 697
     public function prepShowtime() {
698 698
         $properConfig = $this->readyForShowtime();
699
-        $this->databaseHandle->exec("UPDATE profile SET sufficient_config = " . ($properConfig ? "TRUE" : "FALSE") . " WHERE profile_id = " . $this->identifier);
699
+        $this->databaseHandle->exec("UPDATE profile SET sufficient_config = ".($properConfig ? "TRUE" : "FALSE")." WHERE profile_id = ".$this->identifier);
700 700
 
701 701
         $attribs = $this->getCollapsedAttributes();
702 702
         // if not enough info to go live, set FALSE
Please login to merge, or discard this patch.
core/Federation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -126,20 +126,20 @@  discard block
 block discarded – undo
126 126
                     if ($device == "TOTAL") {
127 127
                         continue;
128 128
                     }
129
-                    $retstring .= "<tr><td>$device</td><td>" . $numbers['ADMIN'] . "</td><td>" . $numbers['SILVERBULLET'] . "</td><td>" . $numbers['USER'] . "</td></tr>";
129
+                    $retstring .= "<tr><td>$device</td><td>".$numbers['ADMIN']."</td><td>".$numbers['SILVERBULLET']."</td><td>".$numbers['USER']."</td></tr>";
130 130
                 }
131
-                $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>";
131
+                $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>";
132 132
                 break;
133 133
             case "XML":
134 134
                 // the calls to date() operate on current date, so there is no chance for a FALSE to be returned. Silencing scrutinizer.
135
-                $retstring .= "<federation id='$this->tld' ts='" . /** @scrutinizer ignore-type */ date("Y-m-d") . "T" . /** @scrutinizer ignore-type */ date("H:i:s") . "'>\n";
135
+                $retstring .= "<federation id='$this->tld' ts='"./** @scrutinizer ignore-type */ date("Y-m-d")."T"./** @scrutinizer ignore-type */ date("H:i:s")."'>\n";
136 136
                 foreach ($data as $device => $numbers) {
137 137
                     if ($device == "TOTAL") {
138 138
                         continue;
139 139
                     }
140
-                    $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>";
140
+                    $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>";
141 141
                 }
142
-                $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";
142
+                $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";
143 143
                 $retstring .= "</federation>";
144 144
                 break;
145 145
             case "array":
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $identifier = $this->databaseHandle->lastID();
222 222
 
223 223
         if ($identifier == 0 || !$this->loggerInstance->writeAudit($ownerId, "NEW", "IdP $identifier")) {
224
-            $text = "<p>Could not create a new " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_inst'] . "!</p>";
224
+            $text = "<p>Could not create a new ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_inst']."!</p>";
225 225
             echo $text;
226 226
             throw new Exception($text);
227 227
         }
Please login to merge, or discard this patch.
core/IdPlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         foreach ($idps as $idp) {
38 38
             $idpTitle[$idp['entityID']] = $idp['title'];
39 39
             $d = self::getIdpDistance($idp, $here);
40
-            $resultSet[$idp['entityID']] = $d . " " . $idp['title'];
40
+            $resultSet[$idp['entityID']] = $d." ".$idp['title'];
41 41
         }
42 42
         asort($resultSet);
43 43
         $outarray = [];
Please login to merge, or discard this patch.
core/SilverbulletInvitation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $this->activationsTotal = $invitationRow->quantity;
150 150
         $certificatesResult = $this->databaseHandle->exec("SELECT `serial_number`, `ca_type` FROM `silverbullet_certificate` WHERE `silverbullet_invitation_id` = ? ORDER BY `revocation_status`, `expiry` DESC", "i", $this->identifier);
151 151
         $certificatesNumber = ($certificatesResult ? $certificatesResult->num_rows : 0);
152
-        $this->loggerInstance->debug(5, "At token validation level, " . $certificatesNumber . " certificates exist.\n");
152
+        $this->loggerInstance->debug(5, "At token validation level, ".$certificatesNumber." certificates exist.\n");
153 153
         // SELECT -> resource, no boolean
154 154
         while ($runner = mysqli_fetch_object(/** @scrutinizer ignore-type */ $certificatesResult)) {
155 155
             $this->associatedCertificates[] = new \core\SilverbulletCertificate($runner->serial_number, $runner->ca_type);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 throw new Exception("Uh. Something went seriously wrong with URL path mangling.");
209 209
             }
210 210
         }
211
-        $link = $link . $relPath;
211
+        $link = $link.$relPath;
212 212
 
213 213
         if (preg_match('/admin$/', $link)) {
214 214
             $link = substr($link, 0, -6);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             }
218 218
         }
219 219
 
220
-        return $link . '/accountstatus/accountstatus.php?token=' . $this->invitationTokenString;
220
+        return $link.'/accountstatus/accountstatus.php?token='.$this->invitationTokenString;
221 221
     }
222 222
 
223 223
     /**
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
245 245
         $text .= " ";
246 246
         $text .= sprintf(_("Please follow the following link with the device you want to enable for %s to get a custom %s installation program just for you. You can click on the link, copy and paste it into a browser or scan the attached QR code."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
247
-        $text .= "\n\n" . $this->link() . "\n\n"; // gets replaced with the token value by getBody()
247
+        $text .= "\n\n".$this->link()."\n\n"; // gets replaced with the token value by getBody()
248 248
         $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
249 249
         $text .= "\n\n";
250 250
         $text .= _("Regards,");
Please login to merge, or discard this patch.