chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '160', column '21').
Open

        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
Severity: Minor
Found in public/main/inc/lib/gradebook.lib.php by phpmd

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

        $skill = new SkillModel();
Severity: Minor
Found in public/main/inc/lib/gradebook.lib.php by phpmd

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 '98', column '32').
Open

        $skill_gradebook = new SkillRelGradebookModel();
Severity: Minor
Found in public/main/inc/lib/gradebook.lib.php by phpmd

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

        } else {
            $skill_to_remove = $clean_gradebook;
        }
Severity: Minor
Found in public/main/inc/lib/gradebook.lib.php by phpmd

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

    public static function is_active($c_id = null)
    {
        $name = 'gradebook';
        $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $sql = "SELECT * from $table
Severity: Minor
Found in public/main/inc/lib/gradebook.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

The parameter $gradebook_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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

The parameter $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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

The parameter $gradebook_id is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 "table_skill_rel_gradebook" is not in valid camel caps format
Open

        $this->table_skill_rel_gradebook = Database::get_main_table(TABLE_MAIN_SKILL_REL_GRADEBOOK);

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

        $c_id = $c_id ? intval($c_id) : api_get_course_int_id();

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

                $skill_to_remove = array_diff($clean_gradebook, $skill_list);

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

            foreach ($skill_gradebooks_source as $source) {

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

        if (!empty($skill_gradebooks_source)) {

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

            $skill_list = array_map('intval', $skill_list);

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

        $this->table_skill = Database::get_main_table(TABLE_MAIN_SKILL);

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

        $skill_gradebooks_source = $skill_gradebook->get_all(

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

            $skill_list = array_map('intval', $skill_list);

Missing function doc comment
Open

    public function get_all(array $options = []): array

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

        $gradebook_id,

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

        $skill_list,

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

            $skill_list = array_filter($skill_list);

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

    public static function is_active($c_id = null)

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

        $skill_gradebook = new SkillRelGradebookModel();

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

        $clean_gradebook = [];

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

                $clean_gradebook[] = $source['skill_id'];

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

                $skill_to_remove = array_diff($clean_gradebook, $skill_list);

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

            ['where' => ['gradebook_id = ?' => $gradebook_id]]

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

        if (!empty($skill_list)) {

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

                WHERE c_id = $c_id and title = '$name'

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

        if (!empty($skill_list)) {

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

            foreach ($skill_list as $skill_id) {

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

        $c_id = $c_id ? intval($c_id) : api_get_course_int_id();

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

        $skill_gradebooks_source = $skill_gradebook->get_all(

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

            if (!empty($clean_gradebook)) {

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

                $skill_to_remove = array_diff($clean_gradebook, $skill_list);

Method name "Gradebook::get_all" is not in camel caps format
Open

    public function get_all(array $options = []): array

Method name "Gradebook::is_active" is not in camel caps format
Open

    public static function is_active($c_id = null)

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

        $c_id = $c_id ? intval($c_id) : api_get_course_int_id();

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

            $skill_list = array_filter($skill_list);

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

                $params['skill_id'] = $skill_id;

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

            $clean_skill_list,

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

                if (!$skill_gradebook->existsGradeBookSkill($gradebook_id, $skill_id)) {

Method name "Gradebook::show_skill_form" is not in camel caps format
Open

    public function show_skill_form($gradebook_id, $url, $header = null)

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

        if (!empty($selected_skills)) {

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

            foreach ($selected_skills as $skill) {

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

            $skill_to_remove = $clean_gradebook;

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

                foreach ($skill_to_remove as $remove) {

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

                        $gradebook_id

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

            $clean_skill_list[$skill['id']] = $skill['name'];

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

        $selected_skills = $this->getSkillsByGradebook($gradebook_id);

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

    public function show_skill_form($gradebook_id, $url, $header = null)

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

                if (!$skill_gradebook->existsGradeBookSkill($gradebook_id, $skill_id)) {

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

                    $skill_gradebook->delete($skill_item['id']);

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

        $selected_skills = $this->getSkillsByGradebook($gradebook_id);

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

                $clean_selected_skills[] = $skill['id'];

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

        $form->setDefaults(['skill' => $clean_selected_skills]);

Missing parameter name
Open

     * @param   string  url

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

            foreach ($skill_list as $skill_id) {

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

                $params['gradebook_id'] = $gradebook_id;

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

                    $skill_item = $skill_gradebook->getSkillInfo(

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

                    $skill_gradebook->save($params);

Missing parameter name
Open

     * @param   string  action add, edit

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

                if (!$skill_gradebook->existsGradeBookSkill($gradebook_id, $skill_id)) {

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

            if (!empty($skill_to_remove)) {

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

        $clean_selected_skills = [];

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

                    $skill_gradebook->delete($skill_item['id']);

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

        $clean_skill_list = [];

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

            $skill_to_remove = $clean_gradebook;

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

                    $skill_item = $skill_gradebook->getSkillInfo(

The variable $c_id is not named in camelCase.
Open

    public static function is_active($c_id = null)
    {
        $name = 'gradebook';
        $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $sql = "SELECT * from $table
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $gradebook_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $gradebook_id is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $c_id is not named in camelCase.
Open

    public static function is_active($c_id = null)
    {
        $name = 'gradebook';
        $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $sql = "SELECT * from $table
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $selected_skills is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $gradebook_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_to_remove is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_skill_list is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_to_remove is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_selected_skills is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_skill_list is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_item is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $c_id is not named in camelCase.
Open

    public static function is_active($c_id = null)
    {
        $name = 'gradebook';
        $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $sql = "SELECT * from $table
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebooks_source is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $selected_skills is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_to_remove is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_selected_skills is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $c_id is not named in camelCase.
Open

    public static function is_active($c_id = null)
    {
        $name = 'gradebook';
        $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $sql = "SELECT * from $table
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $gradebook_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $gradebook_id is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebooks_source is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_gradebooks_source is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_item is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_skill_list is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $selected_skills is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_gradebook is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_list is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $skill_to_remove is not named in camelCase.
Open

    public function updateSkillsToGradeBook(
        $gradebook_id,
        $skill_list,
        $deleteSkillNotInList = true
    ) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 $clean_selected_skills is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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 is_active is not named in camelCase.
Open

    public static function is_active($c_id = null)
    {
        $name = 'gradebook';
        $table = Database::get_main_table(TABLE_MAIN_SETTINGS);
        $sql = "SELECT * from $table
Severity: Minor
Found in public/main/inc/lib/gradebook.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

The method get_all is not named in camelCase.
Open

    public function get_all(array $options = []): array
    {
        $gradebooks = parent::get_all($options);
        foreach ($gradebooks as &$gradebook) {
            if (empty($gradebook['name'])) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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

The method show_skill_form is not named in camelCase.
Open

    public function show_skill_form($gradebook_id, $url, $header = null)
    {
        $form = new FormValidator('gradebook_add_skill', 'POST', $url);
        // Setting the form elements
        if (!isset($header)) {
Severity: Minor
Found in public/main/inc/lib/gradebook.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