Passed
Push — release_2_0 ( 1d6b3a...504768 )
by Tomasz
09:21
created
devices/ms/Device_W8_10.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             foreach ($this->attributes['internal:consortia'] as $oneCons) {
97 97
                 $knownOiName = array_search($oneCons, CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi']);
98 98
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
99
-                    $knownOiName = $this->attributes['general:instname'][0] . " "._("Roaming Partner") . " $roamingPartner";
99
+                    $knownOiName = $this->attributes['general:instname'][0]." "._("Roaming Partner")." $roamingPartner";
100 100
                     $roamingPartner++;
101 101
                 }
102 102
                 $ssid = 'cat-passpoint-profile';
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
         if (empty($this->attributes['internal:realm'][0])) {
149 149
             $retval .= CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-domainname-fallback'];
150 150
         } else {
151
-            $retval .=  $this->attributes['internal:realm'][0];
151
+            $retval .= $this->attributes['internal:realm'][0];
152 152
         }
153 153
         $retval .= '</DomainName>';
154
-        $retval .= '<RoamingConsortium><OUI>' . $oi .
154
+        $retval .= '<RoamingConsortium><OUI>'.$oi.
155 155
             '</OUI></RoamingConsortium>';
156
-        $retval .=  '</Hotspot2>';
156
+        $retval .= '</Hotspot2>';
157 157
         return($retval);
158 158
     }
159 159
     
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
         $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
163 163
 <EapMethod>
164 164
 ';
165
-        $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' .
166
-                $this->selectedEap["OUTER"] . '</Type>
165
+        $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">'.
166
+                $this->selectedEap["OUTER"].'</Type>
167 167
 <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
168 168
 <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
169
-<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId>
169
+<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId>
170 170
 </EapMethod>
171 171
 ';
172 172
         return($profileFileCont);
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 <eapTls:ServerValidation>
178 178
 <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation>
179 179
 ';
180
-        $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>';
180
+        $profileFileCont .= '<eapTls:ServerNames>'.$this->servers.'</eapTls:ServerNames>';
181 181
         foreach ($this->caArray as $certAuthority) {
182 182
             if ($certAuthority['root']) {
183
-                $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n";
183
+                $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n";
184 184
             }
185 185
         }
186 186
         $profileFileCont .= '</eapTls:ServerValidation>
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
         $profileFileCont = '
193 193
         <ServerValidation>
194 194
 ';
195
-        $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> ';
195
+        $profileFileCont .= '<ServerNames>'.$this->servers.'</ServerNames> ';
196 196
         foreach ($this->caArray as $certAuthority) {
197 197
             if ($certAuthority['root']) {
198
-                $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n";
198
+                $profileFileCont .= "<TrustedRootCAHash>".chunk_split($certAuthority['sha1'], 2, ' ')."</TrustedRootCAHash>\n";
199 199
             }
200 200
         }
201 201
         $profileFileCont .= '<DisablePrompt>true</DisablePrompt>
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
         $profileFileCont = '
228 228
         <ServerValidation>
229 229
 <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation>
230
-<ServerNames>' . $this->servers . '</ServerNames>';
230
+<ServerNames>' . $this->servers.'</ServerNames>';
231 231
         foreach ($this->caArray as $certAuthority) {
232 232
             if ($certAuthority['root']) {
233
-                $profileFileCont .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n";
233
+                $profileFileCont .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n";
234 234
             }
235 235
         }
236 236
         $profileFileCont .= '</ServerValidation>
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         if ($this->useAnon) {
287 287
             $profileFileCont .= '<IdentityPrivacy>true</IdentityPrivacy>
288 288
 ';
289
-            $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>
289
+            $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>
290 290
                 ';
291 291
         } else {
292 292
             $profileFileCont .= '<IdentityPrivacy>false</IdentityPrivacy>
@@ -303,10 +303,10 @@  discard block
 block discarded – undo
303 303
         $profileFileCont = '
304 304
 <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
305 305
 <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata">
306
-<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID">
306
+<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID">
307 307
 
308 308
 <ProviderInfo>
309
-<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage) . '</DisplayName>
309
+<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage).'</DisplayName>
310 310
 </ProviderInfo>
311 311
 <AuthenticationMethods>
312 312
 <AuthenticationMethod>
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
             if ($this->outerUser == '') {
319 319
                 $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>';
320 320
             } else {
321
-                $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>';
321
+                $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>';
322 322
             }
323 323
         }
324 324
         $profileFileCont .= '</ClientSideCredential>
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         $profileFileCont .= $this->glTtlsServerValidation();
327 327
         $profileFileCont .= '
328 328
 <InnerAuthenticationMethod>
329
-<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'] . '</NonEAPAuthMethod>
329
+<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'].'</NonEAPAuthMethod>
330 330
 </InnerAuthenticationMethod>
331 331
 <VendorSpecific>
332 332
 <SessionResumption>false</SessionResumption>
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 <UseWinLogonCredentials>false</UseWinLogonCredentials>
358 358
 </EapType>
359 359
 </Eap>
360
-<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks>
360
+<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks>
361 361
 <RequireCryptoBinding>false</RequireCryptoBinding>
362 362
 ';
363 363
         if ($this->useAnon) {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                 $profileFileCont .= '<AnonymousUserName/>
370 370
 ';
371 371
             } else {
372
-                $profileFileCont .= '<AnonymousUserName>' . $this->outerUser . '</AnonymousUserName>
372
+                $profileFileCont .= '<AnonymousUserName>'.$this->outerUser.'</AnonymousUserName>
373 373
                 ';
374 374
             }
375 375
             $profileFileCont .= '</IdentityPrivacy>
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     private function prepareEapConfig() {
400 400
         if ($this->useAnon) {
401 401
             $this->outerUser = $this->attributes['internal:anon_local_value'][0];
402
-            $this->outerId = $this->outerUser . '@' . $this->attributes['internal:realm'][0];
402
+            $this->outerId = $this->outerUser.'@'.$this->attributes['internal:realm'][0];
403 403
         }
404 404
 
405 405
         $profileFileCont = $this->eapConfigHeader();
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             default:
425 425
                 break;
426 426
         }
427
-        return(['win' => $profileFileCont . '</EapHostConfig></EAPConfig>']);
427
+        return(['win' => $profileFileCont.'</EapHostConfig></EAPConfig>']);
428 428
     }
429 429
 
430 430
     /**
@@ -442,10 +442,10 @@  discard block
 block discarded – undo
442 442
     private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber, $oi = '') {
443 443
         $profileFileCont = '<?xml version="1.0"?>
444 444
 <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
445
-<name>' . $wlanProfileName . '</name>
445
+<name>' . $wlanProfileName.'</name>
446 446
 <SSIDConfig>
447 447
 <SSID>
448
-<name>' . $ssid . '</name>
448
+<name>' . $ssid.'</name>
449 449
 </SSID>
450 450
 <nonBroadcast>true</nonBroadcast>
451 451
 </SSIDConfig>';
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 <MSM>
458 458
 <security>
459 459
 <authEncryption>
460
-<authentication>' . $auth . '</authentication>
461
-<encryption>' . $encryption . '</encryption>
460
+<authentication>' . $auth.'</authentication>
461
+<encryption>' . $encryption.'</encryption>
462 462
 <useOneX>true</useOneX>
463 463
 </authEncryption>
464 464
 ';
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
             mkdir('w8');
486 486
         }
487 487
         $xmlFname = "w8/wlan_prof-$profileNumber.xml";
488
-        file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing);
488
+        file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing);
489 489
         $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
490 490
         $hs20 = $oi == '' ? 0 : 1;
491 491
         return("\"$wlanProfileName\" \"$encryption\" $hs20");
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
             mkdir('w8');
514 514
         }
515 515
         $xmlFname = "w8/lan_prof.xml";
516
-        file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing);
516
+        file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing);
517 517
         $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
518 518
     }
519 519
 
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         }
535 535
         foreach ($caArray as $certAuthority) {
536 536
             $store = $certAuthority['root'] ? "root" : "ca";
537
-            $fcontentsCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n";
537
+            $fcontentsCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n";
538 538
         }
539 539
         fwrite($fileHandleCerts, $fcontentsCerts);
540 540
         fclose($fileHandleCerts);
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
     private function writeMainNSH($eap, $attr) {
544 544
         $this->loggerInstance->debug(4, "writeMainNSH");
545 545
         $this->loggerInstance->debug(4, $attr);
546
-        $this->loggerInstance->debug(4, "Device_id = " . $this->device_id . "\n");
546
+        $this->loggerInstance->debug(4, "Device_id = ".$this->device_id."\n");
547 547
         $fcontents = "!define W8\n";
548 548
         if ($this->device_id == 'w10') {
549 549
             $fcontents .= "!define W10\n";
@@ -573,8 +573,8 @@  discard block
 block discarded – undo
573 573
         if ($eap == \core\common\EAP::EAPTYPE_SILVERBULLET) {
574 574
             $fcontents .= "!define SILVERBULLET\n";
575 575
         }
576
-        $fcontents .= '!define ' . $eapStr;
577
-        $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"';
576
+        $fcontents .= '!define '.$eapStr;
577
+        $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"';
578 578
         $fcontents .= $this->writeNsisDefines($attr);
579 579
         file_put_contents('main.nsh', $fcontents);
580 580
     }
Please login to merge, or discard this patch.