chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$all' which will lead to PHP notices.
Open

            $diff = array_diff($all, $a_thematic_advance_ids);
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$affected_rows' which will lead to PHP notices.
Open

        return $affected_rows;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$affected_rows' which will lead to PHP notices.
Open

        return $affected_rows;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$table' which will lead to PHP notices.
Open

                $upd = "UPDATE $table SET done_advance = 0
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Missing class import via use statement (line '213', column '32').
Open

        $thematicManager = new Thematic();
Severity: Minor
Found in public/main/inc/lib/thematic.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 '227', column '37').
Open

                    $thematic = new Thematic();
Severity: Minor
Found in public/main/inc/lib/thematic.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 delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            /** @var CThematic $resource */
            $resource = $repo->find($thematicId);
            $linksRepo->removeByResourceInContext($resource, $course, $session);
        };
Severity: Minor
Found in public/main/inc/lib/thematic.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 method getMoveActions uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $toolbarThematic .= '<div class="btn btn--plain">' . Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon-disabled', null, ICON_SIZE_TINY, '') . '</div>';
        }
Severity: Minor
Found in public/main/inc/lib/thematic.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 method thematicAdvanceSave uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $advance
                ->setContent($content)
                ->setStartDate(api_get_utc_datetime($start_date, true, true))
                ->setDuration($duration)
Severity: Minor
Found in public/main/inc/lib/thematic.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 method moveThematic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $link->moveUpPosition();
        }
Severity: Minor
Found in public/main/inc/lib/thematic.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 method thematicSave uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $thematic = $repo->find($id);
            if ($thematic) {
                $thematic
                    ->setTitle($title)
Severity: Minor
Found in public/main/inc/lib/thematic.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 method thematicPlanSave uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $thematic = Container::getThematicRepository()->find($thematic_id);
            $plan = new CThematicPlan();
            $plan
                ->setTitle($title)
Severity: Minor
Found in public/main/inc/lib/thematic.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 method get_next_description_type uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $next_description_type = ADD_THEMATIC_PLAN;
        }
Severity: Minor
Found in public/main/inc/lib/thematic.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 method getMoveActions uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $toolbarThematic .= '<div class="btn btn--plain">' . Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon-disabled', null, ICON_SIZE_TINY, '') . '</div>';
        }
Severity: Minor
Found in public/main/inc/lib/thematic.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

Avoid unused parameters such as '$course'.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$session'.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused private fields such as '$thematic_plan_description'.
Open

    private $thematic_plan_description;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused private fields such as '$thematic_plan_title'.
Open

    private $thematic_plan_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused private fields such as '$thematic_title'.
Open

    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused private fields such as '$session_id'.
Open

    private $session_id;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused private fields such as '$thematic_content'.
Open

    private $thematic_content;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused local variables such as '$affected_rows'.
Open

        return $affected_rows;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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 private fields such as '$thematic_plan_description_type'.
Open

    private $thematic_plan_description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused private fields such as '$thematic_plan_id'.
Open

    private $thematic_plan_id;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid unused local variables such as '$course_id'.
Open

        $course_id = api_get_course_int_id();
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

        $error = null;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

            $diff = array_diff($all, $a_thematic_advance_ids);
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

        $sessionId = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

        return $affected_rows;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

                $upd = "UPDATE $table SET done_advance = 0
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

                $id = $thematic->getIid();
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

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

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $thematic_advance_id is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $description_type is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.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 property $session_id is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $thematic_id is not named in camelCase.
Open

    public function thematic_plan_destroy($thematic_id, $descriptionType)
    {
        $repo = Container::getThematicRepository();

        /** @var CThematic $thematic */
Severity: Minor
Found in public/main/inc/lib/thematic.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 property $thematic_title is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $thematic_content is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $thematic_plan_id is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $start_date is not named in camelCase.
Open

    public function thematicAdvanceSave(
        CThematic $thematic,
        CAttendance $attendance = null,
        CThematicAdvance $advance = null,
        $content,
Severity: Minor
Found in public/main/inc/lib/thematic.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 property $start_date is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $thematic_plan_description is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $course_int_id is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $thematic_id is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $attendance_id is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $thematic_id is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 property $thematic_advance_content is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $number_of_items is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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 $attendance_id is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function set_thematic_id($thematic_id)
    {
        $this->thematic_id = $thematic_id;
    }
Severity: Minor
Found in public/main/inc/lib/thematic.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 property $thematic_plan_description_type is not named in camelCase.
Open

class Thematic
{
    private $session_id;
    private $thematic_id;
    private $thematic_title;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $start_date is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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

Missing parameter name
Open

     * @param   int     Number of users to get

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

        $thematic_id = $thematic->getIid();

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

        return $affected_rows;

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

            foreach ($thematic_data as $thematic) {

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

        return $next_advance_not_done;

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

                $thematic_advance[1] = api_format_date($thematic_advance[1], DATE_TIME_FORMAT_LONG);

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

                $data[] = [$i, $thematic_advance[1], $thematic_advance[2], $thematic_advance[3], $actions];

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

        $start_date,

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

        $thematic_id = intval($thematic_id);

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

            $next_description_type = $last_description_type + 1;

Method name "Thematic::get_last_done_thematic_advance" is not in camel caps format
Open

    public function get_last_done_thematic_advance($course, $session = null)

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

            $next_advance_not_done = intval($next_advance_not_done);

Method name "Thematic::get_total_average_of_thematic_advances" is not in camel caps format
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)

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

        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);

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

                $thematic_advance[1] = api_get_local_time($thematic_advance[1]);

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

                    href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.

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

        $last_description_type = $row['max'];

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

                    foreach ($thematic->getAdvances() as $thematic_advance) {

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

                WHERE c_id = $course_id AND active = 1 $condition_session ";

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

        $thematic_id = (int) $params['thematic_id'];

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

        $number_of_items = (int) $number_of_items;

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

                    WHERE thematic_id = $thematic_id

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

                    href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.

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

        return $affected_rows;

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

            $next_description_type = ADD_THEMATIC_PLAN;

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

            $diff = array_diff($all, $a_thematic_advance_ids);

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

            $last_done_advance_id = array_pop($a_thematic_advance_ids);

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

        $total_average = 0;

Missing parameter name
Open

     * @param   int     offset of first user to recover

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

        $thematic_id = (int) $params['thematic_id'];

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

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)

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

        $course_id = api_get_course_int_id();

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

        if (!empty($a_thematic_advance_ids) && count($a_thematic_advance_ids) > 0) {

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

        $next_advance_not_done = 0;

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

                $thematic_id = $thematic->getIid();

Method name "Thematic::get_number_of_thematics" is not in camel caps format
Open

    public function get_number_of_thematics()

Missing blank line before return statement
Open

        return $repo->count(['thematic' => $thematic_id]);

Missing parameter name
Open

     * @param   int     Column to sort on

Missing function doc comment
Open

    public function getThematicAdvance($id): ?CThematicAdvance

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

                ->setDescriptionType($description_type)

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

        $a_thematic_advance_ids = [];

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

        if (!empty($thematic_data)) {

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

                $list[$thematic_id] = $this->get_average_of_advances_by_thematic(

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

            $thematic_advanced = $thematic->getAdvances();

Method name "Thematic::get_number_of_thematic_advances" is not in camel caps format
Open

    public static function get_number_of_thematic_advances(array $params): int

Method name "Thematic::get_thematic_advance_data" is not in camel caps format
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])

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

        $number_of_items = (int) $number_of_items;

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

        $thematic_data = self::getThematicList($course, $session);

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

                            $a_thematic_advance_ids[] = $thematic_advance->getIid();

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

            $last_done_advance_id = intval($last_done_advance_id);

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

            $next_advance_not_done = intval($next_advance_not_done);

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

        if (!empty($thematic_data)) {

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

        return $obj->total_number_of_items;

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

                foreach ($thematic_advanced as $item) {

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

                        href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.

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

            $last_done_advance_id = array_pop($a_thematic_advance_ids);

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

        if (!empty($a_thematic_advance_ids)) {

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

        $condition_session = '';

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

        $last_done_thematic_advance = $this->get_last_done_thematic_advance($course, $session);

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

            if (!empty($thematic_advanced)) {

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

        $description_type = (int) $description_type;

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

        if (isset($last_description_type)) {

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

        $a_thematic_advance_ids = [];

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

                $next_advance_not_done = array_shift($a_thematic_advance_ids);

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

        $course_id = api_get_course_int_id();

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

            if (!empty($thematic_plan)) {

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

            while ($thematic_advance = Database::fetch_row($res)) {

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

                $data[] = [$i, $thematic_advance[1], $thematic_advance[2], $thematic_advance[3], $actions];

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

                ->setStartDate(api_get_utc_datetime($start_date, true, true))

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

            'thematic' => $thematic_id,

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

        $last_done_advance_id = 0;

Method name "Thematic::get_next_thematic_advance_not_done" is not in camel caps format
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)

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

        $thematic_data = self::getThematicList($course, $session);

Missing function doc comment
Open

    public function __construct()

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

            $condition_session = api_get_session_condition(0);

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

                WHERE c_id = $course_id AND active = 1 $condition_session ";

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

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])

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

                    LIMIT $from,$number_of_items ";

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

                $thematic_advance[1] = api_format_date($thematic_advance[1], DATE_TIME_FORMAT_LONG);

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

                ->setStartDate(api_get_utc_datetime($start_date, true, true))

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

                    c_id = $course_id AND

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

        return $next_description_type;

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

        if (!empty($a_thematic_advance_ids) && count($a_thematic_advance_ids) > 0) {

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

        $a_thematic_advance_ids = [];

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

                FROM $tbl_thematic

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

        $this->updateDoneThematicAdvance($last_done_thematic_advance, $course, $session);

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

            $thematic_plan = $thematic->getPlans();

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

                        href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.

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

    public function get_next_description_type($thematic_id)

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

        if (!empty($a_thematic_advance_ids)) {

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

        if (!empty($thematic_data)) {

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

                $next_advance_not_done = array_shift($a_thematic_advance_ids);

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

            foreach ($thematic_data as $thematic) {

Missing function doc comment
Open

    public function delete(int|array $thematicId): void

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

                foreach ($thematic_plan as $item) {

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

                $data[] = [$i, $thematic_advance[1], $thematic_advance[2], $thematic_advance[3], $actions];

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

        $description_type = (int) $description_type;

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

            $thematic = Container::getThematicRepository()->find($thematic_id);

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

        $thematic = $repo->find($thematic_id);

Method name "Thematic::get_next_description_type" is not in camel caps format
Open

    public function get_next_description_type($thematic_id)

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

                    thematic_id = $thematic_id AND

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

        $this->course_int_id = api_get_course_int_id();

Missing parameter name
Open

     * @param   string  Order (ASC,DESC)

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

            'descriptionType' => $description_type,

Method name "Thematic::thematic_plan_destroy" is not in camel caps format
Open

    public function thematic_plan_destroy($thematic_id, $descriptionType)

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

        $thematic_id = intval($thematic_id);

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

                FROM $tbl_thematic_plan

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

                        if (1 == $thematic_advance->getDoneAdvance()) {

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

            foreach ($thematic_data as $thematic) {

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

                        $a_thematic_advance_ids[] = $advance->getIid();

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

        return $repo->count(['thematic' => $thematic_id]);

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

                $thematic_advance[1] = api_get_local_time($thematic_advance[1]);

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

    public function thematic_plan_destroy($thematic_id, $descriptionType)

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

            $next_description_type = $last_description_type + 1;

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

        $course_id = api_get_course_int_id();

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

                            $a_thematic_advance_ids[] = $thematic_advance->getIid();

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

        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

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

            $last_done_advance_id = intval($last_done_advance_id);

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

        return $last_done_advance_id;

Missing parameter name
Open

     * @param   int Offset (if you want to get an item that is not directly the next)

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

        $thematic_data = self::getThematicList($course, $session);

Missing parameter name
Open

     * @param    int     Thematic id

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

    public function set_thematic_id($thematic_id)

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

        $default_thematic_plan_titles[3] = get_lang('Methodology');

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

        return $default_thematic_plan_icon;

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

        $this->attendance_id = $attendance_id;

Method name "Thematic::get_thematic_id" is not in camel caps format
Open

    public function get_thematic_id()

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

        return $total_average;

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

            foreach ($advances as $thematic_advance) {

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

        $thematic_id = 0,

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

        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');

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

        $default_thematic_plan_icon[5] = 'icons/32/assessment.png';

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

        $start_date = null,

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

        $this->thematic_id = $thematic_id;

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

        $this->thematic_id = $thematic_id;

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

        $default_thematic_plan_icon[4] = 'icons/32/laptop.png';

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

        $default_thematic_plan_icon[6] = 'icons/32/wizard.png';

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

        $default_thematic_plan_icon[3] = 'icons/32/strategy.png';

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

                if ($thematic_advance->getDoneAdvance()) {

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

        $this->start_date = $start_date;

Missing parameter name
Open

     * @param    int        Attendance id

Missing parameter name
Open

     * @param    int        Duration in hours

Method name "Thematic::get_default_thematic_plan_title" is not in camel caps format
Open

    public function get_default_thematic_plan_title()

Missing parameter name
Open

     * @param    string    Date and time

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

        $default_thematic_plan_titles[4] = get_lang('Infrastructure');

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

        return $default_thematic_plan_titles;

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

            $count = count($thematic_data);

Method name "Thematic::set_thematic_advance_attributes" is not in camel caps format
Open

    public function set_thematic_advance_attributes(

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

        $this->thematic_advance_content = $content;

Method name "Thematic::set_thematic_id" is not in camel caps format
Open

    public function set_thematic_id($thematic_id)

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

        $default_thematic_plan_titles[1] = get_lang('Objectives');

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

        $this->attendance_id = $attendance_id;

Method name "Thematic::get_default_question" is not in camel caps format
Open

    public function get_default_question()

Missing parameter name
Open

     * @param    string    Content

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

        $this->thematic_id = $thematic_id;

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

        return $this->thematic_id;

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

        $default_thematic_plan_titles = [];

Method name "Thematic::get_default_thematic_plan_icon" is not in camel caps format
Open

    public function get_default_thematic_plan_icon()

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

        $default_thematic_plan_icon[1] = 'icons/32/objective.png';

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

        $this->thematic_advance_id = $id;

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

        $this->thematic_id = $thematic_id;

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

        $default_thematic_plan_titles[6] = get_lang('Others');

Method name "Thematic::get_average_of_advances_by_thematic" is not in camel caps format
Open

    public function get_average_of_advances_by_thematic($thematic)

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

        $attendance_id = 0,

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

        $default_thematic_plan_titles[5] = get_lang('Assessment');

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

        $this->start_date = $start_date;

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

        $default_thematic_plan_icon[2] = 'icons/32/skills.png';

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

            $total_average = round(($score * 100) / ($count * 100));

Expected 26 spaces after parameter type; 1 found
Open

     * @param int $id Thematic advance id

Missing parameter name
Open

     * @param    int        Thematic id

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

        $default_thematic_plan_icon = [];

Arguments with default values must be at the end of the argument list
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)

The variable $thematic_advanced is not named in camelCase.
Open

    public function copy($thematicId)
    {
        $repo = Container::getThematicRepository();
        /** @var CThematic $thematic */
        $thematic = $repo->find($thematicId);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_thematic_advance is not named in camelCase.
Open

    public function moveThematic(string $direction, int $thematicId, Course $course, ?Session $session = null): bool
    {
        $em = Database::getManager();
        $thematicRepo = $em->getRepository(CThematic::class);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_plan is not named in camelCase.
Open

    public function copy($thematicId)
    {
        $repo = Container::getThematicRepository();
        /** @var CThematic $thematic */
        $thematic = $repo->find($thematicId);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public static function get_number_of_thematic_advances(array $params): int
    {
        $thematic_id = (int) $params['thematic_id'];
        $repo = Container::getThematicAdvanceRepository();
        return $repo->count(['thematic' => $thematic_id]);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function updateDoneThematicAdvance($advanceId, $course, $session = null)
    {
        $em = Database::getManager();
        $list = self::getThematicList($course, $session);
        $ordered = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_plan is not named in camelCase.
Open

    public function copy($thematicId)
    {
        $repo = Container::getThematicRepository();
        /** @var CThematic $thematic */
        $thematic = $repo->find($thematicId);
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $number_of_items is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function thematic_plan_destroy($thematic_id, $descriptionType)
    {
        $repo = Container::getThematicRepository();

        /** @var CThematic $thematic */
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_id is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public static function get_number_of_thematic_advances(array $params): int
    {
        $thematic_id = (int) $params['thematic_id'];
        $repo = Container::getThematicAdvanceRepository();
        return $repo->count(['thematic' => $thematic_id]);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $start_date is not named in camelCase.
Open

    public function thematicAdvanceSave(
        CThematic $thematic,
        CAttendance $attendance = null,
        CThematicAdvance $advance = null,
        $content,
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advanced is not named in camelCase.
Open

    public function copy($thematicId)
    {
        $repo = Container::getThematicRepository();
        /** @var CThematic $thematic */
        $thematic = $repo->find($thematicId);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $condition_session is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $description_type is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $number_of_items is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function updateDoneThematicAdvance($advanceId, $course, $session = null)
    {
        $em = Database::getManager();
        $list = self::getThematicList($course, $session);
        $ordered = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_id is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_thematic_advance is not named in camelCase.
Open

    public function moveThematic(string $direction, int $thematicId, Course $course, ?Session $session = null): bool
    {
        $em = Database::getManager();
        $thematicRepo = $em->getRepository(CThematic::class);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advanced is not named in camelCase.
Open

    public function copy($thematicId)
    {
        $repo = Container::getThematicRepository();
        /** @var CThematic $thematic */
        $thematic = $repo->find($thematicId);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $condition_session is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $start_date is not named in camelCase.
Open

    public function thematicAdvanceSave(
        CThematic $thematic,
        CAttendance $attendance = null,
        CThematicAdvance $advance = null,
        $content,
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $description_type is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $description_type is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_thematic is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $affected_rows is not named in camelCase.
Open

    public function thematic_plan_destroy($thematic_id, $descriptionType)
    {
        $repo = Container::getThematicRepository();

        /** @var CThematic $thematic */
Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_advance_id is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_advance_not_done is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_advance_not_done is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_id is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $condition_session is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_id is not named in camelCase.
Open

    public function updateDoneThematicAdvance($advanceId, $course, $session = null)
    {
        $em = Database::getManager();
        $list = self::getThematicList($course, $session);
        $ordered = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_advance_not_done is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_thematic is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_plan is not named in camelCase.
Open

    public function copy($thematicId)
    {
        $repo = Container::getThematicRepository();
        /** @var CThematic $thematic */
        $thematic = $repo->find($thematicId);
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_advance_id is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_advance_not_done is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public function get_average_of_advances_by_thematic($thematic)
    {
        $advances = $thematic->getAdvances();
        $average = 0;
        if ($advances->count()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $description_type is not named in camelCase.
Open

    public function thematicPlanSave(CThematic $thematic, $title, $description, $description_type, $course = null, $session = null)
    {
        // protect data
        $thematic_id = $thematic->getIid();
        $description_type = (int) $description_type;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_thematic_plan is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function updateDoneThematicAdvance($advanceId, $course, $session = null)
    {
        $em = Database::getManager();
        $list = self::getThematicList($course, $session);
        $ordered = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_advance_id is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_id is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_advance_not_done is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $total_average is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $number_of_items is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_thematic_plan is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $next_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function updateDoneThematicAdvance($advanceId, $course, $session = null)
    {
        $em = Database::getManager();
        $list = self::getThematicList($course, $session);
        $ordered = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_advance_id is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $start_date is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function set_thematic_id($thematic_id)
    {
        $this->thematic_id = $thematic_id;
    }
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $last_done_advance_id is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $total_average is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $total_average is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 $affected_rows is not named in camelCase.
Open

    public function updateDoneThematicAdvance($advanceId, $course, $session = null)
    {
        $em = Database::getManager();
        $list = self::getThematicList($course, $session);
        $ordered = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $a_thematic_advance_ids is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_data is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_advance is not named in camelCase.
Open

    public function get_average_of_advances_by_thematic($thematic)
    {
        $advances = $thematic->getAdvances();
        $average = 0;
        if ($advances->count()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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 $thematic_id is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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 $attendance_id is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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 $default_thematic_plan_titles is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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 thematic_plan_destroy is not named in camelCase.
Open

    public function thematic_plan_destroy($thematic_id, $descriptionType)
    {
        $repo = Container::getThematicRepository();

        /** @var CThematic $thematic */
Severity: Minor
Found in public/main/inc/lib/thematic.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_number_of_thematics is not named in camelCase.
Open

    public function get_number_of_thematics()
    {
        $tbl_thematic = Database::get_course_table(TABLE_THEMATIC);
        $condition_session = '';
        if (!api_get_session_id()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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_next_thematic_advance_not_done is not named in camelCase.
Open

    public function get_next_thematic_advance_not_done($offset = 1, $course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        if (!empty($thematic_data)) {
Severity: Minor
Found in public/main/inc/lib/thematic.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_number_of_thematic_advances is not named in camelCase.
Open

    public static function get_number_of_thematic_advances(array $params): int
    {
        $thematic_id = (int) $params['thematic_id'];
        $repo = Container::getThematicAdvanceRepository();
        return $repo->count(['thematic' => $thematic_id]);
Severity: Minor
Found in public/main/inc/lib/thematic.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_next_description_type is not named in camelCase.
Open

    public function get_next_description_type($thematic_id)
    {
        // definition database table
        $tbl_thematic_plan = Database::get_course_table(TABLE_THEMATIC_PLAN);

Severity: Minor
Found in public/main/inc/lib/thematic.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_default_thematic_plan_icon is not named in camelCase.
Open

    public function get_default_thematic_plan_icon()
    {
        $default_thematic_plan_icon = [];
        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
Severity: Minor
Found in public/main/inc/lib/thematic.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_thematic_advance_data is not named in camelCase.
Open

    public static function get_thematic_advance_data($from, $number_of_items, $column, $direction, $params = [])
    {
        $table = Database::get_course_table(TABLE_THEMATIC_ADVANCE);
        $column = (int) $column;
        $from = (int) $from;
Severity: Minor
Found in public/main/inc/lib/thematic.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_last_done_thematic_advance is not named in camelCase.
Open

    public function get_last_done_thematic_advance($course, $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);
        $a_thematic_advance_ids = [];
        $last_done_advance_id = 0;
Severity: Minor
Found in public/main/inc/lib/thematic.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_default_question is not named in camelCase.
Open

    public function get_default_question()
    {
        $question = [];
        $question[1] = get_lang('What should the end results be when the learner has completed the course? What are the activities performed during the course?');
        $question[2] = get_lang('Skills to acquireQuestions');
Severity: Minor
Found in public/main/inc/lib/thematic.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 set_thematic_advance_attributes is not named in camelCase.
Open

    public function set_thematic_advance_attributes(
        $id = null,
        $thematic_id = 0,
        $attendance_id = 0,
        $content = '',
Severity: Minor
Found in public/main/inc/lib/thematic.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_total_average_of_thematic_advances is not named in camelCase.
Open

    public function get_total_average_of_thematic_advances(Course $course, Session $session = null)
    {
        $thematic_data = self::getThematicList($course, $session);

        $list = [];
Severity: Minor
Found in public/main/inc/lib/thematic.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 set_thematic_id is not named in camelCase.
Open

    public function set_thematic_id($thematic_id)
    {
        $this->thematic_id = $thematic_id;
    }
Severity: Minor
Found in public/main/inc/lib/thematic.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_thematic_id is not named in camelCase.
Open

    public function get_thematic_id()
    {
        return $this->thematic_id;
    }
Severity: Minor
Found in public/main/inc/lib/thematic.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_average_of_advances_by_thematic is not named in camelCase.
Open

    public function get_average_of_advances_by_thematic($thematic)
    {
        $advances = $thematic->getAdvances();
        $average = 0;
        if ($advances->count()) {
Severity: Minor
Found in public/main/inc/lib/thematic.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_default_thematic_plan_title is not named in camelCase.
Open

    public function get_default_thematic_plan_title()
    {
        $default_thematic_plan_titles = [];
        $default_thematic_plan_titles[1] = get_lang('Objectives');
        $default_thematic_plan_titles[2] = get_lang('Skills to acquire');
Severity: Minor
Found in public/main/inc/lib/thematic.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