detain/myadmin-parallels-licensing

View on GitHub
src/parallels.inc.php

Summary

Maintainability
A
1 hr
Test Coverage

Method deactivate_parallels_by_key has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function deactivate_parallels_by_key($key)
{
    myadmin_log('licenses', 'info', "Parallels Deactivation ({$key})", __LINE__, __FILE__);
    $parallels = new \Detain\Parallels\Parallels();
    $status = json_decode(file_get_contents(__DIR__.'/../../../../include/config/plesk.json'), true);
Severity: Minor
Found in src/parallels.inc.php - About 1 hr to fix

    Missing class import via use statement (line '86', column '22').
    Open

        $parallels = new \Detain\Parallels\Parallels();
    Severity: Minor
    Found in src/parallels.inc.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '138', column '14').
    Open

            (new \MyAdmin\Mail())->adminMail($subject, $msg, false, 'client/client_email.tpl');
    Severity: Minor
    Found in src/parallels.inc.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '134', column '24').
    Open

            $smartyE = new TFSmarty();
    Severity: Minor
    Found in src/parallels.inc.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '31', column '22').
    Open

        $parallels = new \Detain\Parallels\Parallels();
    Severity: Minor
    Found in src/parallels.inc.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '112', column '22').
    Open

        $parallels = new \Detain\Parallels\Parallels();
    Severity: Minor
    Found in src/parallels.inc.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    There are no issues that match your filters.

    Category
    Status