chamilo/chamilo-lms

View on GitHub
public/plugin/bbb/lib/bbb_plugin.class.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '215', column '27').
Open

        $extraField = new ExtraField('session');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '197', column '27').
Open

        $extraField = new ExtraField('course');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '284', column '31').
Open

            $extraField = new ExtraField('session');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '277', column '31').
Open

            $extraField = new ExtraField('course');

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

class BBBPlugin extends Plugin
{
    const ROOM_OPEN = 0;
    const ROOM_CLOSE = 1;
    const ROOM_CHECK = 2;

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

Member variable "course_settings" is not in valid camel caps format
Open

    public $course_settings = [

Add a comma after each item in a multi-line array
Open

        $variables = [

Expected 4 spaces after parameter name; 1 found
Open

     * @param bool $value New values of the course setting

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

            $this->uninstall_course_fields_in_all_courses($this->course_settings);

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

        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);

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

        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);

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

            $sql = "DELETE FROM $t_settings WHERE variable = '$variable' AND access_url = $urlId";

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

        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

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

            $sql = "DELETE FROM $t_options WHERE variable = 'bbb_plugin'";

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

            $sql = "DELETE FROM $t_tool WHERE title = 'bbb' AND c_id != 0";

Method name "BBBPlugin::update_course_field_in_all_courses" is not in camel caps format
Open

    public function update_course_field_in_all_courses($variable, $value)

The variable $t_settings is not named in camelCase.
Open

    public function uninstall()
    {
        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_settings is not named in camelCase.
Open

    public function uninstall()
    {
        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_options is not named in camelCase.
Open

    public function uninstall()
    {
        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_options is not named in camelCase.
Open

    public function uninstall()
    {
        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_tool is not named in camelCase.
Open

    public function uninstall()
    {
        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_tool is not named in camelCase.
Open

    public function uninstall()
    {
        $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
        $t_tool = Database::get_course_table(TABLE_TOOL_LIST);

CamelCaseVariableName

Since: 0.2

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

    public function update_course_field_in_all_courses($variable, $value)
    {
        // Update existing courses to add the new course setting value
        $table = Database::get_main_table(TABLE_MAIN_COURSE);
        $sql = "SELECT id FROM $table ORDER BY id";

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