Test Setup Failed
Push — master ( 1b2b29...06d854 )
by Stefan
07:00 queued 13s
created
web/admin/edit_participant.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 $inst_name = $my_inst->name;
40 40
 
41 41
 if ($wizardStyle) {
42
-    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'],  $uiElements->nomenclatureParticipant));
42
+    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant));
43 43
 } else {
44 44
     echo $deco->defaultPagePrelude(sprintf(_("%s: Editing %s '%s'"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant, $inst_name));
45 45
 }
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         ?>
81 81
     </h1>
82 82
     <div class='infobox'>
83
-        <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption;?></h2>
83
+        <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption; ?></h2>
84 84
         <table>
85
-            <caption><?php echo $tablecaption;?></caption>
85
+            <caption><?php echo $tablecaption; ?></caption>
86 86
             <tr>
87
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
88
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
89
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
87
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
88
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
89
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
90 90
             </tr>
91 91
 
92 92
             <tr>
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
         </table>
102 102
     </div>
103 103
     <?php
104
-    echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'>
105
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
104
+    echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'>
105
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
106 106
 
107 107
     if ($wizardStyle) {
108
-        echo "<p>" .
109
-        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant) . "</p>";
108
+        echo "<p>".
109
+        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant)."</p>";
110 110
     }
111 111
     $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, \core\Options::LEVEL_IDP);
112 112
     ?>
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
         <legend><strong><?php echo _("General Information"); ?></strong></legend>
115 115
         <?php
116 116
         if ($wizardStyle) {
117
-            echo "<p>" .
118
-            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>
117
+            echo "<p>".
118
+            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>
119 119
                       <ul>
120
-                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>
121
-                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."),$uiElements->nomenclatureParticipant) . "</li>";
120
+                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>
121
+                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $uiElements->nomenclatureParticipant)."</li>";
122 122
             echo "</ul>";
123 123
         }
124 124
         echo $optionDisplay->prefilledOptionTable("general");
@@ -132,44 +132,44 @@  discard block
 block discarded – undo
132 132
         <legend><strong><?php echo _("Media Properties"); ?></strong></legend>
133 133
         <?php
134 134
         if ($wizardStyle) {
135
-            echo "<p>" .
136
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>
135
+            echo "<p>".
136
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>
137 137
           <ul>";
138 138
             echo "<li>";
139
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
139
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
140 140
             if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
141 141
                 $ssidlist = "";
142 142
                 foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
143
-                    $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
143
+                    $ssidlist .= ", '<strong>".$ssid."</strong>'";
144 144
                 }
145 145
                 $ssidlist = substr($ssidlist, 2);
146 146
                 echo sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
147
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
147
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
148 148
             } else {
149 149
                 echo _("Please configure which SSIDs should be configured in the installers.");
150 150
             }
151
-            echo " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
151
+            echo " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
152 152
             echo "</li>";
153 153
 
154 154
             echo "<li>";
155
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
155
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
156 156
             if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
157 157
                 $consortiumlist = "";
158 158
                 foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
159
-                    $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
159
+                    $consortiumlist .= ", '<strong>".$oi."</strong>'";
160 160
                 }
161 161
                 $consortiumlist = substr($consortiumlist, 2);
162 162
                 echo sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist);
163 163
 
164
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
164
+                echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
165 165
             } else {
166 166
                 echo _("Please configure which Consortium OIs should be configured in the installers.");
167 167
             }
168 168
             echo "</li>";
169
-            echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
170
-            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") .
169
+            echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
170
+            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).").
171 171
             "</li>";
172
-            echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
172
+            echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
173 173
             . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.")
174 174
             . "</li>";
175 175
             echo "</ul>";
@@ -185,16 +185,16 @@  discard block
 block discarded – undo
185 185
             echo "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>";
186 186
             
187 187
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
188
-                echo "<p>" .
188
+                echo "<p>".
189 189
                         
190
-                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."),$uiElements->nomenclatureParticipant)  . "</p>" .
191
-                "<p>" .
192
-                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>";
190
+                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $uiElements->nomenclatureParticipant)."</p>".
191
+                "<p>".
192
+                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>";
193 193
                 if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
194
-                echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>";
194
+                echo "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME)." "._("This is the contact point for your end users' level 1 support.")."</p>";
195 195
                 }
196 196
             } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
197
-                echo "<p>". _("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
197
+                echo "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
198 198
             }
199 199
             
200 200
         }
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
         <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset>
205 205
     <?php
206 206
     if ($wizardStyle) {
207
-        echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>";
207
+        echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>";
208 208
     } else {
209
-        echo "<div><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_user.php\"'>" . _("Discard changes") . "</button></div></form>";
209
+        echo "<div><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_user.php\"'>"._("Discard changes")."</button></div></form>";
210 210
     }
211 211
     echo $deco->footer();
Please login to merge, or discard this patch.
config/Diagnostics-template.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
  */
35 35
 class Diagnostics
36 36
 {
37
-         /**
38
-         * Various paths.
39
-         * eapol_test: absolute path to the eapol_test executable. If you just fill in "eapol_test" the one from the system $PATH will be taken.
40
-         * c_rehash: absolute path to the c_rehash executable. If you just fill in "c_rehash" the one from the system $PATH will be taken.
41
-         *   See also NSIS_VERSION further down
42
-         * @var array
43
-         */
37
+            /**
38
+             * Various paths.
39
+             * eapol_test: absolute path to the eapol_test executable. If you just fill in "eapol_test" the one from the system $PATH will be taken.
40
+             * c_rehash: absolute path to the c_rehash executable. If you just fill in "c_rehash" the one from the system $PATH will be taken.
41
+             *   See also NSIS_VERSION further down
42
+             * @var array
43
+             */
44 44
         const PATHS = [
45 45
             'c_rehash' => 'c_rehash',
46 46
             'eapol_test' => 'eapol_test',
Please login to merge, or discard this patch.
core/common/OutsideComm.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $mail->WordWrap = 72;
83 83
         $mail->isHTML(FALSE);
84 84
         $mail->CharSet = 'UTF-8';
85
-        $configuredFrom = \config\Master::APPEARANCE['from-mail'] . "";
85
+        $configuredFrom = \config\Master::APPEARANCE['from-mail']."";
86 86
         $mail->From = $configuredFrom;
87 87
 // are we fancy? i.e. S/MIME signing?
88 88
         if (isset(\config\Master::MAILSETTINGS['certfilename'], \config\Master::MAILSETTINGS['keyfilename'], \config\Master::MAILSETTINGS['keypass'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX.");
124 124
             return OutsideComm::MAILDOMAIN_NO_MX;
125 125
         }
126
-        $loggerInstance->debug(5, "Domain: $domain MX: " . /** @scrutinizer ignore-type */ print_r($mx, TRUE));
126
+        $loggerInstance->debug(5, "Domain: $domain MX: "./** @scrutinizer ignore-type */ print_r($mx, TRUE));
127 127
         // create a pool of A and AAAA records for all the MXes
128 128
         $ipAddrs = [];
129 129
         foreach ($mx as $onemx) {
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $ipAddrs[] = $oneipv4['ip'];
134 134
             }
135 135
             foreach ($v6list as $oneipv6) {
136
-                $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]";
136
+                $ipAddrs[] = "[".$oneipv6['ipv6']."]";
137 137
             }
138 138
         }
139 139
         if (count($ipAddrs) == 0) {
140 140
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts.");
141 141
             return OutsideComm::MAILDOMAIN_NO_HOST;
142 142
         }
143
-        $loggerInstance->debug(5, "Domain: $domain Addrs: " . /** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
143
+        $loggerInstance->debug(5, "Domain: $domain Addrs: "./** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
144 144
         // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. 
145 145
         // If at least one does not support STARTTLS or one of the hosts doesn't connect
146 146
         // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         switch (\config\ConfAssistant::SMSSETTINGS['provider']) {
194 194
             case 'Nexmo':
195 195
                 // taken from https://docs.nexmo.com/messaging/sms-api
196
-                $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
196
+                $url = 'https://rest.nexmo.com/sms/json?'.http_build_query(
197 197
                                 [
198 198
                                     'api_key' => \config\ConfAssistant::SMSSETTINGS['username'],
199 199
                                     'api_secret' => \config\ConfAssistant::SMSSETTINGS['password'],
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
                     $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!');
220 220
                     return OutsideComm::SMS_NOTSENT;
221 221
                 }
222
-                $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.');
222
+                $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.');
223 223
 
224 224
                 $totalFailures = 0;
225 225
                 foreach ($decoded_response['messages'] as $message) {
226 226
                     if ($message['status'] == 0) {
227
-                        $loggerInstance->debug(2, $message['message-id'] . ": Success");
227
+                        $loggerInstance->debug(2, $message['message-id'].": Success");
228 228
                     } else {
229
-                        $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")");
229
+                        $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")");
230 230
                         $totalFailures++;
231 231
                     }
232 232
                 }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             $proto = "https://";
296 296
         }
297 297
         // then, send out the mail
298
-        $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n";
298
+        $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n";
299 299
         // default means we don't have a Reply-To.
300 300
         $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address."));
301 301
 
@@ -303,8 +303,8 @@  discard block
 block discarded – undo
303 303
             // see if we are supposed to add a custom message
304 304
             $customtext = $federation->getAttributes('fed:custominvite');
305 305
             if (count($customtext) > 0) {
306
-                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" .
307
-                        wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n";
306
+                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------".
307
+                        wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n";
308 308
             }
309 309
             // and add Reply-To already now
310 310
             foreach ($federation->listFederationAdmins() as $fedadmin_id) {
@@ -320,19 +320,19 @@  discard block
 block discarded – undo
320 320
         }
321 321
         $productname = \config\Master::APPEARANCE['productname'];
322 322
         $consortium = \config\ConfAssistant::CONSORTIUM['display_name'];
323
-        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72) . "\n\n" .
324
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" .
325
-                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72) . "\n\n" .
326
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/\n\n" .
327
-                _("and enter the invitation token") . "\n\n" .
328
-                $newtoken . "\n\n$replyToMessage\n\n" .
329
-                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" .
330
-                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72) . "\n\n" .
323
+        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72)."\n\n".
324
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n".
325
+                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72)."\n\n".
326
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/\n\n".
327
+                _("and enter the invitation token")."\n\n".
328
+                $newtoken."\n\n$replyToMessage\n\n".
329
+                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".
330
+                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72)."\n\n".
331 331
                 sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), $consortium);
332 332
 
333 333
 
334 334
 // who to whom?
335
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System";
335
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System";
336 336
 
337 337
         if (isset(\config\Master::APPEARANCE['invitation-bcc-mail']) && \config\Master::APPEARANCE['invitation-bcc-mail'] !== NULL) {
338 338
             $mail->addBCC(\config\Master::APPEARANCE['invitation-bcc-mail']);
Please login to merge, or discard this patch.
core/common/Entity.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function __construct()
111 111
     {
112 112
         $this->loggerInstance = new Logging();
113
-        $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n");
113
+        $this->loggerInstance->debug(3, "--- BEGIN constructing class ".get_class($this)." .\n");
114 114
         $this->languageInstance = new Language();
115 115
         Entity::intoThePotatoes("core");
116 116
         // some config elements are displayable. We need some dummies to 
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
         $dummy_organisation2a = _("organization");
130 130
         $dummy_organisation3 = _("entity");
131 131
         // and do something useless with the strings so that there's no "unused" complaint
132
-        if (strlen($dummy_NRO . $dummy_inst1 . $dummy_inst2 . $dummy_inst3 . $dummy_hotspot1 . $dummy_hotspot2 . $dummy_hotspot3 . $dummy_organisation1 . $dummy_organisation2 . $dummy_organisation2a . $dummy_organisation3) < 0) {
132
+        if (strlen($dummy_NRO.$dummy_inst1.$dummy_inst2.$dummy_inst3.$dummy_hotspot1.$dummy_hotspot2.$dummy_hotspot3.$dummy_organisation1.$dummy_organisation2.$dummy_organisation2a.$dummy_organisation3) < 0) {
133 133
             throw new Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole.");
134 134
         }
135
-        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . "";
136
-        $xyzVariableInst = \config\ConfAssistant::CONSORTIUM['nomenclature_institution'] . "";
137
-        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot'] . "";
138
-        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant'] . "";
135
+        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation']."";
136
+        $xyzVariableInst = \config\ConfAssistant::CONSORTIUM['nomenclature_institution']."";
137
+        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot']."";
138
+        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant']."";
139 139
         Entity::$nomenclature_fed = _($xyzVariableFed);
140 140
         Entity::$nomenclature_inst = _($xyzVariableInst);
141 141
         Entity::$nomenclature_hotspot = _($xyzVariableHotspot);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function __destruct()
153 153
     {
154
-        (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n");
154
+        (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n");
155 155
     }
156 156
 
157 157
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     public static function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1)
185 185
     {
186 186
         $loggerInstance = new Logging();
187
-        $name = md5(time() . rand());
187
+        $name = md5(time().rand());
188 188
         $path = ROOT;
189 189
         switch ($purpose) {
190 190
             case 'silverbullet':
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             default:
203 203
                 throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n");
204 204
         }
205
-        $tmpDir = $path . '/' . $name;
205
+        $tmpDir = $path.'/'.$name;
206 206
         $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n");
207 207
         if (!mkdir($tmpDir, 0700, true)) {
208 208
             if ($failIsFatal) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function rrmdir($dir)
225 225
     {
226
-        foreach (glob($dir . '/*') as $file) {
226
+        foreach (glob($dir.'/*') as $file) {
227 227
             if (is_dir($file)) {
228 228
                 Entity::rrmdir($file);
229 229
             } else {
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
         }
250 250
         // these substr() are guaranteed to yield actual string data, as the
251 251
         // base string is an MD5 hash - has sufficient length
252
-        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-';
253
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-';
254
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-';
255
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-';
252
+        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-';
253
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-';
254
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-';
255
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-';
256 256
         $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12);
257
-        return $prefix . $uuid;
257
+        return $prefix.$uuid;
258 258
     }
259 259
 
260 260
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         for ($i = count($trace); $i--; $i > 0) {
296 296
             if (isset($trace[$i - 1]['class']) && preg_match('/Entity/', $trace[$i - 1]['class'])) {
297 297
                 if ($showTrace) {
298
-                    echo "FOUND caller: " . /** @scrutinizer ignore-type */ print_r($trace[$i], true) . " - class is " . $trace[$i]['class'];
298
+                    echo "FOUND caller: "./** @scrutinizer ignore-type */ print_r($trace[$i], true)." - class is ".$trace[$i]['class'];
299 299
                 }
300 300
                 $caller = $trace[$i];
301 301
                 break;
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
         // otherwise, on the filename relative to ROOT
306 306
         $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT));
307 307
         if ($showTrace === TRUE) {
308
-            echo "<pre>" . /** @scrutinizer ignore-type */ print_r($trace, true) . "</pre>";
309
-            echo "CLASS = " . $myName . "<br/>";
308
+            echo "<pre>"./** @scrutinizer ignore-type */ print_r($trace, true)."</pre>";
309
+            echo "CLASS = ".$myName."<br/>";
310 310
         }
311 311
         if (preg_match("/diag/", $myName) == 1) {
312 312
             $ret = "diagnostics";
@@ -340,10 +340,10 @@  discard block
 block discarded – undo
340 340
         if ($catalogue === NULL) {
341 341
             $theCatalogue = Entity::determineOwnCatalogue($trace);
342 342
             textdomain($theCatalogue);
343
-            bindtextdomain($theCatalogue, ROOT . "/translation/");
343
+            bindtextdomain($theCatalogue, ROOT."/translation/");
344 344
         } else {
345 345
             textdomain($catalogue);
346
-            bindtextdomain($catalogue, ROOT . "/translation/");
346
+            bindtextdomain($catalogue, ROOT."/translation/");
347 347
         }
348 348
     }
349 349
 
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 
106 106
         $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes);
107 107
 
108
-        $this->loggerInstance->debug(5, "Device-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true));
109
-        $this->loggerInstance->debug(5, "EAP-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true));
110
-        $this->loggerInstance->debug(5, "All low-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true));
108
+        $this->loggerInstance->debug(5, "Device-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true));
109
+        $this->loggerInstance->debug(5, "EAP-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true));
110
+        $this->loggerInstance->debug(5, "All low-Level Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true));
111 111
 
112 112
         // now fetch and merge profile-level attributes if not already set on deeper level
113 113
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             }
138 138
         }
139 139
 
140
-        $this->loggerInstance->debug(5, "Merged Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true));
140
+        $this->loggerInstance->debug(5, "Merged Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true));
141 141
 
142 142
         // now, fetch and merge IdP-wide attributes
143 143
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         // add the internal attribute to that effect
153 153
         
154 154
         if (isset($this->attributes['media:openroaming_always'])) {
155
-            $this->attributes = array_merge($this->attributes, $this->addInternalAttributes([ "internal:openroaming" => TRUE ] ));
155
+            $this->attributes = array_merge($this->attributes, $this->addInternalAttributes(["internal:openroaming" => TRUE]));
156 156
         }
157 157
         
158 158
         $this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n");
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                 "row" => $attributeQuery->row,
201 201
                 "flag" => $optinfo['flag'],
202 202
                 "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL),
203
-                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )];
203
+                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())];
204 204
         }
205 205
         return $temparray;
206 206
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function setAnonymousIDSupport($shallwe)
311 311
     {
312
-        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
312
+        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
313 313
     }
314 314
 
315 315
     /** Toggle special username for realm checks
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      * @return void
320 320
      */
321 321
     public function setRealmCheckUser($shallwe, $localpart = NULL) {
322
-        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
322
+        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
323 323
         if ($localpart !== NULL) {
324 324
             $this->databaseHandle->exec("UPDATE profile SET checkuser_value = ? WHERE profile_id = $this->identifier", "s", $localpart);
325 325
         }
@@ -334,8 +334,8 @@  discard block
 block discarded – undo
334 334
      */
335 335
     public function setInputVerificationPreference($verify, $hint)
336 336
     {
337
-        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") .
338
-                ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") .
337
+        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0").
338
+                ", hint_userinput_suffix = ".($hint === true ? "1" : "0").
339 339
                 " WHERE profile_id = $this->identifier");
340 340
     }
341 341
 
Please login to merge, or discard this patch.
core/diag/RADIUSTests.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             }
168 168
         }
169 169
 
170
-        $this->loggerInstance->debug(4, "RADIUSTests is in opMode " . $this->opMode . ", parameters were: $realm, $outerUsernameForChecks, " . /** @scrutinizer ignore-type */ print_r($supportedEapTypes, true));
170
+        $this->loggerInstance->debug(4, "RADIUSTests is in opMode ".$this->opMode.", parameters were: $realm, $outerUsernameForChecks, "./** @scrutinizer ignore-type */ print_r($supportedEapTypes, true));
171 171
         $this->loggerInstance->debug(4, /** @scrutinizer ignore-type */ print_r($expectedServerNames, true));
172 172
         $this->loggerInstance->debug(4, /** @scrutinizer ignore-type */ print_r($expectedCABundle, true));
173 173
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                 $returnarray[] = RADIUSTests::CERTPROB_WILDCARD_IN_NAME;
258 258
                 continue; // otherwise we'd ALSO complain that it's not a real hostname
259 259
             }
260
-            if ($onename != "" && filter_var("foo@" . idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) {
260
+            if ($onename != "" && filter_var("foo@".idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) {
261 261
                 $returnarray[] = RADIUSTests::CERTPROB_NOT_A_HOSTNAME;
262 262
             }
263 263
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             $probValue = RADIUSTests::CERTPROB_SHA1_SIGNATURE;
285 285
             $returnarray[] = $probValue;
286 286
         }
287
-        $this->loggerInstance->debug(4, "CERT IS: " . /** @scrutinizer ignore-type */ print_r($intermediateCa, TRUE));
287
+        $this->loggerInstance->debug(4, "CERT IS: "./** @scrutinizer ignore-type */ print_r($intermediateCa, TRUE));
288 288
         if ($intermediateCa['basicconstraints_set'] == 0) {
289 289
             $returnarray[] = RADIUSTests::CERTPROB_NO_BASICCONSTRAINTS;
290 290
         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     {
335 335
         // for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy
336 336
         // the following PEM data is one of the SENSE EAPLab client certs (not secret at all)
337
-        $clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12");
337
+        $clientcert = file_get_contents(dirname(__FILE__)."/clientcert.p12");
338 338
         if ($clientcert === FALSE) {
339 339
             throw new Exception("A dummy client cert is part of the source distribution, but could not be loaded!");
340 340
         }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
         if ($this->opMode == self::RADIUS_TEST_OPERATION_MODE_THOROUGH) {
344 344
             return $this->udpLogin($probeindex, $this->supportedEapTypes[0]->getArrayRep(), $this->outerUsernameForChecks, 'eaplab', $opnameCheck, $frag, $clientcert);
345 345
         }
346
-        return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@" . $this->realm, 'eaplab', $opnameCheck, $frag, $clientcert);
346
+        return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@".$this->realm, 'eaplab', $opnameCheck, $frag, $clientcert);
347 347
     }
348 348
 
349 349
     /**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             return RADIUSTests::CERTPROB_NO_CDP_HTTP;
366 366
         }
367 367
         // first and second sub-match is the full URL... check it
368
-        $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1] . $crlUrl[2]));
368
+        $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1].$crlUrl[2]));
369 369
         if ($crlcontent === FALSE) {
370 370
             return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL;
371 371
         }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
         // $pem = chunk_split(base64_encode($crlcontent), 64, "\n");
381 381
         // inspired by https://stackoverflow.com/questions/2390604/how-to-pass-variables-as-stdin-into-command-line-from-php
382 382
 
383
-        $proc = \config\Master::PATHS['openssl'] . " crl -inform der";
383
+        $proc = \config\Master::PATHS['openssl']." crl -inform der";
384 384
         $descriptorspec = [
385 385
             0 => ["pipe", "r"],
386 386
             1 => ["pipe", "w"],
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         $origLength = strlen($hex);
420 420
         for ($i = 1; $i < $origLength; $i++) {
421 421
             if ($i % 2 == 1 && $i != strlen($hex)) {
422
-                $spaced .= $hex[$i] . " ";
422
+                $spaced .= $hex[$i]." ";
423 423
             } else {
424 424
                 $spaced .= $hex[$i];
425 425
             }
@@ -547,19 +547,19 @@  discard block
 block discarded – undo
547 547
         $eapText = \core\common\EAP::eapDisplayName($eaptype);
548 548
         $config = '
549 549
 network={
550
-  ssid="' . \config\Master::APPEARANCE['productname'] . ' testing"
550
+  ssid="' . \config\Master::APPEARANCE['productname'].' testing"
551 551
   key_mgmt=WPA-EAP
552 552
   proto=WPA2
553 553
   pairwise=CCMP
554 554
   group=CCMP
555 555
   ';
556 556
 // phase 1
557
-        $config .= 'eap=' . $eapText['OUTER'] . "\n";
557
+        $config .= 'eap='.$eapText['OUTER']."\n";
558 558
         $logConfig = $config;
559 559
 // phase 2 if applicable; all inner methods have passwords
560 560
         if (isset($eapText['INNER']) && $eapText['INNER'] != "") {
561
-            $config .= '  phase2="auth=' . $eapText['INNER'] . "\"\n";
562
-            $logConfig .= '  phase2="auth=' . $eapText['INNER'] . "\"\n";
561
+            $config .= '  phase2="auth='.$eapText['INNER']."\"\n";
562
+            $logConfig .= '  phase2="auth='.$eapText['INNER']."\"\n";
563 563
         }
564 564
 // all methods set a password, except EAP-TLS
565 565
         if ($eaptype != \core\common\EAP::EAPTYPE_TLS) {
@@ -575,11 +575,11 @@  discard block
 block discarded – undo
575 575
         }
576 576
 
577 577
 // inner identity
578
-        $config .= '  identity="' . $inner . "\"\n";
579
-        $logConfig .= '  identity="' . $inner . "\"\n";
578
+        $config .= '  identity="'.$inner."\"\n";
579
+        $logConfig .= '  identity="'.$inner."\"\n";
580 580
 // outer identity, may be equal
581
-        $config .= '  anonymous_identity="' . $outer . "\"\n";
582
-        $logConfig .= '  anonymous_identity="' . $outer . "\"\n";
581
+        $config .= '  anonymous_identity="'.$outer."\"\n";
582
+        $logConfig .= '  anonymous_identity="'.$outer."\"\n";
583 583
 // done
584 584
         $config .= "}";
585 585
         $logConfig .= "}";
@@ -642,13 +642,13 @@  discard block
 block discarded – undo
642 642
      */
643 643
     private function eapolTestConfig($probeindex, $opName, $frag)
644 644
     {
645
-        $cmdline = \config\Diagnostics::PATHS['eapol_test'] .
646
-                " -a " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['ip'] .
647
-                " -s " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['secret'] .
648
-                " -o serverchain.pem" .
649
-                " -c ./udp_login_test.conf" .
650
-                " -M 22:44:66:CA:20:" . sprintf("%02d", $probeindex) . " " .
651
-                " -t " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['timeout'] . " ";
645
+        $cmdline = \config\Diagnostics::PATHS['eapol_test'].
646
+                " -a ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['ip'].
647
+                " -s ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['secret'].
648
+                " -o serverchain.pem".
649
+                " -c ./udp_login_test.conf".
650
+                " -M 22:44:66:CA:20:".sprintf("%02d", $probeindex)." ".
651
+                " -t ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['timeout']." ";
652 652
         if ($opName) {
653 653
             $cmdline .= '-N126:s:"1cat.eduroam.org" ';
654 654
         }
@@ -678,10 +678,10 @@  discard block
 block discarded – undo
678 678
      */
679 679
     private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs)
680 680
     {
681
-        if (!mkdir($tmpDir . "/root-ca-allcerts/", 0700, true)) {
681
+        if (!mkdir($tmpDir."/root-ca-allcerts/", 0700, true)) {
682 682
             throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-allcerts/\n");
683 683
         }
684
-        if (!mkdir($tmpDir . "/root-ca-eaponly/", 0700, true)) {
684
+        if (!mkdir($tmpDir."/root-ca-eaponly/", 0700, true)) {
685 685
             throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-eaponly/\n");
686 686
         }
687 687
 // make a copy of the EAP-received chain and add the configured intermediates, if any
@@ -695,15 +695,15 @@  discard block
 block discarded – undo
695 695
             }
696 696
             if ($decoded['ca'] == 1) {
697 697
                 if ($decoded['root'] == 1) { // save CAT roots to the root directory
698
-                    file_put_contents($tmpDir . "/root-ca-eaponly/configuredroot" . count($catRoots) . ".pem", $decoded['pem']);
699
-                    file_put_contents($tmpDir . "/root-ca-allcerts/configuredroot" . count($catRoots) . ".pem", $decoded['pem']);
698
+                    file_put_contents($tmpDir."/root-ca-eaponly/configuredroot".count($catRoots).".pem", $decoded['pem']);
699
+                    file_put_contents($tmpDir."/root-ca-allcerts/configuredroot".count($catRoots).".pem", $decoded['pem']);
700 700
                     $catRoots[] = $decoded['pem'];
701 701
                 } else { // save the intermediates to allcerts directory
702
-                    file_put_contents($tmpDir . "/root-ca-allcerts/cat-intermediate" . count($catIntermediates) . ".pem", $decoded['pem']);
702
+                    file_put_contents($tmpDir."/root-ca-allcerts/cat-intermediate".count($catIntermediates).".pem", $decoded['pem']);
703 703
                     $intermOdditiesCAT = array_merge($intermOdditiesCAT, $this->propertyCheckIntermediate($decoded));
704 704
                     if (isset($decoded['CRL']) && isset($decoded['CRL'][0])) {
705 705
                         $this->loggerInstance->debug(4, "got an intermediate CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain");
706
-                        file_put_contents($tmpDir . "/root-ca-allcerts/crl_cat" . count($catIntermediates) . ".pem", $decoded['CRL'][0]);
706
+                        file_put_contents($tmpDir."/root-ca-allcerts/crl_cat".count($catIntermediates).".pem", $decoded['CRL'][0]);
707 707
                     }
708 708
                     $catIntermediates[] = $decoded['pem'];
709 709
                 }
@@ -712,26 +712,26 @@  discard block
 block discarded – undo
712 712
         // save all intermediate certificates and CRLs to separate files in 
713 713
         // both root-ca directories
714 714
         foreach ($eapIntermediates as $index => $onePem) {
715
-            file_put_contents($tmpDir . "/root-ca-eaponly/intermediate$index.pem", $onePem);
716
-            file_put_contents($tmpDir . "/root-ca-allcerts/intermediate$index.pem", $onePem);
715
+            file_put_contents($tmpDir."/root-ca-eaponly/intermediate$index.pem", $onePem);
716
+            file_put_contents($tmpDir."/root-ca-allcerts/intermediate$index.pem", $onePem);
717 717
         }
718 718
         foreach ($eapIntermediateCRLs as $index => $onePem) {
719
-            file_put_contents($tmpDir . "/root-ca-eaponly/intermediateCRL$index.pem", $onePem);
720
-            file_put_contents($tmpDir . "/root-ca-allcerts/intermediateCRL$index.pem", $onePem);
719
+            file_put_contents($tmpDir."/root-ca-eaponly/intermediateCRL$index.pem", $onePem);
720
+            file_put_contents($tmpDir."/root-ca-allcerts/intermediateCRL$index.pem", $onePem);
721 721
         }
722 722
 
723 723
         $checkstring = "";
724 724
         if (isset($servercert['CRL']) && isset($servercert['CRL'][0])) {
725 725
             $this->loggerInstance->debug(4, "got a server CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain");
726 726
             $checkstring = "-crl_check_all";
727
-            file_put_contents($tmpDir . "/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]);
728
-            file_put_contents($tmpDir . "/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]);
727
+            file_put_contents($tmpDir."/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]);
728
+            file_put_contents($tmpDir."/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]);
729 729
         }
730 730
 
731 731
 
732 732
 // now c_rehash the root CA directory ...
733
-        system(\config\Diagnostics::PATHS['c_rehash'] . " $tmpDir/root-ca-eaponly/ > /dev/null");
734
-        system(\config\Diagnostics::PATHS['c_rehash'] . " $tmpDir/root-ca-allcerts/ > /dev/null");
733
+        system(\config\Diagnostics::PATHS['c_rehash']." $tmpDir/root-ca-eaponly/ > /dev/null");
734
+        system(\config\Diagnostics::PATHS['c_rehash']." $tmpDir/root-ca-allcerts/ > /dev/null");
735 735
         return $checkstring;
736 736
     }
737 737
 
@@ -764,12 +764,12 @@  discard block
 block discarded – undo
764 764
 // so test if there's something PEMy in the file at all
765 765
 // serverchain.pem is the output from eapol_test; incomingserver.pem is written by extractIncomingCertsfromEAP() if there was at least one server cert.
766 766
         if (filesize("$tmpDir/serverchain.pem") > 10 && filesize("$tmpDir/incomingserver.pem") > 10) {
767
-            exec(\config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly);
768
-            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n");
769
-            $this->loggerInstance->debug(4, "Chain verify pass 1: " . /** @scrutinizer ignore-type */ print_r($verifyResultEaponly, TRUE) . "\n");
770
-            exec(\config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts);
771
-            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n");
772
-            $this->loggerInstance->debug(4, "Chain verify pass 2: " . /** @scrutinizer ignore-type */ print_r($verifyResultAllcerts, TRUE) . "\n");
767
+            exec(\config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly);
768
+            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n");
769
+            $this->loggerInstance->debug(4, "Chain verify pass 1: "./** @scrutinizer ignore-type */ print_r($verifyResultEaponly, TRUE)."\n");
770
+            exec(\config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts);
771
+            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n");
772
+            $this->loggerInstance->debug(4, "Chain verify pass 2: "./** @scrutinizer ignore-type */ print_r($verifyResultAllcerts, TRUE)."\n");
773 773
         }
774 774
 
775 775
 // now we do certificate verification against the collected parents
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
         // we are UNHAPPY if no names match!
836 836
         $happiness = "UNHAPPY";
837 837
         foreach ($this->expectedServerNames as $expectedName) {
838
-            $this->loggerInstance->debug(4, "Managing expectations for $expectedName: " . /** @scrutinizer ignore-type */ print_r($servercert['CN'], TRUE) . /** @scrutinizer ignore-type */ print_r($servercert['sAN_DNS'], TRUE));
838
+            $this->loggerInstance->debug(4, "Managing expectations for $expectedName: "./** @scrutinizer ignore-type */ print_r($servercert['CN'], TRUE)./** @scrutinizer ignore-type */ print_r($servercert['sAN_DNS'], TRUE));
839 839
             if (array_search($expectedName, $servercert['CN']) !== FALSE && array_search($expectedName, $servercert['sAN_DNS']) !== FALSE) {
840 840
                 $this->loggerInstance->debug(4, "Totally happy!");
841 841
                 $happiness = "TOTALLY";
@@ -880,11 +880,11 @@  discard block
 block discarded – undo
880 880
         $theconfigs = $this->wpaSupplicantConfig($eaptype, $finalInner, $finalOuter, $password);
881 881
         // the config intentionally does not include CA checking. We do this
882 882
         // ourselves after getting the chain with -o.
883
-        file_put_contents($tmpDir . "/udp_login_test.conf", $theconfigs[0]);
883
+        file_put_contents($tmpDir."/udp_login_test.conf", $theconfigs[0]);
884 884
 
885 885
         $cmdline = $this->eapolTestConfig($probeindex, $opnameCheck, $frag);
886 886
         $this->loggerInstance->debug(4, "Shallow reachability check cmdline: $cmdline\n");
887
-        $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n" . $theconfigs[1] . "\n");
887
+        $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n".$theconfigs[1]."\n");
888 888
         $time_start = microtime(true);
889 889
         $pflow = [];
890 890
         exec($cmdline, $pflow);
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
         }
894 894
         $time_stop = microtime(true);
895 895
         $output = print_r($this->redact($password, $pflow), TRUE);
896
-        file_put_contents($tmpDir . "/eapol_test_output_redacted_$probeindex.txt", $output);
896
+        file_put_contents($tmpDir."/eapol_test_output_redacted_$probeindex.txt", $output);
897 897
         $this->loggerInstance->debug(5, "eapol_test output saved to eapol_test_output_redacted_$probeindex.txt\n");
898 898
         return [
899 899
             "time" => ($time_stop - $time_start) * 1000,
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
         if ($packetflow[count($packetflow) - 1] == 3 && $this->checkLineparse($packetflow_orig, self::LINEPARSE_CHECK_REJECTIGNORE)) {
931 931
             array_pop($packetflow);
932 932
         }
933
-        $this->loggerInstance->debug(5, "Packetflow: " . /** @scrutinizer ignore-type */ print_r($packetflow, TRUE));
933
+        $this->loggerInstance->debug(5, "Packetflow: "./** @scrutinizer ignore-type */ print_r($packetflow, TRUE));
934 934
         $packetcount = array_count_values($packetflow);
935 935
         $testresults['packetcount'] = $packetcount;
936 936
         $testresults['packetflow'] = $packetflow;
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
     private function wasModernTlsNegotiated(&$testresults, $packetflow_orig)
973 973
     {
974 974
         $negotiatedTlsVersion = $this->checkLineparse($packetflow_orig, self::LINEPARSE_TLSVERSION);
975
-        $this->loggerInstance->debug(4, "TLS version found is: $negotiatedTlsVersion" . "\n");
975
+        $this->loggerInstance->debug(4, "TLS version found is: $negotiatedTlsVersion"."\n");
976 976
         if ($negotiatedTlsVersion === FALSE) {
977 977
             $testresults['cert_oddities'][] = RADIUSTests::TLSPROB_UNKNOWN_TLS_VERSION;
978 978
         } elseif ($negotiatedTlsVersion != self::TLS_VERSION_1_2 && $negotiatedTlsVersion != self::TLS_VERSION_1_3) {
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
 
1033 1033
         $x509 = new \core\common\X509();
1034 1034
 // $eap_certarray holds all certs received in EAP conversation
1035
-        $incomingData = file_get_contents($tmpDir . "/serverchain.pem");
1035
+        $incomingData = file_get_contents($tmpDir."/serverchain.pem");
1036 1036
         if ($incomingData !== FALSE && strlen($incomingData) > 0) {
1037 1037
             $eapCertArray = $x509->splitCertificate($incomingData);
1038 1038
         } else {
@@ -1062,10 +1062,10 @@  discard block
 block discarded – undo
1062 1062
                 case RADIUSTests::SERVER_CA_SELFSIGNED:
1063 1063
                     $servercert[] = $cert;
1064 1064
                     if (count($servercert) == 1) {
1065
-                        if (file_put_contents($tmpDir . "/incomingserver.pem", $cert['pem'] . "\n") === FALSE) {
1065
+                        if (file_put_contents($tmpDir."/incomingserver.pem", $cert['pem']."\n") === FALSE) {
1066 1066
                             $this->loggerInstance->debug(4, "The (first) server certificate could not be written to $tmpDir/incomingserver.pem!\n");
1067 1067
                         }
1068
-                        $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: " . /** @scrutinizer ignore-type */ print_r($servercert[0], true));
1068
+                        $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: "./** @scrutinizer ignore-type */ print_r($servercert[0], true));
1069 1069
                     } elseif (!in_array(RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS, $testresults['cert_oddities'])) {
1070 1070
                         $testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS;
1071 1071
                     }
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
         chdir($tmpDir);
1147 1147
         $this->loggerInstance->debug(4, "temp dir: $tmpDir\n");
1148 1148
         if ($clientcertdata !== NULL) {
1149
-            file_put_contents($tmpDir . "/client.p12", $clientcertdata);
1149
+            file_put_contents($tmpDir."/client.p12", $clientcertdata);
1150 1150
         }
1151 1151
         $testresults = [];
1152 1152
         // initialise the sub-array for cleaner parsing
@@ -1253,7 +1253,7 @@  discard block
 block discarded – undo
1253 1253
                     'issuer' => $this->printDN($certdata['issuer']),
1254 1254
                     'validFrom' => $this->printTm($certdata['validFrom_time_t']),
1255 1255
                     'validTo' => $this->printTm($certdata['validTo_time_t']),
1256
-                    'serialNumber' => $certdata['serialNumber'] . sprintf(" (0x%X)", $certdata['serialNumber']),
1256
+                    'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)", $certdata['serialNumber']),
1257 1257
                     'sha1' => $certdata['sha1'],
1258 1258
                     'extensions' => $certdata['extensions']
1259 1259
                 ];
Please login to merge, or discard this patch.
core/DBConnection.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -62,24 +62,24 @@  discard block
 block discarded – undo
62 62
             case "EXTERNAL":
63 63
             case "FRONTEND":
64 64
             case "DIAGNOSTICS":
65
-                if (!isset(self::${"instance" . $theDb})) {
65
+                if (!isset(self::${"instance".$theDb})) {
66 66
                     $class = __CLASS__;
67
-                    self::${"instance" . $theDb} = new $class($database);
68
-                    DBConnection::${"instance" . $theDb}->databaseInstance = $theDb;
67
+                    self::${"instance".$theDb} = new $class($database);
68
+                    DBConnection::${"instance".$theDb}->databaseInstance = $theDb;
69 69
                 }
70
-                return self::${"instance" . $theDb};
70
+                return self::${"instance".$theDb};
71 71
             case "RADIUS":
72
-                if (!isset(self::${"instance" . $theDb})) {
72
+                if (!isset(self::${"instance".$theDb})) {
73 73
                     $class = __CLASS__;
74 74
                     foreach (\config\ConfAssistant::DB as $name => $oneRadiusAuthDb) {
75 75
                         $theInstance = new $class($name);
76
-                        self::${"instance" . $theDb}[] = $theInstance;
76
+                        self::${"instance".$theDb}[] = $theInstance;
77 77
                         $theInstance->databaseInstance = $theDb;
78 78
                     }
79 79
                 }
80
-                return self::${"instance" . $theDb};
80
+                return self::${"instance".$theDb};
81 81
             default:
82
-                throw new Exception("This type of database (" . strtoupper($database) . ") is not known!");
82
+                throw new Exception("This type of database (".strtoupper($database).") is not known!");
83 83
         }
84 84
     }
85 85
 
@@ -121,18 +121,18 @@  discard block
 block discarded – undo
121 121
             }
122 122
         }
123 123
         // log exact query to debug log, if log level is at 5
124
-        $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n");
124
+        $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n");
125 125
         if ($types !== NULL) {
126
-            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . /** @scrutinizer ignore-type */ print_r($arguments, true));
126
+            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: "./** @scrutinizer ignore-type */ print_r($arguments, true));
127 127
         }
128 128
 
129 129
         if ($this->connection->connect_error) {
130
-            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!");
130
+            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!");
131 131
         }
132 132
         if ($types === NULL) {
133 133
             $result = $this->connection->query($querystring);
134 134
             if ($result === FALSE) {
135
-                throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--");
135
+                throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--");
136 136
             }
137 137
         } else {
138 138
             // fancy! prepared statement with dedicated argument list
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 }
149 149
                 $prepResult = $statementObject->prepare($querystring);
150 150
                 if ($prepResult === FALSE) {
151
-                    throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--.");
151
+                    throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--.");
152 152
                 }
153 153
                 $this->preparedStatements[$querystring] = $statementObject;
154 154
             }
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
             array_unshift($localArray, $types);
162 162
             $retval = call_user_func_array([$statementObject, "bind_param"], $localArray);
163 163
             if ($retval === FALSE) {
164
-                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--");
164
+                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--");
165 165
             }
166 166
             $result = $statementObject->execute();
167 167
             if ($result === FALSE) {
168
-                throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--");
168
+                throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--");
169 169
             }
170 170
             $selectResult = $statementObject->get_result();
171 171
             if ($selectResult !== FALSE) {
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
 
176 176
         // all cases where $result could be FALSE have been caught earlier
177 177
         if ($this->connection->errno) {
178
-            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!");
178
+            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!");
179 179
         }
180 180
 
181 181
 
182 182
         if ($isMoreThanSelect) {
183
-            $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring);
183
+            $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring);
184 184
             if ($types !== NULL) {
185
-                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . /** @scrutinizer ignore-type */ print_r($arguments, true));
185
+                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: "./** @scrutinizer ignore-type */ print_r($arguments, true));
186 186
             }
187 187
         }
188 188
         return $result;
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
         if (isset(\config\Master::DB[$databaseCapitalised])) {
278 278
             $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']);
279 279
             if ($this->connection->connect_error) {
280
-                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
280
+                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
281 281
             }
282 282
             $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly'];
283 283
         } else { // one of the RADIUS DBs
284 284
             $this->connection = new \mysqli(\config\ConfAssistant::DB[$databaseCapitalised]['host'], \config\ConfAssistant::DB[$databaseCapitalised]['user'], \config\ConfAssistant::DB[$databaseCapitalised]['pass'], \config\ConfAssistant::DB[$databaseCapitalised]['db']);
285 285
             if ($this->connection->connect_error) {
286
-                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
286
+                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
287 287
             }
288 288
             $this->readOnly = \config\ConfAssistant::DB[$databaseCapitalised]['readonly'];
289 289
         }
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType)
135 135
     {
136 136
         if (\config\Master::PATHS['logdir']) {
137
-            $file = fopen(\config\Master::PATHS['logdir'] . "/download_details.log", "a");
137
+            $file = fopen(\config\Master::PATHS['logdir']."/download_details.log", "a");
138 138
             if ($file === FALSE) {
139 139
                 throw new Exception("Unable to open file for append: $file");
140 140
             }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         }
182 182
         foreach ($new->getAttributes("eap:server_name") as $newName) {
183 183
             if (!in_array($newName['value'], $baselineNames)) {
184
-                $retval[AbstractProfile::SERVERNAME_ADDED] .= "#New server name '" . $newName['value'] . "' added";
184
+                $retval[AbstractProfile::SERVERNAME_ADDED] .= "#New server name '".$newName['value']."' added";
185 185
             }
186 186
         }
187 187
         return $retval;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $eaptype = new common\EAP($eapQuery->eap_method_id);
206 206
             $eapTypeArray[] = $eaptype;
207 207
         }
208
-        $this->loggerInstance->debug(4, "This profile supports the following EAP types:\n" . /** @scrutinizer ignore-type */ print_r($eapTypeArray, true));
208
+        $this->loggerInstance->debug(4, "This profile supports the following EAP types:\n"./** @scrutinizer ignore-type */ print_r($eapTypeArray, true));
209 209
         return $eapTypeArray;
210 210
     }
211 211
 
@@ -287,16 +287,16 @@  discard block
 block discarded – undo
287 287
         if (count($this->getAttributes("internal:checkuser_outer")) > 0) {
288 288
             // we are supposed to use a specific outer username for checks, 
289 289
             // which is different from the outer username we put into installers
290
-            return $this->getAttributes("internal:checkuser_value")[0]['value'] . "@" . $realm;
290
+            return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm;
291 291
         }
292 292
         if (count($this->getAttributes("internal:use_anon_outer")) > 0) {
293 293
             // no special check username, but there is an anon outer ID for
294 294
             // installers - so let's use that one
295
-            return $this->getAttributes("internal:anon_local_value")[0]['value'] . "@" . $realm;
295
+            return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm;
296 296
         }
297 297
         // okay, no guidance on outer IDs at all - but we need *something* to
298 298
         // test with for the RealmChecks. So:
299
-        return "@" . $realm;
299
+        return "@".$realm;
300 300
     }
301 301
 
302 302
     /**
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
     public function prepShowtime()
748 748
     {
749 749
         $properConfig = $this->readyForShowtime();
750
-        $this->databaseHandle->exec("UPDATE profile SET sufficient_config = " . ($properConfig ? "TRUE" : "FALSE") . " WHERE profile_id = " . $this->identifier);
750
+        $this->databaseHandle->exec("UPDATE profile SET sufficient_config = ".($properConfig ? "TRUE" : "FALSE")." WHERE profile_id = ".$this->identifier);
751 751
 
752 752
         $attribs = $this->getCollapsedAttributes();
753 753
         // if not enough info to go live, set FALSE
Please login to merge, or discard this patch.
core/SilverbulletCertificate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
         $invitationObject = new SilverbulletInvitation($token);
326 326
         $profile = new ProfileSilverbullet($invitationObject->profile);
327 327
         $inst = new IdP($profile->institution);
328
-        $loggerInstance->debug(5, "tokenStatus: done, got " . $invitationObject->invitationTokenStatus . ", " . $invitationObject->profile . ", " . $invitationObject->userId . ", " . $invitationObject->expiry . ", " . $invitationObject->invitationTokenString . "\n");
328
+        $loggerInstance->debug(5, "tokenStatus: done, got ".$invitationObject->invitationTokenStatus.", ".$invitationObject->profile.", ".$invitationObject->userId.", ".$invitationObject->expiry.", ".$invitationObject->invitationTokenString."\n");
329 329
         if ($invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_VALID && $invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED) {
330 330
             throw new Exception("Attempt to generate a SilverBullet installer with an invalid/redeemed/expired token. The user should never have gotten that far!");
331 331
         }
@@ -338,12 +338,12 @@  discard block
 block discarded – undo
338 338
             throw new Exception("Despite a valid token, the corresponding user was not found in database or database query error!");
339 339
         }
340 340
         $expiryObject = mysqli_fetch_object(/** @scrutinizer ignore-type */ $userrow);
341
-        $loggerInstance->debug(5, "EXP: " . $expiryObject->expiry . "\n");
341
+        $loggerInstance->debug(5, "EXP: ".$expiryObject->expiry."\n");
342 342
         $expiryDateObject = date_create_from_format("Y-m-d H:i:s", $expiryObject->expiry);
343 343
         if ($expiryDateObject === FALSE) {
344 344
             throw new Exception("The expiry date we got from the DB is bogus!");
345 345
         }
346
-        $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s") . "\n");
346
+        $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s")."\n");
347 347
         // date_create with no parameters can't fail, i.e. is never FALSE
348 348
         $validity = date_diff(/** @scrutinizer ignore-type */ date_create(), $expiryDateObject);
349 349
         $expiryDays = $validity->days + 1;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         $certString = "";
383 383
         openssl_x509_export($cert, $certString);
384 384
         $parsedCert = $x509->processCertificate($certString);
385
-        $loggerInstance->debug(5, "CERTINFO: " . /** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true));
385
+        $loggerInstance->debug(5, "CERTINFO: "./** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true));
386 386
         $realExpiryDate = date_create_from_format("U", $parsedCert['full_details']['validTo_time_t'])->format("Y-m-d H:i:s");
387 387
 
388 388
         // store new cert info in DB
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         $username = "";
443 443
         while ($usernameIsUnique === FALSE) {
444 444
             $usernameLocalPart = common\Entity::randomString(64 - 1 - strlen($realm), "0123456789abcdefghijklmnopqrstuvwxyz");
445
-            $username = $usernameLocalPart . "@" . $realm;
445
+            $username = $usernameLocalPart."@".$realm;
446 446
             $uniquenessQuery = $databaseHandle->exec("SELECT cn from silverbullet_certificate WHERE cn = ? AND ca_type = ?", "ss", $username, $certtype);
447 447
             // SELECT -> resource, not boolean
448 448
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $uniquenessQuery) == 0) {
Please login to merge, or discard this patch.