Code Duplication    Length = 25-25 lines in 2 locations

devices/ms/Device_W10.php 1 location

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

devices/ms/Device_W8.php 1 location

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