chamilo/chamilo-lms

View on GitHub
public/main/install/install.lib.php

Summary

Maintainability
A
0 mins
Test Coverage

The function display_requirements() has an NPath complexity of 1404. The configured NPath complexity threshold is 200.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The function display_configuration_settings_form has 15 parameters. Consider reducing the number of parameters to less than 10.
Open

function display_configuration_settings_form(
    string $installType,
    string $urlForm,
    string $languageForm,
    string $emailForm,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

The function installSettings has 10 parameters. Consider reducing the number of parameters to less than 10.
Open

function installSettings(
    $organizationName,
    $organizationUrl,
    $siteName,
    $adminEmail,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

The function finishInstallationWithContainer has 17 parameters. Consider reducing the number of parameters to less than 10.
Open

function finishInstallationWithContainer(
    $container,
    $sysPath,
    $encryptPassForm,
    $passForm,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

The function installProfileSettings() has an NPath complexity of 576. The configured NPath complexity threshold is 200.
Open

function installProfileSettings($installationProfile = '')
{
    error_log('installProfileSettings');
    if (empty($installationProfile)) {
        return false;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Avoid using undefined variables such as '$_configuration' which will lead to PHP notices.
Open

        $config = new Laminas\Config\Config($_configuration);
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Remove error control operator '@' on line 451.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Missing class import via use statement (line '1899', column '23').
Open

        $kernel = new Chamilo\Kernel($env, false);
Severity: Minor
Found in public/main/install/install.lib.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 '293', column '23').
Open

        $config = new Laminas\Config\Config($_configuration);
Severity: Minor
Found in public/main/install/install.lib.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

Remove error control operator '@' on line 1615.
Open

function rrmdir($dir)
{
    if (is_dir($dir)) {
        $objects = scandir($dir);
        foreach ($objects as $object) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 250.
Open

function set_file_folder_permissions()
{
    @chmod('.', 0755); //set permissions on install dir
    @chmod('..', 0755); //set permissions on parent dir of install dir
}
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 1613.
Open

function rrmdir($dir)
{
    if (is_dir($dir)) {
        $objects = scandir($dir);
        foreach ($objects as $object) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 459.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 743.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 249.
Open

function set_file_folder_permissions()
{
    @chmod('.', 0755); //set permissions on install dir
    @chmod('..', 0755); //set permissions on parent dir of install dir
}
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

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

            $now = new DateTime();
Severity: Minor
Found in public/main/install/install.lib.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 '1301', column '18').
Open

    $input = new Symfony\Component\Console\Input\StringInput($result);
Severity: Minor
Found in public/main/install/install.lib.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

Remove error control operator '@' on line 436.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 790.
Open

function display_license_agreement(): array
{
    $license = api_htmlentities(@file_get_contents(api_get_path(SYMFONY_SYS_PATH).'public/documentation/license.txt'));

    $activtiesList = [
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Missing class import via use statement (line '1375', column '23').
Open

            throw new \Exception("The parameter $requirement is needed in order to edit the .env file");
Severity: Minor
Found in public/main/install/install.lib.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 '1838', column '40').
Open

            $latestMigrationDate = new DateTime($result[0]['executed_at']);
Severity: Minor
Found in public/main/install/install.lib.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

Remove error control operator '@' on line 460.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 1705.
Open

function checkCanCreateFile(string $file): bool
{
    if (file_exists($file)) {
        return is_writable($file);
    }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

The method checkExtension uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                if ($optional) {
                    return [
                        'severity' => 'warning',
                        'message' => get_lang('Extension installed but not enabled'),
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid assigning values to variables in if clauses and the like (line '324', column '20').
Open

function get_config_param_from_db($param = '')
{
    $param = Database::escape_string($param);

    $schemaManager = Database::getConnection()->createSchemaManager();
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

The method displayDatabaseParameter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $inputType = 'dbPassForm' === $formFieldName ? 'password' : 'text';
        //Slightly limit the length of the database prefix to avoid having to cut down the databases names later on
        $maxLength = 'dbPrefixForm' === $formFieldName ? '15' : MAX_FORM_FIELD_LENGTH;
        if (INSTALL_TYPE_UPDATE == $installType) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method migrateSwitch uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                error_log('There was an error during running migrations. Check error.log');
                exit;
            }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method executeMigration uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $resultStatus['message'] = 'Migration completed with errors.';
            $resultStatus['progress_percentage'] = 0;
        }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method check_writable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        return Display::label(get_lang('Not writable'), 'important');
    }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method checkReadable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            return Display::label(get_lang('Not readable'), 'important');
        }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method checkExtension uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        if ($optional) {
            return [
                'severity' => 'warning',
                'message' => $returnFailure,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method checkReadable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        if ($suggestion) {
            return Display::label(get_lang('Not readable'), 'info');
        } else {
            return Display::label(get_lang('Not readable'), 'important');
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method rrmdir uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    @unlink($dir.'/'.$object);
                }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method get_config_param_from_db uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        return null;
    }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_database_settings_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            connectToDatabase(
                $dbHostForm,
                $dbUsernameForm,
                $dbPassForm,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method displayDatabaseParameter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            echo '<input
                        type="'.$inputType.'"
                        class="form-control"
                        size="'.DATABASE_FORM_FIELD_DISPLAY_LENGTH.'"
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method get_config_param uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            // Give up recovering.
            return null;
        }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_configuration_parameter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $html .= '<div class="col-sm-6">
                    <input
                        class="form-control"
                        type="text"
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method installSchemas uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        error_log('Install settings');
        // Installing schemas (filling settings table)
        $settingsManager->installSchemas($accessUrl);
    }
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid unused parameters such as '$encryptPassForm'.
Open

    $encryptPassForm,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$upgrade'.
Open

function installTools($container, $manager, $upgrade = false)
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$sysPath'.
Open

    $sysPath,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused local variables such as '$_configuration'.
Open

        $config = new Laminas\Config\Config($_configuration);
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$tableCreationWorks'.
Open

            $tableCreationWorks = false;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused parameters such as '$upgradeFromVersion'.
Open

    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$suggestion'.
Open

function check_writable($folder, $suggestion = false)
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$name'.
Open

function display_language_selection_box($name = 'language_list', $default_language = 'en_US')
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$manager'.
Open

function installTools($container, $manager, $upgrade = false)
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused local variables such as '$id'.
Open

    foreach ($settings as $id => $param) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$tableDropWorks'.
Open

            $tableDropWorks = false;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$to'.
Open

    $to = null; // if $to == null then schema will be migrated to latest version
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

The parameter $current_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $extra_notice is not named in camelCase.
Open

function displayDatabaseParameter(
    $installType,
    $parameterName,
    $formFieldName,
    $parameterValue,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $default_language is not named in camelCase.
Open

function display_language_selection_box($name = 'language_list', $default_language = 'en_US')
{
    // Displaying the box.
    return Display::select(
        'language_list',
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $wanted_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Variable "current_config_file" is not in valid camel caps format
Open

    if (!file_exists($current_config_file)) {

Consider putting global function "checkExtension" in a static class
Open

function checkExtension(

Variable "_configuration" is not in valid camel caps format
Open

    global $new_version, $_configuration;

Variable "current_version" is not in valid camel caps format
Open

        $current_version = trim($_configuration['system_version']);

Variable "current_config_file" is not in valid camel caps format
Open

    $current_config_file = api_get_path(CONFIGURATION_PATH).'configuration.php';

Variable "current_version" is not in valid camel caps format
Open

    return empty($current_version) ? false : version_compare($current_version, $new_version, '>=');

Variable "new_version" is not in valid camel caps format
Open

    global $new_version, $_configuration;

Variable "_configuration" is not in valid camel caps format
Open

        $current_version = trim($_configuration['system_version']);

Variable "_configuration" is not in valid camel caps format
Open

    if (isset($_configuration['system_version'])) {

Consider putting global function "isAlreadyInstalledSystem" in a static class
Open

function isAlreadyInstalledSystem()

Variable "new_version" is not in valid camel caps format
Open

    if (empty($new_version)) {

Variable "current_version" is not in valid camel caps format
Open

    $current_version = null;

Variable "new_version" is not in valid camel caps format
Open

    return empty($current_version) ? false : version_compare($current_version, $new_version, '>=');

Variable "current_version" is not in valid camel caps format
Open

    return empty($current_version) ? false : version_compare($current_version, $new_version, '>=');

Variable "current_config_file" is not in valid camel caps format
Open

    require $current_config_file;

Consider putting global function "getPhpSetting" in a static class
Open

function getPhpSetting($val)

Consider putting global function "display_requirements" in a static class
Open

function display_requirements(

Variable "_setting" is not in valid camel caps format
Open

    global $_setting, $originalMemoryLimit;

Missing parameter name
Open

 * @param   string  Type of install

Missing parameter name
Open

 * @param   string  Name of parameter

Variable "extra_notice" is not in valid camel caps format
Open

    $extra_notice,

Variable "a_countries" is not in valid camel caps format
Open

    return $a_countries;

Variable "current_value_string" is not in valid camel caps format
Open

        : ['severity' => 'danger', 'value' => $current_value_string];

Variable "progress_percentage" is not in valid camel caps format
Open

        $progress_percentage = ($executedMigrations / $totalMigrations) * 100;

Variable "current_step" is not in valid camel caps format
Open

    global $current_step;

Consider putting global function "display_step_sequence" in a static class
Open

function display_step_sequence()

Doc comment for parameter $upgradeFromVersion does not match actual variable name $badUpdatePath
Open

 * @param array  $upgradeFromVersion The different subversions from version 1.9

Variable "current_step" is not in valid camel caps format
Open

    return get_lang('Step'.$current_step).' &ndash; ';

Variable "fil_perm_verified" is not in valid camel caps format
Open

    $fil_perm_verified = 0666;

Variable "default_language" is not in valid camel caps format
Open

function display_language_selection_box($name = 'language_list', $default_language = 'en_US')

Variable "fil_perm_verified" is not in valid camel caps format
Open

    $filePerm = '0'.decoct($fil_perm_verified);

Variable "course_test_was_created" is not in valid camel caps format
Open

        if (!$course_test_was_created) {

Missing parameter name
Open

 * @param   string  Field value

Variable "perm_file" is not in valid camel caps format
Open

            @chmod($checked_writable, $perm_file);

Missing parameter name
Open

 * @param   bool Whether to display in update mode

Variable "permissions_for_new_files" is not in valid camel caps format
Open

        ['selected_value' => '0'.decoct($permissions_for_new_files)],

Variable "a_countries" is not in valid camel caps format
Open

    $options = array_combine($a_countries, $a_countries);

Consider putting global function "compare_setting_values" in a static class
Open

function compare_setting_values(string $current_value, string $wanted_value): array

Variable "wanted_value" is not in valid camel caps format
Open

    $wanted_value = (float) $wanted_value;

Consider putting global function "executeLexikKeyPair" in a static class
Open

function executeLexikKeyPair(\Chamilo\Kernel $kernel): void

Consider putting global function "updateEnvFile" in a static class
Open

function updateEnvFile($distFile, $envFile, $params)

Consider putting global function "finishInstallationWithContainer" in a static class
Open

function finishInstallationWithContainer(

Variable "progress_percentage" is not in valid camel caps format
Open

        'progress_percentage' => ceil($progress_percentage),

Consider putting global function "initializeEntityManager" in a static class
Open

function initializeEntityManager(): EntityManager

Consider putting global function "get_config_param_from_db" in a static class
Open

function get_config_param_from_db($param = '')

Variable "perms_fil" is not in valid camel caps format
Open

    $perms_fil = [0666, 0644, 0664, 0660, 0640, 0600];

Variable "fil_perm_verified" is not in valid camel caps format
Open

                $fil_perm_verified = $perm;

Variable "perm_file" is not in valid camel caps format
Open

        $perm_file = octdec('0666');

Variable "a_countries" is not in valid camel caps format
Open

    $a_countries = [

Consider putting global function "migrate" in a static class
Open

function migrate(EntityManager $manager)

Consider putting global function "installTools" in a static class
Open

function installTools($container, $manager, $upgrade = false)

Consider putting global function "checkPhpSetting" in a static class
Open

function checkPhpSetting(

Variable "default_language" is not in valid camel caps format
Open

        $default_language,

Variable "checked_writable" is not in valid camel caps format
Open

            @chmod($checked_writable, $perm_file);

Missing parameter name
Open

 * @param   string  Extra notice (to show on the right side)

Consider putting global function "displayDatabaseParameter" in a static class
Open

function displayDatabaseParameter(

Consider putting global function "get_countries_list_from_array" in a static class
Open

function get_countries_list_from_array($combo = false)

Variable "current_value" is not in valid camel caps format
Open

    $current_value = (float) $current_value;

Consider putting global function "upgradeWithContainer" in a static class
Open

function upgradeWithContainer($container)

Consider putting global function "installProfileSettings" in a static class
Open

function installProfileSettings($installationProfile = '')

Variable "progress_percentage" is not in valid camel caps format
Open

    $progress_percentage = 0;

Consider putting global function "executeMigration" in a static class
Open

function executeMigration(): array

Variable "dir_perm_verified" is not in valid camel caps format
Open

            $dir_perm_verified = $perm;

Variable "file_course_test_was_created" is not in valid camel caps format
Open

                $file_course_test_was_created = true;

Variable "_setting" is not in valid camel caps format
Open

    $_SESSION['permissions_for_new_directories'] = $_setting['permissions_for_new_directories'] = $dir_perm_verified;

Consider putting global function "display_database_settings_form" in a static class
Open

function display_database_settings_form(

Consider putting global function "display_configuration_parameter" in a static class
Open

function display_configuration_parameter(

Consider putting global function "lockSettings" in a static class
Open

function lockSettings()

Variable "permissions_for_new_directories" is not in valid camel caps format
Open

    $permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770;

Variable "current_value" is not in valid camel caps format
Open

    return $current_value >= $wanted_value

Variable "current_migration" is not in valid camel caps format
Open

        'current_migration' => $current_migration,

Consider putting global function "trueFalse" in a static class
Open

function trueFalse($var)

Consider putting global function "check_writable" in a static class
Open

function check_writable($folder, $suggestion = false)

Consider putting global function "get_config_param" in a static class
Open

function get_config_param($param, $updatePath = '')

Missing blank line before return statement
Open

            return $row['selected_value'];

Consider putting global function "step_active" in a static class
Open

function step_active($param)

Consider putting global function "display_language_selection_box" in a static class
Open

function display_language_selection_box($name = 'language_list', $default_language = 'en_US')

Variable "dir_perm_verified" is not in valid camel caps format
Open

    $dir_perm_verified = 0777;

Variable "perms_dir" is not in valid camel caps format
Open

    foreach ($perms_dir as $perm) {

Consider putting global function "display_license_agreement" in a static class
Open

function display_license_agreement(): array

Space before opening parenthesis of function call prohibited
Open

        fn ($country) => [$country],

Variable "current_value" is not in valid camel caps format
Open

    $current_value = (float) $current_value;

Consider putting global function "installSchemas" in a static class
Open

function installSchemas($container, $upgrade = false)

Consider putting global function "migrateSwitch" in a static class
Open

function migrateSwitch($fromVersion, $manager, $processFiles = true)

Expected 4 spaces after parameter type; 1 found
Open

 * @param int $port

Variable "course_test_was_created" is not in valid camel caps format
Open

    $course_test_was_created = false;

Variable "_setting" is not in valid camel caps format
Open

    $_SESSION['permissions_for_new_files'] = $_setting['permissions_for_new_files'] = $fil_perm_verified;

Variable "checked_writable" is not in valid camel caps format
Open

        $checked_writable = api_get_path(CONFIGURATION_PATH).'configuration.php';

Variable "wanted_value" is not in valid camel caps format
Open

    $wanted_value = (float) $wanted_value;

Variable "current_migration" is not in valid camel caps format
Open

    $current_migration = $connection->createQueryBuilder()

Variable "_configuration" is not in valid camel caps format
Open

        $config = new Laminas\Config\Config($_configuration);

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

{

Variable "checked_writable" is not in valid camel caps format
Open

        if (file_exists($checked_writable) && !is_writable($checked_writable)) {

Variable "permissions_for_new_files" is not in valid camel caps format
Open

    $permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660;

Variable "wanted_value" is not in valid camel caps format
Open

function compare_setting_values(string $current_value, string $wanted_value): array

Variable "current_value_string" is not in valid camel caps format
Open

        ? ['severity' => 'success', 'value' => $current_value_string]

Consider putting global function "installSettings" in a static class
Open

function installSettings(

Variable "current_step" is not in valid camel caps format
Open

    global $current_step;

Variable "file_course_test_was_created" is not in valid camel caps format
Open

            if ($file_course_test_was_created) {

Variable "a_countries" is not in valid camel caps format
Open

    $options = array_combine($a_countries, $a_countries);

Variable "permissions_for_new_directories" is not in valid camel caps format
Open

        ['selected_value' => '0'.decoct($permissions_for_new_directories)],

Missing function doc comment
Open

function compare_setting_values(string $current_value, string $wanted_value): array

Consider putting global function "set_file_folder_permissions" in a static class
Open

function set_file_folder_permissions()

Variable "file_course_test_was_created" is not in valid camel caps format
Open

    $file_course_test_was_created = false;

Consider putting global function "generateRandomToken" in a static class
Open

function generateRandomToken()

Consider putting global function "checkCanCreateFile" in a static class
Open

function checkCanCreateFile(string $file): bool

Missing blank line before return statement
Open

    return $result['version'] ?? '';

Blank line found at end of control structure
Open


Consider putting global function "connectToDatabase" in a static class
Open

function connectToDatabase(

Variable "perms_fil" is not in valid camel caps format
Open

        foreach ($perms_fil as $perm) {

Variable "checked_writable" is not in valid camel caps format
Open

        if (file_exists($checked_writable) && !is_writable($checked_writable)) {

Variable "extra_notice" is not in valid camel caps format
Open

                    '.$extra_notice.'

Variable "current_value" is not in valid camel caps format
Open

    $current_value_string = $current_value;

Consider putting global function "rrmdir" in a static class
Open

function rrmdir($dir)

Variable "perms_dir" is not in valid camel caps format
Open

    $perms_dir = [0777, 0755, 0775, 0770, 0750, 0700];

Variable "dir_perm_verified" is not in valid camel caps format
Open

    $_SESSION['permissions_for_new_directories'] = $_setting['permissions_for_new_directories'] = $dir_perm_verified;

Variable "dir_perm_verified" is not in valid camel caps format
Open

    $dirPerm = '0'.decoct($dir_perm_verified);

Missing parameter name
Open

 * @param   string  Additional attribute for the <tr> element

Missing parameter name
Open

 * @param $dir

Consider putting global function "isVersionTableValid" in a static class
Open

function isVersionTableValid($connection): bool

Consider putting global function "getLastExecutedMigration" in a static class
Open

function getLastExecutedMigration(Connection $connection): string

Variable "checked_writable" is not in valid camel caps format
Open

            $notWritable[] = $checked_writable;

Consider putting global function "display_configuration_settings_form" in a static class
Open

function display_configuration_settings_form(

Consider putting global function "updateDirAndFilesPermissions" in a static class
Open

function updateDirAndFilesPermissions()

Variable "wanted_value" is not in valid camel caps format
Open

    return $current_value >= $wanted_value

Missing function doc comment
Open

function installTools($container, $manager, $upgrade = false)

Consider putting global function "checkMigrationStatus" in a static class
Open

function checkMigrationStatus(): array

Consider putting global function "checkPhpSettingExists" in a static class
Open

function checkPhpSettingExists($phpSetting)

Doc comment for parameter $updatePath does not match actual variable name $installType
Open

 * @param string $updatePath         The updatePath given (if given)

Variable "fil_perm_verified" is not in valid camel caps format
Open

    $_SESSION['permissions_for_new_files'] = $_setting['permissions_for_new_files'] = $fil_perm_verified;

Variable "current_value" is not in valid camel caps format
Open

function compare_setting_values(string $current_value, string $wanted_value): array

Consider putting global function "checkReadable" in a static class
Open

function checkReadable($folder, $suggestion = false)

Variable "current_step" is not in valid camel caps format
Open

    if ($param == $current_step) {

Variable "course_test_was_created" is not in valid camel caps format
Open

            $course_test_was_created = true;

Missing parameter name
Open

 * @param   string  Field name (in the HTML form)

Variable "current_value_string" is not in valid camel caps format
Open

    $current_value_string = $current_value;

Variable "selected_value" is not in valid camel caps format
Open

            ['selected_value' => $param->selected_value],

Consider putting global function "isUpdateAvailable" in a static class
Open

function isUpdateAvailable(): bool

Arguments with default values must be at the end of the argument list
Open

    \Chamilo\Kernel $kernel

Space before opening parenthesis of function call prohibited
Open

        fn ($country) => [$country],

The variable $_configuration is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_configuration is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $new_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $new_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_config_file is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_config_file is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_config_file is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $checked_writable is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $perms_fil is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $a_countries is not named in camelCase.
Open

function get_countries_list_from_array($combo = false)
{
    $a_countries = [
        'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan',
        'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi',
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_migration is not named in camelCase.
Open

function checkMigrationStatus(): array
{
    Database::setManager(initializeEntityManager());
    $manager = Database::getManager();
    $connection = $manager->getConnection();
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $fil_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $perms_dir is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $fil_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $extra_notice is not named in camelCase.
Open

function displayDatabaseParameter(
    $installType,
    $parameterName,
    $formFieldName,
    $parameterValue,
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $permissions_for_new_directories is not named in camelCase.
Open

function updateDirAndFilesPermissions()
{
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
    $permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770;
    $permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $wanted_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_step is not named in camelCase.
Open

function display_step_sequence()
{
    global $current_step;

    return get_lang('Step'.$current_step).' &ndash; ';
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $perms_dir is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $dir_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $checked_writable is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $a_countries is not named in camelCase.
Open

function get_countries_list_from_array($combo = false)
{
    $a_countries = [
        'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan',
        'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi',
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value_string is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $progress_percentage is not named in camelCase.
Open

function checkMigrationStatus(): array
{
    Database::setManager(initializeEntityManager());
    $manager = Database::getManager();
    $connection = $manager->getConnection();
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $fil_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_setting is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $permissions_for_new_directories is not named in camelCase.
Open

function updateDirAndFilesPermissions()
{
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
    $permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770;
    $permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_step is not named in camelCase.
Open

function step_active($param)
{
    global $current_step;
    if ($param == $current_step) {
        echo 'install-steps__step--active';
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $dir_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_course_test_was_created is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $dir_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_course_test_was_created is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_setting is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $fil_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_test_was_created is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $a_countries is not named in camelCase.
Open

function get_countries_list_from_array($combo = false)
{
    $a_countries = [
        'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan',
        'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi',
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $checked_writable is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_setting is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $dir_perm_verified is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $permissions_for_new_files is not named in camelCase.
Open

function updateDirAndFilesPermissions()
{
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
    $permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770;
    $permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $new_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_step is not named in camelCase.
Open

function step_active($param)
{
    global $current_step;
    if ($param == $current_step) {
        echo 'install-steps__step--active';
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_step is not named in camelCase.
Open

function display_step_sequence()
{
    global $current_step;

    return get_lang('Step'.$current_step).' &ndash; ';
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_test_was_created is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_course_test_was_created is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $checked_writable is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $a_countries is not named in camelCase.
Open

function get_countries_list_from_array($combo = false)
{
    $a_countries = [
        'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan',
        'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi',
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value_string is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_version is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $perms_fil is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $permissions_for_new_files is not named in camelCase.
Open

function updateDirAndFilesPermissions()
{
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
    $permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770;
    $permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $progress_percentage is not named in camelCase.
Open

function checkMigrationStatus(): array
{
    Database::setManager(initializeEntityManager());
    $manager = Database::getManager();
    $connection = $manager->getConnection();
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_configuration is not named in camelCase.
Open

function get_config_param($param, $updatePath = '')
{
    global $updateFromConfigFile;
    if (empty($updatePath) && !empty($_POST['updatePath'])) {
        $updatePath = $_POST['updatePath'];
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $checked_writable is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $wanted_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value_string is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $default_language is not named in camelCase.
Open

function display_language_selection_box($name = 'language_list', $default_language = 'en_US')
{
    // Displaying the box.
    return Display::select(
        'language_list',
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $perm_file is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $wanted_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_migration is not named in camelCase.
Open

function checkMigrationStatus(): array
{
    Database::setManager(initializeEntityManager());
    $manager = Database::getManager();
    $connection = $manager->getConnection();
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_configuration is not named in camelCase.
Open

function isAlreadyInstalledSystem()
{
    global $new_version, $_configuration;

    if (empty($new_version)) {
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_test_was_created is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $perm_file is not named in camelCase.
Open

function display_requirements(
    string $installType,
    bool $badUpdatePath,
    string $updatePath = '',
    array $upgradeFromVersion = []
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_value is not named in camelCase.
Open

function compare_setting_values(string $current_value, string $wanted_value): array
{
    $current_value_string = $current_value;
    $current_value = (float) $current_value;
    $wanted_value = (float) $wanted_value;
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $progress_percentage is not named in camelCase.
Open

function checkMigrationStatus(): array
{
    Database::setManager(initializeEntityManager());
    $manager = Database::getManager();
    $connection = $manager->getConnection();
Severity: Minor
Found in public/main/install/install.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status