chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The method display_glossary() has an NPath complexity of 2880. The configured NPath complexity threshold is 200.
Open

    public static function display_glossary()
    {
        // This function should always be called with the corresponding
        // parameter for view type. Meanwhile, use this cheap trick.
        $view = self::getGlossaryView();
Severity: Minor
Found in public/main/inc/lib/glossary.lib.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The class GlossaryManager has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.
Open

class GlossaryManager
{
    /**
     * Get all glossary terms.
     *
Severity: Minor
Found in public/main/inc/lib/glossary.lib.php by phpmd

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

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

        $template = new Template('', false, false, false, true, false, false);
Severity: Minor
Found in public/main/inc/lib/glossary.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 '981', column '24').
Open

            $pdf = new PDF(
Severity: Minor
Found in public/main/inc/lib/glossary.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 '526', column '21').
Open

        $form = new FormValidator(
Severity: Minor
Found in public/main/inc/lib/glossary.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 '546', column '30').
Open

                $table = new SortableTable(
Severity: Minor
Found in public/main/inc/lib/glossary.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 '975', column '29').
Open

            $template = new Template('', false, false, false, true, false, false);
Severity: Minor
Found in public/main/inc/lib/glossary.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 '954', column '20').
Open

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

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

        } else {
            $actionsLeft .= '<a href="'.$url.'&action=changeview&view=table">'.
                Display::getMdiIcon(StateIcon::LIST_VIEW, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Table view')).'</a>';
        }
Severity: Minor
Found in public/main/inc/lib/glossary.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 display_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if (api_is_allowed_to_edit(true, true)) {
                $content .= Display::noDataView(
                    get_lang('Glossary'),
                    Display::getMdiIcon(ObjectIcon::GLOSSARY, 'ch-tool-icon', null, ICON_SIZE_BIG),
Severity: Minor
Found in public/main/inc/lib/glossary.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 display_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

        } else {
            $qb = $repo->getResourcesByCourse($course, $session);
            $glossaries = $qb->getQuery()->getResult();
        }
Severity: Minor
Found in public/main/inc/lib/glossary.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 delete_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

            } else {
                $array[1] = $glossary->getDescription();
            }
Severity: Minor
Found in public/main/inc/lib/glossary.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 update_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $repo = Container::getGlossaryRepository();

            /** @var CGlossary $glossary */
            $glossary = $repo->find($values['glossary_id']);
Severity: Minor
Found in public/main/inc/lib/glossary.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 movePdfToDocuments uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            Display::addFlash(Display::return_message(get_lang('Nothing to add')));
        }
Severity: Minor
Found in public/main/inc/lib/glossary.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 save_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $glossary = new CGlossary();

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

            } else {
                $actionsLeft .= Display::url(
                    Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Sort Ascending')),
                    $url.'&'.http_build_query(['order' => 'ASC'])
                );
Severity: Minor
Found in public/main/inc/lib/glossary.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 '$number_of_items'.
Open

        $number_of_items,
Severity: Minor
Found in public/main/inc/lib/glossary.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 '$column'.
Open

        $column,
Severity: Minor
Found in public/main/inc/lib/glossary.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 '$from'.
Open

        $from,
Severity: Minor
Found in public/main/inc/lib/glossary.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 '$url_params'.
Open

    public static function actions_filter($glossary_id, $url_params, $row)
Severity: Minor
Found in public/main/inc/lib/glossary.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 '$direction'.
Open

        $direction
Severity: Minor
Found in public/main/inc/lib/glossary.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

The parameter $glossary_id is not named in camelCase.
Open

    public static function delete_glossary($glossary_id, $showMessage = true)
    {
        $repo = Container::getGlossaryRepository();
        /** @var CGlossary $glossary */
        $glossary = $repo->find($glossary_id);
Severity: Minor
Found in public/main/inc/lib/glossary.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 $url_params is not named in camelCase.
Open

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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 $number_of_items is not named in camelCase.
Open

    public static function get_glossary_data(
        $from,
        $number_of_items,
        $column,
        $direction
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_id is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_id is not named in camelCase.
Open

    public static function get_glossary_term_by_glossary_id($glossary_id)
    {
        $repo = Container::getGlossaryRepository();
        /** @var CGlossary $glossary */
        $glossary = $repo->find($glossary_id);
Severity: Minor
Found in public/main/inc/lib/glossary.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 $not_id is not named in camelCase.
Open

    public static function glossary_exists($term, $not_id = 0)
    {
        $repo = Container::getGlossaryRepository();

        $courseId = api_get_course_int_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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

Method name "GlossaryManager::save_glossary" is not in camel caps format
Open

    public static function save_glossary($values, $showMessage = true)

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

                href="'.api_get_self().'?action=delete_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'"

Method name "GlossaryManager::export_to_pdf" is not in camel caps format
Open

    public static function export_to_pdf()

Method name "GlossaryManager::update_glossary" is not in camel caps format
Open

    public static function update_glossary($values, $showMessage = true)

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

        $res_max = Database::query($get_max);

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

        $glossaryData = $repo->find($glossary_id);

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

        $course_id = api_get_course_int_id();

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

            if ($found && empty($next_id)) {

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

                ->setDisplayOrder($max_glossary_item + 1)

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

        $row = Database::fetch_array($res_max);

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

    public static function glossary_exists($term, $not_id = 0)

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

        $glossary = $repo->find($glossary_id);

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

        $number_of_items,

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

    public static function actions_filter($glossary_id, $url_params, $row)

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

        $glossary_id = $row[2];

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

                 WHERE c_id = $course_id  AND glossary_id = '".Database::escape_string($next_id)."'";

Method name "GlossaryManager::get_glossary_term_by_glossary_id" is not in camel caps format
Open

    public static function get_glossary_term_by_glossary_id($glossary_id)

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

        $glossary = $repo->find($glossary_id);

Method name "GlossaryManager::get_glossary_term_by_glossary_name" is not in camel caps format
Open

    public static function get_glossary_term_by_glossary_name($name)

Method name "GlossaryManager::display_glossary" is not in camel caps format
Open

    public static function display_glossary()

Method name "GlossaryManager::get_glossary_data" is not in camel caps format
Open

    public static function get_glossary_data(

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

                $next_id = $row['glossary_id'];

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

        $course_id = api_get_course_int_id();

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

    public static function actions_filter($glossary_id, $url_params, $row)

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

                 WHERE c_id = $course_id  AND glossary_id = '".Database::escape_string($next_id)."'";

Method name "GlossaryManager::get_max_glossary_item" is not in camel caps format
Open

    public static function get_max_glossary_item()

Missing function doc comment
Open

    public static function getGlossaryView(): string

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

                        self::actions_filter($glossary_item[2], '', $glossary_item).'</div>';

Method name "GlossaryManager::delete_glossary" is not in camel caps format
Open

    public static function delete_glossary($glossary_id, $showMessage = true)

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

            $content .= Display::panel($glossary_item[1], $glossary_item[0].' '.$actions);

Method name "GlossaryManager::reorder_glossary" is not in camel caps format
Open

    public static function reorder_glossary()

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

    public static function move_glossary($direction, $glossary_id)

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

                $current_id = $glossary_id;

Method name "GlossaryManager::get_glossary_terms" is not in camel caps format
Open

    public static function get_glossary_terms()

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

        if (0 == Database::num_rows($res_max)) {

Missing parameter name
Open

     * @param  int     Session ID filter (optional)

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

                 WHERE c_id = $course_id  AND glossary_id = '".Database::escape_string($current_id)."'";

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

        $get_max = "SELECT MAX(display_order) FROM $table

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

        $res_max = Database::query($get_max);

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

                $next_display_order = $row['display_order'];

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

                    c_id = $course_id AND

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

    public static function get_glossary_term_by_glossary_id($glossary_id)

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

            if ($row['glossary_id'] == $glossary_id) {

Missing function doc comment
Open

    public static function sorter($item1, $item2)

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

            if ($term == $item->getTitle() && $not_id != $item->getIid()) {

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

    public static function delete_glossary($glossary_id, $showMessage = true)

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

            $content .= Display::panel($glossary_item[1], $glossary_item[0].' '.$actions);

Method name "GlossaryManager::get_number_glossary_terms" is not in camel caps format
Open

    public static function get_number_glossary_terms($sessionId = 0)

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

        foreach ($glossaryList as $glossary_item) {

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

                        self::actions_filter($glossary_item[2], '', $glossary_item).'</div>';

Method name "GlossaryManager::move_glossary" is not in camel caps format
Open

    public static function move_glossary($direction, $glossary_id)

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

                WHERE c_id = $course_id

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

                $current_display_order = $row['display_order'];

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

        $sql1 = "UPDATE $table SET display_order = '".Database::escape_string($next_display_order)."'

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

                 WHERE c_id = $course_id  AND glossary_id = '".Database::escape_string($current_id)."'";

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

        $max_glossary_item = self::get_max_glossary_item();

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

        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.

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

                $current_id = $glossary_id;

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

        $course_id = api_get_course_int_id();

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

                    WHERE c_id = $course_id ";

Method name "GlossaryManager::glossary_exists" is not in camel caps format
Open

    public static function glossary_exists($term, $not_id = 0)

Method name "GlossaryManager::actions_filter" is not in camel caps format
Open

    public static function actions_filter($glossary_id, $url_params, $row)

Method name "GlossaryManager::javascript_glossary" is not in camel caps format
Open

    public static function javascript_glossary()

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

        $sql2 = "UPDATE $table SET display_order = '".Database::escape_string($current_display_order)."'

The variable $glossary_item is not named in camelCase.
Open

    public static function displayGlossaryList(): string
    {
        $glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
        $content = '';
        foreach ($glossaryList as $glossary_item) {
Severity: Minor
Found in public/main/inc/lib/glossary.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 static function get_glossary_term_by_glossary_name($name)
    {
        // @todo Filter by like on ORM
        $table = Database::get_course_table(TABLE_GLOSSARY);
        $sessionId = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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 static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_item is not named in camelCase.
Open

    public static function displayGlossaryList(): string
    {
        $glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
        $content = '';
        foreach ($glossaryList as $glossary_item) {
Severity: Minor
Found in public/main/inc/lib/glossary.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_id is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_id is not named in camelCase.
Open

    public static function delete_glossary($glossary_id, $showMessage = true)
    {
        $repo = Container::getGlossaryRepository();
        /** @var CGlossary $glossary */
        $glossary = $repo->find($glossary_id);
Severity: Minor
Found in public/main/inc/lib/glossary.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 static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

Severity: Minor
Found in public/main/inc/lib/glossary.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 static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function save_glossary($values, $showMessage = true)
    {
        if (!is_array($values) || !isset($values['title'])) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/glossary.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_display_order is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

Severity: Minor
Found in public/main/inc/lib/glossary.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 static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_id is not named in camelCase.
Open

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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_id is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

Severity: Minor
Found in public/main/inc/lib/glossary.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 static function get_glossary_term_by_glossary_name($name)
    {
        // @todo Filter by like on ORM
        $table = Database::get_course_table(TABLE_GLOSSARY);
        $sessionId = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $res_max is not named in camelCase.
Open

    public static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_item is not named in camelCase.
Open

    public static function displayGlossaryList(): string
    {
        $glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
        $content = '';
        foreach ($glossaryList as $glossary_item) {
Severity: Minor
Found in public/main/inc/lib/glossary.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_id is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

Severity: Minor
Found in public/main/inc/lib/glossary.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 static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_id is not named in camelCase.
Open

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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 $current_id is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function get_glossary_term_by_glossary_id($glossary_id)
    {
        $repo = Container::getGlossaryRepository();
        /** @var CGlossary $glossary */
        $glossary = $repo->find($glossary_id);
Severity: Minor
Found in public/main/inc/lib/glossary.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 $max_glossary_item is not named in camelCase.
Open

    public static function save_glossary($values, $showMessage = true)
    {
        if (!is_array($values) || !isset($values['title'])) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/glossary.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 $not_id is not named in camelCase.
Open

    public static function glossary_exists($term, $not_id = 0)
    {
        $repo = Container::getGlossaryRepository();

        $courseId = api_get_course_int_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $res_max is not named in camelCase.
Open

    public static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $get_max is not named in camelCase.
Open

    public static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_id is not named in camelCase.
Open

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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 $current_display_order is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function displayGlossaryList(): string
    {
        $glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
        $content = '';
        foreach ($glossaryList as $glossary_item) {
Severity: Minor
Found in public/main/inc/lib/glossary.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 $glossary_item is not named in camelCase.
Open

    public static function displayGlossaryList(): string
    {
        $glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
        $content = '';
        foreach ($glossaryList as $glossary_item) {
Severity: Minor
Found in public/main/inc/lib/glossary.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 get_glossary_term_by_glossary_id is not named in camelCase.
Open

    public static function get_glossary_term_by_glossary_id($glossary_id)
    {
        $repo = Container::getGlossaryRepository();
        /** @var CGlossary $glossary */
        $glossary = $repo->find($glossary_id);
Severity: Minor
Found in public/main/inc/lib/glossary.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_glossary_term_by_glossary_name is not named in camelCase.
Open

    public static function get_glossary_term_by_glossary_name($name)
    {
        // @todo Filter by like on ORM
        $table = Database::get_course_table(TABLE_GLOSSARY);
        $sessionId = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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 reorder_glossary is not named in camelCase.
Open

    public static function reorder_glossary()
    {
        $repo = Container::getGlossaryRepository();

        $courseId = api_get_course_int_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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 actions_filter is not named in camelCase.
Open

    public static function actions_filter($glossary_id, $url_params, $row)
    {
        $glossary_id = $row[2];
        $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
            Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
Severity: Minor
Found in public/main/inc/lib/glossary.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 save_glossary is not named in camelCase.
Open

    public static function save_glossary($values, $showMessage = true)
    {
        if (!is_array($values) || !isset($values['title'])) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/glossary.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 javascript_glossary is not named in camelCase.
Open

    public static function javascript_glossary()
    {
        return "<script>
            function confirmation (name) {
                if (confirm(\" ".get_lang("Do you really want to delete this term")." \"+ name + \" ?\")) {
Severity: Minor
Found in public/main/inc/lib/glossary.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 delete_glossary is not named in camelCase.
Open

    public static function delete_glossary($glossary_id, $showMessage = true)
    {
        $repo = Container::getGlossaryRepository();
        /** @var CGlossary $glossary */
        $glossary = $repo->find($glossary_id);
Severity: Minor
Found in public/main/inc/lib/glossary.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 move_glossary is not named in camelCase.
Open

    public static function move_glossary($direction, $glossary_id)
    {
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);

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

    public static function get_number_glossary_terms($sessionId = 0)
    {
        // @todo Filter by keywork dont work
        $repo = Container::getGlossaryRepository();

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

    public static function get_glossary_terms()
    {
        $glossaryData = [];
        $repo = Container::getGlossaryRepository();

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

    public static function get_max_glossary_item()
    {
        // @todo get max by orm
        /*
        $repo = Container::getGlossaryRepository();
Severity: Minor
Found in public/main/inc/lib/glossary.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 glossary_exists is not named in camelCase.
Open

    public static function glossary_exists($term, $not_id = 0)
    {
        $repo = Container::getGlossaryRepository();

        $courseId = api_get_course_int_id();
Severity: Minor
Found in public/main/inc/lib/glossary.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 export_to_pdf is not named in camelCase.
Open

    public static function export_to_pdf()
    {
        $data = self::get_glossary_data(
            0,
            self::get_number_glossary_terms(api_get_session_id()),
Severity: Minor
Found in public/main/inc/lib/glossary.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 display_glossary is not named in camelCase.
Open

    public static function display_glossary()
    {
        // This function should always be called with the corresponding
        // parameter for view type. Meanwhile, use this cheap trick.
        $view = self::getGlossaryView();
Severity: Minor
Found in public/main/inc/lib/glossary.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 update_glossary is not named in camelCase.
Open

    public static function update_glossary($values, $showMessage = true)
    {
        /*
        // Database table definition
        $table = Database::get_course_table(TABLE_GLOSSARY);
Severity: Minor
Found in public/main/inc/lib/glossary.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_glossary_data is not named in camelCase.
Open

    public static function get_glossary_data(
        $from,
        $number_of_items,
        $column,
        $direction
Severity: Minor
Found in public/main/inc/lib/glossary.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