chamilo/chamilo-lms

View on GitHub
public/main/admin/settings.lib.php

Summary

Maintainability
A
0 mins
Test Coverage

The function generateSettingsForm() has an NPath complexity of 4527044. The configured NPath complexity threshold is 200.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 uploadStylesheet() has an NPath complexity of 2736. The configured NPath complexity threshold is 200.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 addEditTemplate() has an NPath complexity of 3648. The configured NPath complexity threshold is 200.
Open

function addEditTemplate()
{
    $em = Database::getManager();
    $id = isset($_GET['id']) ? (int) $_GET['id'] : 0;

Severity: Minor
Found in public/main/admin/settings.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 '$xapianPath' which will lead to PHP notices.
Open

        $data[] = [get_lang('Is writable').' - '.$xapianPath, $dir_is_writable];
Severity: Minor
Found in public/main/admin/settings.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

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

        $defaults['comment'] = $template->getComment();
Severity: Minor
Found in public/main/admin/settings.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

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

        $default_values['search_show_unlinked_results'] = api_get_setting('search_show_unlinked_results');
Severity: Minor
Found in public/main/admin/settings.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

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

    $default_values['search_enabled'] = $search_enabled;
Severity: Minor
Found in public/main/admin/settings.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

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

    $form->setDefaults($default_values);
Severity: Minor
Found in public/main/admin/settings.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

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

        $defaults['template_id'] = $id;
Severity: Minor
Found in public/main/admin/settings.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

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

        if (!is_writable($xapianPath)) {
Severity: Minor
Found in public/main/admin/settings.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

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

        $defaults['title'] = $template->getTitle();
Severity: Minor
Found in public/main/admin/settings.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

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

        $table = new SortableTableFromArray($data2);
Severity: Minor
Found in public/main/admin/settings.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

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

        $defaults['template_text'] = $template->getContent();
Severity: Minor
Found in public/main/admin/settings.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

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

        $form->setDefaults($defaults);
Severity: Minor
Found in public/main/admin/settings.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

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

            $default_values['search_prefilter_prefix'] = api_get_setting('search_prefilter_prefix');
Severity: Minor
Found in public/main/admin/settings.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

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

        if (!is_dir($xapianPath)) {
Severity: Minor
Found in public/main/admin/settings.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

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

        $data[] = [get_lang('The directory exists').' - '.$xapianPath, $dir_exists];
Severity: Minor
Found in public/main/admin/settings.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

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

            $data2[] = [$program, $output[0], $icon];
Severity: Minor
Found in public/main/admin/settings.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

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

    $plugin_obj = new AppPlugin();
Severity: Minor
Found in public/main/admin/settings.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 361.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 '443', column '22').
Open

    $appPlugin = new AppPlugin();
Severity: Minor
Found in public/main/admin/settings.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 1052.
Open

function deleteTemplate($id)
{
    $id = intval($id);
    // First we remove the image.
    $table = Database::get_main_table('system_template');
Severity: Minor
Found in public/main/admin/settings.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 '493', column '17').
Open

    $form = new FormValidator(
Severity: Minor
Found in public/main/admin/settings.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 '702', column '18').
Open

    $table = new SortableTable(
Severity: Minor
Found in public/main/admin/settings.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 '406', column '23').
Open

    $plugin_obj = new AppPlugin();
Severity: Minor
Found in public/main/admin/settings.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 '1557', column '18').
Open

    $table = new SortableTableFromArray($data);
Severity: Minor
Found in public/main/admin/settings.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 '1613', column '20').
Open

        $zip = new PclZip($arch);
Severity: Minor
Found in public/main/admin/settings.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 '841', column '17').
Open

    $form = new FormValidator(
Severity: Minor
Found in public/main/admin/settings.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 '46', column '23').
Open

    $plugin_obj = new AppPlugin();
Severity: Minor
Found in public/main/admin/settings.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 '305', column '20').
Open

        $zip = new ZipArchive();
Severity: Minor
Found in public/main/admin/settings.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 '1081', column '17').
Open

    $form = new FormValidator(
Severity: Minor
Found in public/main/admin/settings.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 '1586', column '22').
Open

        $table = new SortableTableFromArray($data2);
Severity: Minor
Found in public/main/admin/settings.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

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

            } else {
                $pluginRow .= '<tr class="whitespace-nowrap">';
            }
Severity: Minor
Found in public/main/admin/settings.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 handleSearch uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $form->addElement(
                'select',
                'search_prefilter_prefix',
                [get_lang('Specific Field for prefilter'), $url],
Severity: Minor
Found in public/main/admin/settings.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 searchImageFilter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        return '<img src="'.api_get_path(WEB_PUBLIC_PATH).'img/template_thumb/noimage.gif" alt="'.get_lang('NoTemplate preview').'"/>';
    }
Severity: Minor
Found in public/main/admin/settings.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 handleRegions uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                echo '<tr>';
            }
Severity: Minor
Found in public/main/admin/settings.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 getCategorySettings uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $settings_by_access_list[$row['variable']][$row['subkey']][$row['category']] = [];
                }
Severity: Minor
Found in public/main/admin/settings.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 addEditTemplate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $title = get_lang('Template edition');
    }
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                        } else {
                            $form->addElement(
                                'html',
                                '<div class="float-right">'.
                                Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon-disabled', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</div>'
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $hideme['class'] = 'col-md-4';
                    $hideme['aria-label'] = get_lang($row['title']);
                    $form->addElement(
                        'text',
Severity: Minor
Found in public/main/admin/settings.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 handlePlugins uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $notInstalled .= $pluginRow;
            }
Severity: Minor
Found in public/main/admin/settings.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 addEditTemplate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $templateContent = '<head>'.$viewport.'<title>'.$values['title'].'</title>'.$bootstrap.'</head>'
                    .$values['template_text'];

                $template
Severity: Minor
Found in public/main/admin/settings.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 uploadStylesheet uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            echo Display::return_message(get_lang('Error reading ZIP file').$info['extension'], 'error', false);
        }
Severity: Minor
Found in public/main/admin/settings.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 handleTemplates uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        if ('delete' == $action && is_numeric($_GET['id'])) {
            deleteTemplate($_GET['id']);

            // Add event to the system log
Severity: Minor
Found in public/main/admin/settings.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 searchSetting uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $found = true;
                }
Severity: Minor
Found in public/main/admin/settings.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 getCategorySettings uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $url_info = api_get_access_url($url_id);
        if (1 == $url_info['active']) {
            $categoryToSearch = $category;
            if ('search_setting' == $category) {
Severity: Minor
Found in public/main/admin/settings.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 showSearchToolsStatusTable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        echo Display::return_message(
            get_lang('You are using Chamilo in a Windows platform, sadly you can\'t convert documents in order to search the content using this tool'),
            'warning'
        );
Severity: Minor
Found in public/main/admin/settings.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 uploadStylesheet uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $extraction_path = $cssToUpload.$style_name.'/';
                    $mode = api_get_permissions_for_new_directories();
                    for ($i = 0; $i < $num_files; $i++) {
                        $entry = $zip->getNameIndex($i);
Severity: Minor
Found in public/main/admin/settings.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 handleRegions uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                if ($isAdminPlugin) {
                    $region_list['menu_administrator'] = 'menu_administrator';
                }
                if ($isCoursePlugin) {
Severity: Minor
Found in public/main/admin/settings.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 handlePlugins uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $pluginRow .= '<input type="checkbox" name="plugin_'.$pluginName.'[]" class="border rounded">';
            }
Severity: Minor
Found in public/main/admin/settings.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 uploadStylesheet uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        // Simply move the file.
        move_uploaded_file($picture['tmp_name'], $cssToUpload.$style_name.'/'.$picture['name']);
        $result = true;
    }
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                        } else {
                            $form->addElement(
                                'html',
                                '<div class="float-right"><a class="share_this_setting" data_status = "1" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
                                Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon-disabled', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</a></div>'
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        if ('true' === $rowkeys['selected_value'] && !$form->isSubmitted()) {
                            $element->setChecked(true);
                        }
                    }
Severity: Minor
Found in public/main/admin/settings.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 searchSetting uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $found = true;
            }
Severity: Minor
Found in public/main/admin/settings.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 generateCSSDownloadLink uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        echo Display::return_message(get_lang('The file was not found'), 'warning');
    }
Severity: Minor
Found in public/main/admin/settings.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 storePlugins uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $remove_plugins = $plugin_list;
    }
Severity: Minor
Found in public/main/admin/settings.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 addEditTemplate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $form->addElement(
                'static',
                'template_image_preview',
                '',
Severity: Minor
Found in public/main/admin/settings.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 searchSetting uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $found = true;
                    }
Severity: Minor
Found in public/main/admin/settings.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 addEditTemplate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $token = Security::get_token();
        $form->addElement('hidden', 'sec_token');
        $form->setConstants(['sec_token' => $token]);
        // Display the form.
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        if ('1' == $row['access_url_changeable']) {
                            $form->addElement(
                                'html',
                                '<div class="float-right">'.
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $form->addElement(
                        'textarea',
                        $row['variable'],
                        [get_lang($row['title']),
Severity: Minor
Found in public/main/admin/settings.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 uploadStylesheet uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                // If the zip does not contain a single directory, extract it.
                if (!$single_directory) {
                    // Extract zip file.
                    $zip->extractTo($cssToUpload.$style_name.'/');
Severity: Minor
Found in public/main/admin/settings.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 local variables such as '$key'.
Open

        foreach ($values as $key => $value) {
Severity: Minor
Found in public/main/admin/settings.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 '$i'.
Open

    $i = 0;
Severity: Minor
Found in public/main/admin/settings.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 '$key'.
Open

                    foreach ($values as $key => $value) {
Severity: Minor
Found in public/main/admin/settings.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 $number_of_items is not named in camelCase.
Open

function getTemplateData($from, $number_of_items, $column, $direction)
{
    // Database table definition.
    $table_system_template = Database::get_main_table('system_template');

Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 "plugin_item" is not in valid camel caps format
Open

    foreach ($my_plugin_list as $plugin_item) {

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

    unset($plugin_region_list['course_tool_plugin']);

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

            $isAdminPlugin = isset($plugin_info['is_admin_plugin']) && $plugin_info['is_admin_plugin'];

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

            $isCoursePlugin = isset($plugin_info['is_course_plugin']) && $plugin_info['is_course_plugin'];

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

        if (file_exists($plugin_info_file)) {

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

    foreach ($my_plugin_list as $plugin_item) {

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

        $plugin_region_list[$plugin_item] = $plugin_item;

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

    foreach ($installed_plugins as $pluginName) {

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

        $plugin_region_list[$plugin_item] = $plugin_item;

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

            $plugin_info = [];

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

            $selected_plugins = $plugin_obj->get_areas_by_plugin($pluginName);

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

            echo '<h4>'.$plugin_info['title'].' <small>v'.$plugin_info['version'].'</small></h4>';

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

    $installed_plugins = $plugin_obj->getInstalledPlugins();

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

    $plugin_region_list = [];

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

            echo '<h4>'.$plugin_info['title'].' <small>v'.$plugin_info['version'].'</small></h4>';

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

            $region_list = [];

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

            $isAdminPlugin = isset($plugin_info['is_admin_plugin']) && $plugin_info['is_admin_plugin'];

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

function handleRegions()

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

    $plugin_obj = new AppPlugin();

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

    $my_plugin_list = $plugin_obj->getPluginRegions();

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

        $user_id = api_get_user_id();

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

            $user_id

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

        $plugin_info_file = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/plugin.php';

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

            $selected_plugins = $plugin_obj->get_areas_by_plugin($pluginName);

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

    $my_plugin_list = $plugin_obj->getPluginRegions();

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

        $plugin_region_list[$plugin_item] = $plugin_item;

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

    $installed_plugins = $plugin_obj->getInstalledPlugins();

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

            require $plugin_info_file;

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

            echo '<p>'.$plugin_info['comment'].'</p>';

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

            $isCoursePlugin = isset($plugin_info['is_course_plugin']) && $plugin_info['is_course_plugin'];

Missing function doc comment
Open

function handleExtensions()

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

            if (in_array($pluginName, $installed_plugins)) {

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

                foreach ($invalid_files as $invalid_file) {

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

                    $error_string .= '<li>'.$invalid_file.'</li>';

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

                                @mkdir($extraction_path.dirname($entry_without_first_dir), $mode, true);

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

                        $plugin_obj->add_to_region($plugin, $region);

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

        $remove_plugins = array_diff($plugin_list, $installed_plugins);

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

        $remove_plugins = $plugin_list;

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

        echo Display::return_message($SettingsStored, 'confirm');

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

            $dir_exists = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Error'));

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

function getTemplateData($from, $number_of_items, $column, $direction)

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

                $region_list = $plugin_region_list;

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

        $user_id = api_get_user_id();

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

            if (in_array($pluginName, $installed_plugins)) {

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

                                @mkdir($extraction_path.dirname($entry_without_first_dir), $mode, true);

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

        $remove_plugins = array_diff($plugin_list, $installed_plugins);

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

function isStyle($style)

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

function deleteTemplate($id)

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

            $single_directory = true;

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

            $invalid_files = [];

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

                $error_string .= '</ul>';

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

    $installed_plugins = $plugin_obj->getInstalledPlugins();

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

    $specific_fields = get_specific_field_list();

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

            $default_values['search_prefilter_prefix'] = api_get_setting('search_prefilter_prefix');

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

function getTemplateData($from, $number_of_items, $column, $direction)

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

    $table_system_template = Database::get_main_table('system_template');

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

                $region_list,

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

    $all_plugins = $plugin_obj->read_plugins_from_path();

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

    $all_plugins = $plugin_obj->read_plugins_from_path();

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

            if (in_array($pluginName, $installed_plugins)) {

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

                    get_lang('The only accepted extensions in the ZIP file are .jp(e)g, .png, .gif and .css.').$error_string,

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

                    $extraction_path = $cssToUpload.$style_name.'/';

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

        move_uploaded_file($picture['tmp_name'], $cssToUpload.$style_name.'/'.$picture['name']);

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

            $installed_plugins[] = $plugin;

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

        setConfigurationSettingsInDatabase($formValues, $_configuration['access_url']);

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

        $search_enabled = $formValues['search_enabled'];

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

                $user_id

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

    $number_of_items = (int) $number_of_items;

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

            $pluginRow .= '<p>'.get_lang('Author').': '.$plugin_info['author'].'</p>';

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

                    $single_directory = false;

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

                    for ($i = 0; $i < $num_files; $i++) {

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

                        $entry_without_first_dir = substr($entry, $pos_slash + 1);

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

                        $ofp = fopen($extraction_path.dirname($entry_without_first_dir).'/'.basename($entry), 'w');

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

        foreach ($installed_plugins as $plugin) {

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

    foreach ($plugin_list as $plugin) {

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

function storePlugins()

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

            $sf_values[$sf['code']] = $sf['name'];

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

function deleteTemplateImage($id)

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

                $region_list = $plugin_region_list;

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

                    $error_string .= '<li>'.$invalid_file.'</li>';

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

            $areas_to_installed = $_POST['plugin_'.$plugin];

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

                $plugin_obj->removeAllRegions($plugin);

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

    global $SettingsStored, $_configuration;

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

        $sf_values = [];

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

            $pluginRow .= '<p>'.$plugin_info['comment'].'</p>';

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

                        'data-title' => $plugin_info['title'],

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

function uploadStylesheet($values, $picture)

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

                    if (!in_array($path_parts['extension'], $allowedFiles)) {

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

    $installed_plugins = [];

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

    foreach ($remove_plugins as $plugin) {

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

        if (empty($specific_fields)) {

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

function getNumberOfTemplates()

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

function actionsFilter($id)

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

function searchImageFilter(int $id): string

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

function handleExtensions()

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

    $plugin_obj = new AppPlugin();

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

    $installed_plugins = $plugin_obj->getInstalledPlugins();

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

                    $path_parts = pathinfo($file['name']);

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

        $dir_is_writable = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));

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

            $user_id

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

                    $region_list['course_tool_plugin'] = 'course_tool_plugin';

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

    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);

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

            $num_files = $zip->numFiles;

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

                foreach ($invalid_files as $invalid_file) {

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

                        $entry_without_first_dir = substr($entry, $pos_slash + 1);

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

    $plugin_obj = new AppPlugin();

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

    $installed_plugins = $plugin_obj->getInstalledPlugins();

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

            if (!empty($areas_to_installed)) {

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

    if (!empty($installed_plugins)) {

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

    global $SettingsStored, $_configuration;

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

    $form->setDefaults($default_values);

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

        if (file_exists($plugin_info_file)) {

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

                        'data-title' => $plugin_info['title'],

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

        mkdir($cssToUpload.$style_name.'/', api_get_permissions_for_new_directories());

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

        $remove_plugins = array_diff($plugin_list, $installed_plugins);

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

                $sf_values,

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

    $default_values['search_enabled'] = $search_enabled;

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

function addEditTemplate()

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

            $user_id

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

            $pluginRow .= '<h3 class="text-3xl font-normal leading-normal mt-0 mb-2">'.$plugin_info['title'].' <small>v '.$plugin_info['version'].'</small></h3>';

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

                        if (false !== strpos($entry_without_first_dir, '/')) {

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

                            if (!is_dir($extraction_path.dirname($entry_without_first_dir))) {

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

                        $ofp = fopen($extraction_path.dirname($entry_without_first_dir).'/'.basename($entry), 'w');

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

function storeRegions()

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

    if (!empty($installed_plugins)) {

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

    $plugin_list = $plugin_obj->read_plugins_from_path();

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

        $default_values['search_show_unlinked_results'] = api_get_setting('search_show_unlinked_results');

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

        $data[] = [get_lang('Is writable').' - '.$xapianPath, $dir_is_writable];

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

    $number_of_items = (int) $number_of_items;

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

    $installed_plugins = $plugin_obj->getInstalledPlugins();

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

    foreach ($all_plugins as $pluginName) {

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

        $plugin_info_file = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/plugin.php';

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

                if (!$single_directory) {

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

    $shortlist_installed = [];

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

                $shortlist_installed[] = $plugin['subkey'];

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

    foreach ($plugin_list as $plugin) {

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

    if ('true' == $search_enabled) {

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

            $specific_fields_exists = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Add a specific search field')

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

            $user_id = api_get_user_id();

Missing function doc comment
Open

function searchImageFilter(int $id): string

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

function handlePlugins()

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

            require $plugin_info_file;

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

            if (in_array($pluginName, $installed_plugins)) {

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

    if (!is_dir($cssToUpload.$style_name.'/')) {

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

                    $zip->extractTo($cssToUpload.$style_name.'/');

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

                        $pos_slash = strpos($entry, '/');

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

                            if (!is_dir($extraction_path.dirname($entry_without_first_dir))) {

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

    if (empty($style_name) || is_array($style_name)) {

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

    $plugin_list = $plugin_obj->read_plugins_from_path();

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

function handleSearch()

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

                foreach ($areas_to_installed as $region) {

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

    $search_enabled = api_get_setting('search_enabled');

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

        $data[] = [get_lang('Available custom search fields'), $specific_fields_exists];

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

    $plugin_list = $appPlugin->read_plugins_from_path();

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

    $sql .= " LIMIT $from,$number_of_items";

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

        $remove_plugins = $plugin_list;

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

    $search_enabled = api_get_setting('search_enabled');

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

        if (empty($sf_values)) {

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

    $default_values['search_enabled'] = $search_enabled;

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

function displayTemplates()

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

    $sql = "SELECT id as col0, title as col1, id as col2 FROM $table_system_template";

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

                $selected_plugins,

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

    if ('true' == $search_enabled) {

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

        foreach ($specific_fields as $sf) {

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

        $dir_exists = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));

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

        $specific_fields_exists = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));

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

            $dir_is_writable = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Error'));

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

        $data[] = [get_lang('The directory exists').' - '.$xapianPath, $dir_exists];

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

                    $region_list['menu_administrator'] = 'menu_administrator';

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

            $plugin_info = [];

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

            $pluginRow .= '<h3 class="text-3xl font-normal leading-normal mt-0 mb-2">'.$plugin_info['title'].' <small>v '.$plugin_info['version'].'</small></h3>';

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

    if (empty($style_name) || is_array($style_name)) {

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

            for ($i = 0; $i < $num_files; $i++) {

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

                        $invalid_files[] = $file['name'];

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

                $error_string = '<ul>';

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

                    $extraction_path = $cssToUpload.$style_name.'/';

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

function handleTemplates()

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

        $user_id = api_get_user_id();

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

    $url_info = api_get_access_url($url_id);

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

                if (in_array($row['variable'], $convert_byte_to_mega_list)) {

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

                    $default_values[$row['variable']] = $row['selected_value'];

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

function generateSettingsForm($settings, $settings_by_access_list)

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

    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;

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

    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;

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

    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);

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

            } elseif (1 == $url_info['active']) {

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

        $form->setDefaults($default_values);

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

    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);

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

        if (1 != $_configuration['access_url']) {

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

                    if ('' != $settings_by_access_list[$row['variable']][$row['subkey']][$row['category']]['selected_value']) {

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

                        $access_url = $_configuration['access_url'];

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

                            $access_url = 1;

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

                    $form->addElement('html', '<div style="max-height:100px; max-width:100px; margin-left:162px; margin-bottom:10px; clear:both;"><img src="'.$url.'" style="margin-bottom:10px;" />'.$delete_url.'</div>');

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

function showSearchSettingsTable($data)

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

        $url_info = api_get_access_url($url_id);

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

    $url_info = api_get_access_url($url_id);

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

                                    access_url =  $access_url";

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

                        if ('true' === $row_access['selected_value'] && !$form->isSubmitted()) {

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

            $settings_by_access = api_get_settings($categoryToSearch, 'group', $url_id, 1);

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

        $hide_element = false;

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

                        $row['selected_value'] = $settings_by_access_list[$row['variable']][$row['subkey']][$row['category']]['selected_value'];

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

    if (1 == $url_id) {

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

                    if (1 == $url_id) {

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

                    $default_values[$row['variable']] = $value;

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

            exec("which $program", $output, $ret_val);

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

    $url_id = api_get_current_access_url_id();

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

        $url_info = api_get_access_url($url_id);

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

                    $allowed_picture_types

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

                        if (empty($access_url)) {

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

                        $row_access = Database::fetch_array($result_access);

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

function setConfigurationSettingsInDatabase($parameters, $accessUrl)

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

    $settings_by_access_list = [];

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

    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;

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

                $hide_element = true;

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

                    $default_values[$row['variable']] = $value;

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

function getAllowedFileTypes()

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

function generateCSSDownloadLink($style)

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

function generateSettingsForm($settings, $settings_by_access_list)

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

                if (isset($settings_by_access_list[$row['variable']]) &&

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

                    isset($settings_by_access_list[$row['variable']][$row['subkey']]) &&

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

                    $default_values[$row['variable']] = round($row['selected_value'] / 1024 / 1024, 1);

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

                $default_values[$row['variable']] = $row['selected_value'];

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

                    $delete_url = '<a href="?delete_watermark">'.get_lang('Remove picture').' '.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Remove picture')).'</a>';

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

    $sql = "SELECT * FROM $table_settings_current

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

                    $default_values[$row['variable']] = $row['selected_value'];

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

                $allowed_picture_types = ['jpg', 'jpeg', 'png', 'gif'];

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

function searchSetting($search)

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

        $settings = api_get_settings($category, 'group', $url_id);

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

                    $settings_by_access_list[$row['variable']][$row['subkey']][$row['category']] = $row;

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

                    is_array($settings_by_access_list[$row['variable']][$row['subkey']][$row['category']])

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

                        $row_access = Database::fetch_array($result_access);

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

        $list_of_programs = ['pdftotext', 'ps2pdf', 'catdoc', 'html2text', 'unrtf', 'catppt', 'xls2csv'];

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

        foreach ($list_of_programs as $program) {

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

function getCategorySettings($category = '')

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

        if (1 == $url_info['active']) {

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

        if (in_array($row['variable'], array_keys($settings_to_avoid))) {

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

                    $default_values[$row['variable']] = $row['selected_value'];

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

                        $sql = "SELECT selected_value FROM $table_settings_current

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

                $default_values[$row['variable']] = $row['selected_value'];

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

                    get_lang('Only PNG, JPG or GIF images allowed').' ('.implode(',', $allowed_picture_types).')',

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

function formGenerateElementsGroup($form, $values = [], $elementName)

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

            $ret_val = null;

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

            $settings_by_access = api_get_settings($categoryToSearch, 'group', $url_id, 1);

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

        'settings_by_access_list' => $settings_by_access_list,

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

    $default_values = [];

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

                        if ($hide_element) {

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

                        $access_url = $_configuration['access_url'];

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

function showSearchToolsStatusTable()

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

    $url_id = api_get_current_access_url_id();

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

                $sql = "SELECT * FROM $table_settings_current

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

                        $result_access = Database::query($sql);

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

                $default_values[$row['variable']] = $row['selected_value'];

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

                    if ($hide_element) {

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

            foreach ($settings_by_access as $row) {

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

                    $settings_by_access_list[$row['variable']][$row['subkey']][$row['category']] = [];

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

function formGenerateElementsGroup($form, $values = [], $elementName)

Expected 0 spaces before closing bracket; newline found
Open

            $specific_fields_exists = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Add a specific search field')

The variable $plugin_obj is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $all_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $invalid_files is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $error_string is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $pos_slash is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $extraction_path is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $search_enabled is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $specific_fields is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_is_writable is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $specific_fields_exists is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_exists is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $convert_byte_to_mega_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $hide_element is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $url_info is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $num_files is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $path_parts is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $invalid_files is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $num_files is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $shortlist_installed is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $shortlist_installed is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $areas_to_installed is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $hide_element is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $table_settings_current is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $access_url is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $search_enabled is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $sf_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $specific_fields_exists is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $number_of_items is not named in camelCase.
Open

function getTemplateData($from, $number_of_items, $column, $direction)
{
    // Database table definition.
    $table_system_template = Database::get_main_table('system_template');

Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $selected_plugins is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info_file is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $path_parts is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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_is_writable is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $number_of_items is not named in camelCase.
Open

function getTemplateData($from, $number_of_items, $column, $direction)
{
    // Database table definition.
    $table_system_template = Database::get_main_table('system_template');

Severity: Minor
Found in public/main/admin/settings.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 $table_settings_current is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $access_url is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $table_settings_current is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $allowed_picture_types is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $list_of_programs is not named in camelCase.
Open

function showSearchToolsStatusTable()
{
    //@todo windows support
    if (false == api_is_windows_os()) {
        $list_of_programs = ['pdftotext', 'ps2pdf', 'catdoc', 'html2text', 'unrtf', 'catppt', 'xls2csv'];
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $num_files is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $error_string is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $entry_without_first_dir is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $entry_without_first_dir is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $extraction_path is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $search_enabled is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $sf_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_exists is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handleTemplates()
{
    /* Drive-by fix to avoid undefined var warnings, without repeating
     * isset() combos all over the place. */
    $action = isset($_GET['action']) ? $_GET['action'] : "invalid";
Severity: Minor
Found in public/main/admin/settings.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 $plugin_region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_is_writable is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handleTemplates()
{
    /* Drive-by fix to avoid undefined var warnings, without repeating
     * isset() combos all over the place. */
    $action = isset($_GET['action']) ? $_GET['action'] : "invalid";
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $result_access is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $url_info is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $entry_without_first_dir is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $remove_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $SettingsStored is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $specific_fields is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $number_of_items is not named in camelCase.
Open

function getTemplateData($from, $number_of_items, $column, $direction)
{
    // Database table definition.
    $table_system_template = Database::get_main_table('system_template');

Severity: Minor
Found in public/main/admin/settings.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 $access_url is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $areas_to_installed is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $sf_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $search_enabled is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $list_of_programs is not named in camelCase.
Open

function showSearchToolsStatusTable()
{
    //@todo windows support
    if (false == api_is_windows_os()) {
        $list_of_programs = ['pdftotext', 'ps2pdf', 'catdoc', 'html2text', 'unrtf', 'catppt', 'xls2csv'];
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info_file is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $invalid_file is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_list is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $search_enabled is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_exists is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handleTemplates()
{
    /* Drive-by fix to avoid undefined var warnings, without repeating
     * isset() combos all over the place. */
    $action = isset($_GET['action']) ? $_GET['action'] : "invalid";
Severity: Minor
Found in public/main/admin/settings.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 $convert_byte_to_mega_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $url_info is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $hide_element is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $plugin_item is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $all_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $error_string is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info_file is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $extraction_path is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $entry_without_first_dir is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $single_directory is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $remove_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $specific_fields is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $sf_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $search_enabled is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $url_info is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $specific_fields_exists is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $table_system_template is not named in camelCase.
Open

function getTemplateData($from, $number_of_items, $column, $direction)
{
    // Database table definition.
    $table_system_template = Database::get_main_table('system_template');

Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $allowed_picture_types is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $table_settings_current is not named in camelCase.
Open

function searchSetting($search)
{
    if (empty($search)) {
        return [];
    }
Severity: Minor
Found in public/main/admin/settings.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 $access_url is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $row_access is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $table_settings_current is not named in camelCase.
Open

function searchSetting($search)
{
    if (empty($search)) {
        return [];
    }
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function getCategorySettings($category = '')
{
    $url_id = api_get_current_access_url_id();
    $settings_by_access_list = [];

Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $my_plugin_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info_file is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $invalid_file is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $extraction_path is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $plugin_list is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $areas_to_installed is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $plugin_list is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_list is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $row_access is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $delete_url is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $ret_val is not named in camelCase.
Open

function showSearchToolsStatusTable()
{
    //@todo windows support
    if (false == api_is_windows_os()) {
        $list_of_programs = ['pdftotext', 'ps2pdf', 'catdoc', 'html2text', 'unrtf', 'catppt', 'xls2csv'];
Severity: Minor
Found in public/main/admin/settings.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 $my_plugin_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_item is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $entry_without_first_dir is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $pos_slash is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $user_id is not named in camelCase.
Open

function handleTemplates()
{
    /* Drive-by fix to avoid undefined var warnings, without repeating
     * isset() combos all over the place. */
    $action = isset($_GET['action']) ? $_GET['action'] : "invalid";
Severity: Minor
Found in public/main/admin/settings.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 $url_id is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $allowed_picture_types is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_item is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info_file is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $invalid_files is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $plugin_list is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_list is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $SettingsStored is not named in camelCase.
Open

function handleSearch()
{
    global $SettingsStored, $_configuration;

    $search_enabled = api_get_setting('search_enabled');
Severity: Minor
Found in public/main/admin/settings.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 $settings_to_avoid is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_by_access_list is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $delete_url is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $region_list is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $plugin_obj is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info is not named in camelCase.
Open

function handlePlugins()
{
    Session::erase('plugin_data');
    $plugin_obj = new AppPlugin();
    $token = Security::get_token();
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $table_system_template is not named in camelCase.
Open

function getTemplateData($from, $number_of_items, $column, $direction)
{
    // Database table definition.
    $table_system_template = Database::get_main_table('system_template');

Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $settings_to_avoid is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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_values is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $ret_val is not named in camelCase.
Open

function showSearchToolsStatusTable()
{
    //@todo windows support
    if (false == api_is_windows_os()) {
        $list_of_programs = ['pdftotext', 'ps2pdf', 'catdoc', 'html2text', 'unrtf', 'catppt', 'xls2csv'];
Severity: Minor
Found in public/main/admin/settings.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 $plugin_info_file is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $selected_plugins is not named in camelCase.
Open

function handleRegions()
{
    if (isset($_POST['submit_plugins'])) {
        storeRegions();
        // Add event to the system log.
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $single_directory is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $error_string is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $single_directory is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $style_name is not named in camelCase.
Open

function uploadStylesheet($values, $picture)
{
    $result = false;
    // Valid name for the stylesheet folder.
    $style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
Severity: Minor
Found in public/main/admin/settings.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 $installed_plugins is not named in camelCase.
Open

function storeRegions()
{
    $plugin_obj = new AppPlugin();

    // Get a list of all current 'Plugins' settings
Severity: Minor
Found in public/main/admin/settings.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 $remove_plugins is not named in camelCase.
Open

function storePlugins()
{
    $appPlugin = new AppPlugin();
    // Get a list of all current 'Plugins' settings
    $plugin_list = $appPlugin->read_plugins_from_path();
Severity: Minor
Found in public/main/admin/settings.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 $hide_element is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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 $result_access is not named in camelCase.
Open

function generateSettingsForm($settings, $settings_by_access_list)
{
    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
    $em = Database::getManager();
    $table_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
Severity: Minor
Found in public/main/admin/settings.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