Code Duplication    Length = 4-4 lines in 2 locations

install/cli-install.php 1 location

@@ 1365-1368 (lines=4) @@
1362
            $category = mysqli_real_escape_string($conn, $modulePlugin[6]);
1363
            $leg_names = '';
1364
            $disabled = $modulePlugin[9];
1365
            if (array_key_exists(7, $modulePlugin)) {
1366
                // parse comma-separated legacy names and prepare them for sql IN clause
1367
                $leg_names = "'" . implode("','",
1368
                        preg_split('/\s*,\s*/', mysqli_real_escape_string($conn, $modulePlugin[7]))) . "'";
1369
            }
1370
            if (!file_exists($filecontent)) {
1371
                echo "  $name: " . $_lang['unable_install_plugin'] . " '$filecontent' " . $_lang['not_found'] . PHP_EOL;

install/src/controllers/install.php 1 location

@@ 533-536 (lines=4) @@
530
            $category = mysqli_real_escape_string($conn, $modulePlugin[6]);
531
            $leg_names = '';
532
            $disabled = $modulePlugin[9];
533
            if(array_key_exists(7, $modulePlugin)) {
534
                // parse comma-separated legacy names and prepare them for sql IN clause
535
                $leg_names = "'" . implode("','", preg_split('/\s*,\s*/', mysqli_real_escape_string($conn, $modulePlugin[7]))) . "'";
536
            }
537
            if (!file_exists($filecontent))
538
                echo "<p>&nbsp;&nbsp;$name: <span class=\"notok\">" . $_lang['unable_install_plugin'] . " '$filecontent' " . $_lang['not_found'] . ".</span></p>";
539
            else {