chamilo/chamilo-lms

View on GitHub
public/main/admin/usergroup_user_import.php

Summary

Maintainability
A
0 mins
Test Coverage

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

    $usergroup = new UserGroupModel();

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 '75', column '22').
Open

    $usergroup = new UserGroupModel();

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 validate_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $classcodes[$user_class['ClassName']] = 1;
                }

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 parameter $user_classes is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

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 $users_classes is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

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 "user_class" is not in valid camel caps format
Open

        $user_class['line'] = $index + 1;

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

function save_data($users_classes, $deleteUsersNotInList = false)

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

            $usergroup->subscribe_users_to_usergroup($class_id, $user_list, $deleteUsersNotInList);

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

function validate_data($user_classes)

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

        foreach ($mandatory_fields as $field) {

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

            $class_name = $user_data['class_name'];

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

        $return = save_data($users_classes, $deleteUsersNotInList);

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

    global $purification_option_for_usernames;

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

        if (isset($user_class['ClassName']) && 0 != strlen($user_class['ClassName'])) {

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

    global $purification_option_for_usernames;

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

            $sql1 = "SELECT user_id FROM $user_table

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

        $error_message .= get_lang('Line').' '.$error_class_user['line'].': '.$error_class_user['error'].'</b>';

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

            if (!isset($user_class[$field]) || 0 == strlen($user_class[$field])) {

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

                    $user_class['error'] = get_lang('This code does not exist').': '.$user_class['ClassName'];

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

        foreach ($users_classes as $user_class) {

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

                $csv_data[$id]['user_list'][] = $obj1->user_id;

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

                $csv_data[$id]['class_name'] = $user_class['ClassName'];

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

$form->addElement('header', $tool_name);

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

Display::display_header($tool_name);

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

        $error_message .= get_lang('Line').' '.$error_class_user['line'].': '.$error_class_user['error'].'</b>';

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

        $error_message .= get_lang('Line').' '.$error_class_user['line'].': '.$error_class_user['error'].'</b>';

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

                $csv_data[$id]['user_list'][] = $obj1->user_id;

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

                $csv_data[$id]['user_list_name'][] = $user_class['UserName'];

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

    $errors = validate_data($users_classes);

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

function validate_data($user_classes)

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

    foreach ($user_classes as $index => $user_class) {

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

    foreach ($user_classes as $index => $user_class) {

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

    $user_table = Database::get_main_table(TABLE_MAIN_USER);

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

        foreach ($users_classes as $user_class) {

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

        $error_message .= "<br />";

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

                $user_class['error'] = get_lang('Unknown user').': '.$username;

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

        foreach ($csv_data as $class_id => $user_data) {

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

            $user_list_name = $user_data['user_list_name'];

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

$tool_name = get_lang('Add users to a class').' CSV';

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

    foreach ($errors as $index => $error_class_user) {

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

                $exists = $usergroup->usergroup_exists($user_class['ClassName']);

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

                    $errors[] = $user_class;

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

                    $classcodes[$user_class['ClassName']] = 1;

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

            $username = UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames);

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

$purification_option_for_usernames = false;

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

                $errors[] = $user_class;

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

        if (isset($user_class['ClassName']) && 0 != strlen($user_class['ClassName'])) {

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

    if (!empty($users_classes)) {

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

                get_lang('Class').': '.$class_name.'<br />',

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

    $users_classes = parse_csv_data($_FILES['import_file']['tmp_name']);

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

    $error_message .= "\n";

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

                $user_class['error'] = get_lang('This login is too long').': '.$user_class['UserName'];

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

                $user_class['error'] = get_lang('This login is too long').': '.$user_class['UserName'];

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

                $csv_data[$id]['user_list_name'][] = $user_class['UserName'];

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

    if (!empty($csv_data)) {

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

            if (!isset($classcodes[$user_class['ClassName']])) {

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

                     WHERE username = '".Database::escape_string(UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames))."'";

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

            $id = $usergroup->getIdByName($user_class['ClassName']);

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

            $user_list = $user_data['user_list'];

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

            if (!isset($user_class[$field]) || 0 == strlen($user_class[$field])) {

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

        if (!UserManager::is_username_empty($user_class['UserName'])) {

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

                $errors[] = $user_class;

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

function save_data($users_classes, $deleteUsersNotInList = false)

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

        foreach ($csv_data as $class_id => $user_data) {

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

            $usergroup->subscribe_users_to_usergroup($class_id, $user_list, $deleteUsersNotInList);

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

                get_lang('Users').': '.implode(', ', $user_list_name)

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

$this_section = SECTION_PLATFORM_ADMIN;

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

    $error_message = "\n";

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

                $user_class['error'] = get_lang($field.'Mandatory');

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

                $errors[] = $user_class;

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

                    $user_class['error'] = get_lang('This code does not exist').': '.$user_class['ClassName'];

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

            $username = UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames);

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

    $csv_data = [];

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

                     WHERE username = '".Database::escape_string(UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames))."'";

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

        foreach ($csv_data as $class_id => $user_data) {

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

            $class_name = $user_data['class_name'];

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

            if (UserManager::is_username_too_long($user_class['UserName'])) {

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

                $csv_data[$id]['class_name'] = $user_class['ClassName'];

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

            $user_list_name = $user_data['user_list_name'];

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

        $mandatory_fields = ['UserName', 'ClassName'];

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

            $user_list = $user_data['user_list'];

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

function parse_csv_data($file)

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

    echo Display::return_message($error_message, 'error', false);

The variable $user_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $csv_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $csv_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $csv_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $class_name is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_list is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $purification_option_for_usernames is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_table is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_list is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $users_classes is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $class_id is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_classes is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $purification_option_for_usernames is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mandatory_fields is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $users_classes is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_table is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $csv_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $csv_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $class_name is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_list_name is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_list_name is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $class_id is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $purification_option_for_usernames is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mandatory_fields is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $purification_option_for_usernames is not named in camelCase.
Open

function validate_data($user_classes)
{
    global $purification_option_for_usernames;
    $errors = [];
    $classcodes = [];

CamelCaseVariableName

Since: 0.2

It is 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_class is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $csv_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

It is 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_data is not named in camelCase.
Open

function save_data($users_classes, $deleteUsersNotInList = false)
{
    global $purification_option_for_usernames;
    // Table definitions.
    $user_table = Database::get_main_table(TABLE_MAIN_USER);

CamelCaseVariableName

Since: 0.2

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