chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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 {
            $teachers_table .= get_lang('There is no available information about your teachers');
        }

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

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

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

    public function __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_teacher';
        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 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 property $user_id is not named in camelCase.
Open

class BlockTeacher extends Block
{
    private $user_id;
    private $teachers;
    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

Method name "BlockTeacher::get_number_of_teachers" is not in camel caps format
Open

    public function get_number_of_teachers()

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

        $user_info = api_get_user_info($user_id);

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

            $teachers_table .= '

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

            $teachers_table .= get_lang('There is no available information about your teachers');

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

    public function get_block()

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

                $last_connection = Tracking::get_last_connection_date($teacher_id);

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

                    $class_tr = 'row_odd';

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

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

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

            $this->teachers = UserManager::get_users_followed_by_drh($user_id, COURSEMANAGER);

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

                $time_on_platform = api_time_to_hms(Tracking::get_time_spent_on_the_platform($teacher_id));

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

                $last_connection = Tracking::get_last_connection_date($teacher_id);

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

        $content = $teachers_table;

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

            $a_last_week = get_last_week();

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

            $teachers_table .= get_lang('There is no available information about your teachers');

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

            $is_block_visible_for_user = true;

Method name "BlockTeacher::get_teachers_content_html_for_drh" is not in camel caps format
Open

    public function get_teachers_content_html_for_drh()

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

            $last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]);

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

        $content .= $teachers_table;

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'];

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

        $user_status = $user_info['status'];

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

    public function is_block_visible_for_user($user_id)

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

        if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) {

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

                    $class_tr = 'row_odd';

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

                $teacher_id = $teacher['user_id'];

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

                $teachers_table .= '

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

            $teachers_table .= '

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

                    $class_tr = 'row_even';

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

                                        <td align="right">'.$time_on_platform.'</td>

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

            $teachers_table .= '</table>';

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

        return $is_block_visible_for_user;

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

                    $class_tr = 'row_even';

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

            $last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]);

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

                $teachers_table .= '<tr class="'.$class_tr.'">

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

        $this->user_id = $user_id;

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

        if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) {

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

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

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

                $time_on_platform = api_time_to_hms(Tracking::get_time_spent_on_the_platform($teacher_id));

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

            $last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]);

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

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

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

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

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

                                    <th>'.get_lang('Time spent last week').'<br />'.$last_week.'</th>

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

                $teachers_table .= '<tr class="'.$class_tr.'">

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

        $user_info = api_get_user_info($user_id);

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

                                        <td align="right">'.$last_connection.'</td>

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

            $teachers_table .= '</table>';

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

                $teacher_id = $teacher['user_id'];

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

                $time_on_platform = api_time_to_hms(

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

                    Tracking::get_time_spent_on_the_platform($teacher_id, true)

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

        $is_block_visible_for_user = false;

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

        $teachers_table = null;

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

        $teachers_table = null;

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

        $this->user_id = $user_id;

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

    public function is_block_visible_for_user($user_id)

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

                                        <td align="right">'.$time_on_platform.'</td>

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

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

It is 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()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $last_week is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teachers_table is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $a_last_week is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $last_connection is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

It is 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_teacher';
        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_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 $user_id is not named in camelCase.
Open

    public function __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_teacher';
        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_id is not named in camelCase.
Open

    public function __construct($user_id)
    {
        $this->user_id = $user_id;
        $this->path = 'block_teacher';
        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 $teacher_id is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $last_connection is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

It is 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 get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teacher_id is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $teachers_table is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $a_last_week is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $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 $teachers_table is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $teachers_table is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $teachers_table is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $a_last_week is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $time_on_platform is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $time_on_platform is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $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 $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 $time_on_platform is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $time_on_platform is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $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 $class_tr is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $teacher_id is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teacher_id is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teacher_id is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $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 $teachers_table is not named in camelCase.
Open

    public function getContent()
    {
        $teachers = $this->teachers;
        $teachers_table = null;
        if (count($teachers) > 0) {

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $last_week is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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 $teachers_table is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_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_number_of_teachers is not named in camelCase.
Open

    public function get_number_of_teachers()
    {
        return count($this->teachers);
    }

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 = 1;
        $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

The method get_teachers_content_html_for_drh is not named in camelCase.
Open

    public function get_teachers_content_html_for_drh()
    {
        $teachers = $this->teachers;
        $content = '<h4>'.get_lang('Your teachers').'</h4>';
        $teachers_table = null;

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

There are no issues that match your filters.

Category
Status