chamilo/chamilo-lms

View on GitHub
public/plugin/dashboard/block_course/block_course.class.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '143', column '25').
Open

        $thematic = new Thematic();

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

                } else {
                    $class_tr = 'row_even';
                }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

            } else {
                $tematic_advance_progress = '0%';
            }

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

        } else {
            $data_table .= get_lang('There is no available information about your courses');
        }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

            } else {
                $avg_time_spent_in_course = null;
            }

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 '$avg_progress_in_course'.
Open

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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 '$avg_score_in_course'.
Open

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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 '$avg_score_in_exercise'.
Open

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

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

    public function __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_course';
        if ($this->is_block_visible_for_user($user_id)) {

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

class BlockCourse extends Block
{
    private $user_id;
    private $courses;
    private $permission = [DRH];

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

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

        $course_data = $this->get_course_information_data();

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

            foreach ($course_data as $course) {

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

                    $class_tr = 'row_even';

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

    public function is_block_visible_for_user($user_id)

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

        return $is_block_visible_for_user;

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

        if (!empty($course_data)) {

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

                    $data_table .= '<td align="right">'.$cell.'</td>';

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

        $this->user_id = $user_id;

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

        $content .= $data_table;

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

        $is_block_visible_for_user = false;

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

                $data_table .= '<tr class="'.$class_tr.'">';

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

        if (!empty($course_data)) {

Method name "BlockCourse::get_number_of_courses" is not in camel caps format
Open

    public function get_number_of_courses()

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

        $this->user_id = $user_id;

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

        $user_info = api_get_user_info($user_id);

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

                $user_status,

Method name "BlockCourse::get_block" is not in camel caps format
Open

    public function get_block()

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

            $data_table .= '<tr>

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

                    $class_tr = 'row_odd';

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

                $data_table .= '<tr class="'.$class_tr.'">';

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

            $this->courses = CourseManager::get_courses_followed_by_drh($user_id);

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

        $user_status = $user_info['status'];

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

        if (UserManager::is_admin($user_id) || in_array(

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $this->permission

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

    public function __construct($user_id)

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

        $user_status = $user_info['status'];

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            )

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

            $is_block_visible_for_user = true;

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $user_status,

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

        $user_info = api_get_user_info($user_id);

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

        foreach ($courses as $row_course) {

Method name "BlockCourse::is_block_visible_for_user" is not in camel caps format
Open

    public function is_block_visible_for_user($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_data" is not in valid camel caps format
Open

        $course_data = [];

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

        $data_table = null;

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

            $data_table .= '</table>';

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

        if ($this->is_block_visible_for_user($user_id)) {

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

            $data_table .= '<table class="data_table" width:"95%">';

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

                $data_table .= '</tr>';

Method name "BlockCourse::get_course_information_data" is not in camel caps format
Open

    public function get_course_information_data()

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

            $data_table .= get_lang('There is no available information about your courses');

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

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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

            if (!empty($tematic_advance)) {

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

                $tematic_advance_progress = '<a title="'.get_lang('GoToThematic advance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';

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

            $table_row[] = $avg_time_spent_in_course;

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

            $course_data[] = $table_row;

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

                    Tracking::get_time_spent_on_the_course($users, $courseId) / $nb_students_in_course

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

                $avg_time_spent_in_course = null;

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

                $tematic_advance_progress = '0%';

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

            $table_row = [];

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

            $table_row[] = $avg_time_spent_in_course;

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

            $table_row[] = $tematic_advance_progress;

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

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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

                $avg_time_spent_in_course = api_time_to_hms(

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

                $tematic_advance_progress = '<a title="'.get_lang('GoToThematic advance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';

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

            $course_code = $row_course['code'];

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

                $tematic_advance_progress = '<a title="'.get_lang('GoToThematic advance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';

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

            $tematic_advance = $thematic->get_total_average_of_thematic_advances(

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

            $table_row[] = $nb_students_in_course;

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

            $table_row[] = $nb_students_in_course;

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

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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

            $sql = "SELECT user_id FROM $tbl_course_user as course_rel_user

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

            $course_code = $row_course['code'];

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

                $nb_students_in_course = count($users);

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

            $table_row[] = $row_course['title'];

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

            $course_data[] = $table_row;

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

            $courseInfo = api_get_course_info($course_code);

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

            $table_row[] = $tematic_advance_progress;

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

        return $course_data;

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

            $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;

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

            $table_row[] = $row_course['title'];

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            )

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $this->permission

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $user_status,

The variable $is_block_visible_for_user is not named in camelCase.
Open

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_time_spent_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tematic_advance_progress is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

It is 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 is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tematic_advance is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tematic_advance_progress is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_time_spent_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tematic_advance is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tematic_advance is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_course';
        if ($this->is_block_visible_for_user($user_id)) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $is_block_visible_for_user is not named in camelCase.
Open

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

It is 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 get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_progress_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_time_spent_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $nb_students_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_score_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $nb_students_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_course';
        if ($this->is_block_visible_for_user($user_id)) {

CamelCaseVariableName

Since: 0.2

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

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tematic_advance_progress is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_time_spent_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $avg_score_in_exercise is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $nb_students_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $nb_students_in_course is not named in camelCase.
Open

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_course';
        if ($this->is_block_visible_for_user($user_id)) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $is_block_visible_for_user is not named in camelCase.
Open

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

CamelCaseVariableName

Since: 0.2

It is 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 is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $data_table is not named in camelCase.
Open

    public function getContent()
    {
        $course_data = $this->get_course_information_data();
        $content = '';
        $data_table = null;

CamelCaseVariableName

Since: 0.2

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

    public function get_course_information_data()
    {
        $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
        $course_data = [];
        $courses = $this->courses;

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

The method is_block_visible_for_user is not named in camelCase.
Open

    public function is_block_visible_for_user($user_id)
    {
        $user_info = api_get_user_info($user_id);
        $user_status = $user_info['status'];
        $is_block_visible_for_user = false;

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

The method get_number_of_courses is not named in camelCase.
Open

    public function get_number_of_courses()
    {
        return count($this->courses);
    }

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

The method get_block is not named in camelCase.
Open

    public function get_block()
    {
        $column = 2;
        $data = [];
        $html = $this->getBlockCard(

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