chamilo/chamilo-lms

View on GitHub
public/main/inc/lib/auth.lib.php

Summary

Maintainability
A
0 mins
Test Coverage

The parameter $course_code is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.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 "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

                    course_rel_user.user_id = '".$user_id."' AND

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

        $current_user_id = api_get_user_id();

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

        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

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

    public function remove_user_from_course($course_code, $sessionId = 0)

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

        $sql = "SELECT * FROM $tbl_course_user

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

        $courseInfo = api_get_course_info($course_code);

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

        $course_code = Database::escape_string($course_code);

Method name "Auth::remove_user_from_course" is not in camel caps format
Open

    public function remove_user_from_course($course_code, $sessionId = 0)

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

                    user_id='".$current_user_id."' AND

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

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

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

        $course_code = Database::escape_string($course_code);

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

        $number_of_rows = Database::num_rows($result_check);

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

            CourseManager::unsubscribe_user($current_user_id, $course_code, $sessionId);

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

        if ($number_of_rows > 0) {

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

            CourseManager::unsubscribe_user($current_user_id, $course_code, $sessionId);

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

        $number_of_rows = Database::num_rows($result_check);

The variable $user_id is not named in camelCase.
Open

    public function getCoursesInCategory($hidePrivate = true)
    {
        $user_id = api_get_user_id();

        $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_code is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $TABLECOURS is not named in camelCase.
Open

    public function getCoursesInCategory($hidePrivate = true)
    {
        $user_id = api_get_user_id();

        $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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

    public function getCoursesInCategory($hidePrivate = true)
    {
        $user_id = api_get_user_id();

        $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_code is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $TABLECOURS is not named in camelCase.
Open

    public function getCoursesInCategory($hidePrivate = true)
    {
        $user_id = api_get_user_id();

        $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_code is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $TABLECOURSUSER is not named in camelCase.
Open

    public function getCoursesInCategory($hidePrivate = true)
    {
        $user_id = api_get_user_id();

        $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_course_user is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $TABLECOURSUSER is not named in camelCase.
Open

    public function getCoursesInCategory($hidePrivate = true)
    {
        $user_id = api_get_user_id();

        $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_code is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_course_user is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The method remove_user_from_course is not named in camelCase.
Open

    public function remove_user_from_course($course_code, $sessionId = 0)
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);

        // protect variables
Severity: Minor
Found in public/main/inc/lib/auth.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status