Code Duplication    Length = 27-27 lines in 2 locations

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");

devices/ms/Device_W10.php 1 location

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