Code Duplication    Length = 27-27 lines in 2 locations

devices/ms/Device_W10.php 1 location

@@ 406-432 (lines=27) @@
403
        return("\"$wlanProfileName\" \"$encryption\"");
404
    }
405
406
    private function writeLANprofile($eapConfig) {
407
        $profileFileCont = '<?xml version="1.0"?>
408
<LANProfile xmlns="http://www.microsoft.com/networking/LAN/profile/v1">
409
<MSM>
410
<security>
411
<OneXEnforced>false</OneXEnforced>
412
<OneXEnabled>true</OneXEnabled>
413
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
414
<cacheUserData>true</cacheUserData>
415
<authMode>user</authMode>
416
';
417
        $closing = '
418
</OneX>
419
</security>
420
</MSM>
421
</LANProfile>
422
';
423
424
        if (!is_dir('w8')) {
425
            mkdir('w8');
426
        }
427
        $xmlFname = "w8/lan_prof.xml";
428
        $xmlF = fopen($xmlFname, 'w');
429
        fwrite($xmlF, $profileFileCont . $eapConfig['w10'] . $closing);
430
        fclose($xmlF);
431
        $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
432
    }
433
434
    private function writeMainNSH($eap, $attr) {
435
        $this->loggerInstance->debug(4, "writeMainNSH");

devices/ms/Device_W8.php 1 location

@@ 345-371 (lines=27) @@
342
        return("\"$wlanProfileName\" \"$encryption\"");
343
    }
344
345
    private function writeLANprofile($eapConfig) {
346
        $profileFileCont = '<?xml version="1.0"?>
347
<LANProfile xmlns="http://www.microsoft.com/networking/LAN/profile/v1">
348
<MSM>
349
<security>
350
<OneXEnforced>false</OneXEnforced>
351
<OneXEnabled>true</OneXEnabled>
352
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
353
<cacheUserData>true</cacheUserData>
354
<authMode>user</authMode>
355
';
356
        $closing = '
357
</OneX>
358
</security>
359
</MSM>
360
</LANProfile>
361
';
362
363
        if (!is_dir('w8')) {
364
            mkdir('w8');
365
        }
366
        $xmlFname = "w8/lan_prof.xml";
367
        $xmlF = fopen($xmlFname, 'w');
368
        fwrite($xmlF, $profileFileCont . $eapConfig['w8'] . $closing);
369
        fclose($xmlF);
370
        $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
371
    }
372
373
    private function writeMainNSH($eap, $attr) {
374
        $this->loggerInstance->debug(4, "writeMainNSH");