chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The method save() has an NPath complexity of 10640. The configured NPath complexity threshold is 200.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 method editLink() has an NPath complexity of 31488. The configured NPath complexity threshold is 200.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 method listLinksAndCategories() has an NPath complexity of 16245. The configured NPath complexity threshold is 200.
Open

    public static function listLinksAndCategories(
        $courseId,
        $sessionId,
        $categoryId,
        $show = 'none',
Severity: Minor
Found in public/main/inc/lib/link.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 method getLinkForm() has an NPath complexity of 1152. The configured NPath complexity threshold is 200.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 method movecatlink() has an NPath complexity of 240. The configured NPath complexity threshold is 200.
Open

    public static function movecatlink($action, $catlinkid, $courseId = null, $sessionId = null)
    {
        $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);

        if (is_null($courseId)) {
Severity: Minor
Found in public/main/inc/lib/link.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 method showLinksPerCategory() has an NPath complexity of 1514. The configured NPath complexity threshold is 200.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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 Link has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
Open

class Link extends Model
{
    public $table;
    public $is_course_model = true;
    public $columns = [
Severity: Minor
Found in public/main/inc/lib/link.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 '159', column '33').
Open

                $ic_slide = new IndexableChunk();
Severity: Minor
Found in public/main/inc/lib/link.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 '224', column '27').
Open

                $di = new ChamiloIndexer();
Severity: Minor
Found in public/main/inc/lib/link.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 '389', column '27').
Open

                $di = new ChamiloIndexer();
Severity: Minor
Found in public/main/inc/lib/link.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 '1501', column '21').
Open

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

                $di = new ChamiloIndexer();
Severity: Minor
Found in public/main/inc/lib/link.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 '541', column '33').
Open

                $ic_slide = new IndexableChunk();
Severity: Minor
Found in public/main/inc/lib/link.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 '1628', column '21').
Open

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

        } else {
            $category = null;
            $repoCategory = Container::getLinkCategoryRepository();
            if (!empty($categoryId)) {
                /** @var CLinkCategory $category */
Severity: Minor
Found in public/main/inc/lib/link.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 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $link
                    ->setParent($category)
                    ->addCourseLink($courseEntity, api_get_session_entity($session_id))
                ;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

        } else {
            // Offset the start location to match the beginning of the ID string
            $pos += 2;
            // Get the ID string and return it
            $id = substr($url, $pos, $len);
Severity: Minor
Found in public/main/inc/lib/link.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 showCategoryAdminTools uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $tools .= Display::getMdiIcon(
                ActionIcon::DOWN,
                'ch-tool-icon-disabled',
                null,
Severity: Minor
Found in public/main/inc/lib/link.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 getLinkForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

            } else {
                $header .= '<a
                    class="'.$visibilityClass.'"
                    href="'.api_get_self().'?'.api_get_cidreq().'&category_id='.$categoryItemId.'">';
                $header .= Display::getMdiIcon(StateIcon::LIST_VIEW, 'ch-tool-icon', null, ICON_SIZE_SMALL);
Severity: Minor
Found in public/main/inc/lib/link.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 listLinksAndCategories uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $header .= get_lang('Edition not available from the session, please edit from the basic course.');
                    }
Severity: Minor
Found in public/main/inc/lib/link.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 getCategoryForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $form->addHeader(get_lang('Edit Category'));
            $my_cat_title = get_lang('Edit Category');
            $defaults = self::getCategory($id);
        }
Severity: Minor
Found in public/main/inc/lib/link.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 listLinksAndCategories uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if (!empty($linksPerCategory)) {
                $content .= Display::panel($linksPerCategory, get_lang('General'));
            }
        }
Severity: Minor
Found in public/main/inc/lib/link.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_youtube_video_id uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    return substr($url_parsed['path'], 7);
                }
Severity: Minor
Found in public/main/inc/lib/link.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 showLinksPerCategory 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(null, true)) {
                        $showLink = true;
                        $titleClass = 'text-muted';
                    }
Severity: Minor
Found in public/main/inc/lib/link.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 showCategoryAdminTools uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $tools .= Display::getMdiIcon(
                ActionIcon::UP,
                'ch-tool-icon-disabled',
                null,
Severity: Minor
Found in public/main/inc/lib/link.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_youtube_video_id uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                return substr($url_parsed['path'], 1);
            }
Severity: Minor
Found in public/main/inc/lib/link.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 '$showQuery'.
Open

    public function save($params, $showQuery = null, $showFlash = true)
Severity: Minor
Found in public/main/inc/lib/link.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 local variables such as '$onhomepage'.
Open

        $onhomepage = 0;
Severity: Minor
Found in public/main/inc/lib/link.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 parameters such as '$courseId'.
Open

        $courseId = null,
Severity: Minor
Found in public/main/inc/lib/link.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 '$sessionId'.
Open

        $sessionId = null
Severity: Minor
Found in public/main/inc/lib/link.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 '$withBaseContent'.
Open

    public static function getLinkCategories($courseId, $sessionId, $withBaseContent = true)
Severity: Minor
Found in public/main/inc/lib/link.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 '$withBaseContent'.
Open

        $withBaseContent = true
Severity: Minor
Found in public/main/inc/lib/link.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 $course_id is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 $is_course_model is not named in camelCase.
Open

class Link extends Model
{
    public $table;
    public $is_course_model = true;
    public $columns = [
Severity: Minor
Found in public/main/inc/lib/link.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

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

        $course_info = $this->getCourse();

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

                    ->addCourseLink($courseEntity, api_get_session_entity($session_id))

Missing function doc comment
Open

    public function __construct()

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

        $course_id = $course_info['real_id'];

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

        $session_id = api_get_session_id();

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

    public $is_course_model = true;

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

                $link_id && extension_loaded('xapian')

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

            $courseEntity = api_get_course_entity($course_id);

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

        $course_id = $course_info['real_id'];

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

                    ->addCourseLink($courseEntity, api_get_session_entity($session_id))

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

            $link_id = $link->getIid();

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

                $courseCode = $course_info['code'];

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

                foreach ($specific_fields as $specific_field) {

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

                        $sql_cat,

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

                        $course_id,

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

            $course_id = api_get_course_id();

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

            $tbl_se_ref = Database::get_main_table(

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                $session_img = '';

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

                foreach ($specific_fields as $specific_field) {

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

                $xapian_data = [

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

            $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);

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

        $courseEntity = api_get_course_entity($course_id);

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

                $se_ref = Database:: fetch_array($res);

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

                                    $course_id,

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

                $xapian_data = [

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

                $link_description = $all_specific_terms.' '.$link_description;

Missing parameter name
Open

     * @param $courseId

Missing parameter name
Open

     * @param   int Category ID

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

                                    $specific_field['id'],

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

                    $table_link_category = Database::get_course_table(

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

            $tbl_se_ref = Database::get_main_table(

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

        $course_id = $_course['real_id'];

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

                        $specific_field['id'],

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

                $ic_slide->addValue("title", $link_title);

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

                    $result = Database:: query($sql_cat);

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

                        $course_int_id,

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

                    $session_img = api_get_session_image($session->getId(), $user);

Method name "Link::get_youtube_video_id" is not in camel caps format
Open

    public static function get_youtube_video_id($url)

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

                $all_specific_terms = '';

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

                            $all_specific_terms .= ' '.$sterms;

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

                    SE_COURSE_ID => $course_id,

Missing parameter name
Open

     * @param int   Category ID

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

                $ic_slide->addValue('title', $title);

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

                        $table_link_category,

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

                        $course_id

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

    public static function delete_link_from_search_engine($course_id, $link_id)

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

        $course_id = api_get_course_int_id();

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

            $link_description = Database:: escape_string($values['description']);

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

                $course_id,

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

                $link_description = $all_specific_terms.' '.$link_description;

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

                    $sql_cat = 'SELECT * FROM %s WHERE id=%d and c_id = %d LIMIT 1';

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

                        $sql_cat,

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

                        $ic_slide->addValue(

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

                $di->remove_document($se_ref['search_did']);

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

                        $tbl_se_ref,

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

            $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);

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

                $specific_fields = get_specific_field_list();

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

                        $course_id,

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

                $ic_slide->addToolId(TOOL_LINK);

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                $ic_slide->addValue('content', $link_description);

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

                    $title .= $session_img;

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

                return substr($url_parsed['path'], 1);

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

                                $ic_slide->addTerm(

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

                        $ic_slide->addValue(

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

                        $tbl_se_ref,

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

            return $link_id;

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

            $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);

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

                                    $specific_field['code']

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

                    $title .= $link_validator;

Expected 15 spaces after parameter type; 1 found
Open

     * @param int $countCategories

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

                            $all_specific_terms .= ' '.$sterms;

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

                $description = $all_specific_terms.' '.$description;

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

            delete_all_values_for_item($course_id, TOOL_DOCUMENT, $link_id);

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

                        $course_id,

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

                    return substr($url_parsed['path'], 7);

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

            $target_link = $linkInfo['target'];

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

                        'link_id' => $link_id,

Missing function doc comment
Open

    public static function addCategory()

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

        $course_id = $_course['real_id'];

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

        $sessionEntity = api_get_session_entity($session_id);

Method name "Link::delete_link_from_search_engine" is not in camel caps format
Open

    public static function delete_link_from_search_engine($course_id, $link_id)

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

        $sql = "SELECT * FROM $tbl_link

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

                    if (isset($_REQUEST[$specific_field['code']])) {

Missing parameter name
Open

     * @param   int Session ID

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

            $sql = "SELECT id, display_order FROM $tbl_categories

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

        $is_youtube_link = strrpos($url, 'youtube') || strrpos(

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

                                    $specific_field['code']

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

                                    $link_id,

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                        $link_id,

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

            $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);

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

            $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);

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

        $tbl_link = Database::get_course_table(TABLE_LINK);

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

            $course_int_id = api_get_course_int_id();

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

                        $course_id,

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

            $specific_fields = get_specific_field_list();

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

                $specific_fields = get_specific_field_list();

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

        if (empty($category_title)) {

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

    public static function delete_link_from_search_engine($course_id, $link_id)

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

            $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);

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

        if (empty($id) || empty($course_id)) {

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

            $link_title = Database:: escape_string($values['title']);

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

                    $sql_cat = sprintf(

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

                $link_validator = '';

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

                    $link_validator .= Display::span(

Method name "Link::is_youtube_link" is not in camel caps format
Open

    public static function is_youtube_link($url)

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

                    if (isset($_REQUEST[$specific_field['code']])) {

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

                $ic_slide->addToolId(TOOL_LINK);

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

                    $result = Database:: query($sql_cat);

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

            delete_all_values_for_item($course_id, TOOL_DOCUMENT, $link_id);

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

                $ic_slide = new IndexableChunk();

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

                foreach ($specific_fields as $specific_field) {

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

                        $table_link_category,

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

                        $tbl_se_ref,

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

        $movetable = $tbl_categories;

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

                $all_specific_terms = '';

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

                $ic_slide->addCourseId($courseCode);

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

                $ic_slide->addValue('content', $description);

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

                    $sql_cat = 'SELECT * FROM %s WHERE id=%d AND c_id = %d LIMIT 1';

Missing function doc comment
Open

    public static function deleteCategory($id)

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

                            $_REQUEST[$specific_field['code']]

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

                                    $specific_field['id'],

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

                $ic_slide->addCourseId($course_id);

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

                $di->addChunk($ic_slide);

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

                $ic_slide = new IndexableChunk();

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

        $category_title = trim($_POST['category_title']);

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

        if (empty($id) || empty($course_id)) {

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

                $tbl_se_ref,

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

                $ic_slide->addValue("title", $link_title);

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

                $ic_slide->addCourseId($course_id);

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

                $link_description = $all_specific_terms.' '.$link_description;

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

                $ic_slide->addValue('content', $link_description);

Expected 7 spaces after parameter type; 1 found
Open

     * @param int $categoryId

Missing parameter name
Open

     * @param $sessionId

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

        $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);

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

            'target' => $target_link,

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

                        $sterms = trim($_REQUEST[$specific_field['code']]);

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                    $tbl_se_ref = Database::get_main_table(

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

        $session_id = api_get_session_id();

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

        $courseEntity = api_get_course_entity($course_id);

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

            ->setTitle($category_title)

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

                foreach ($specific_fields as $specific_field) {

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

                                $ic_slide->addTerm(

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

                        $course_int_id

Missing function doc comment
Open

    public static function setInvisible($id, $scope)

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                ).'</a>';

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

            $url_parsed = parse_url($url);

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

                    $sql_cat = sprintf(

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

                $di->addChunk($ic_slide);

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                    $table_link_category = Database::get_course_table(

Expected 6 spaces after parameter type; 1 found
Open

     * @param bool $withBaseContent

Expected 15 spaces after parameter type; 1 found
Open

     * @param int $currentCategory

Missing parameter name
Open

     * @param   int Course ID

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

        return $is_youtube_link;

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

        $target_link = '_blank';

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

                $form->addText($specific_field['name'], $specific_field['code']);

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

            foreach ($specific_fields as $specific_field) {

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

                $default_values = '';

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

                        $arr_str_values = [];

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

        $form->addButtonSave($my_cat_title, 'submitCategory');

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

                            $arr_str_values[] = $value['value'];

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

                $defaults[$specific_field['name']] = $default_values;

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

            $my_cat_title = get_lang('Add a category');

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

            foreach ($specific_fields as $specific_field) {

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

                        $default_values = implode(', ', $arr_str_values);

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

                        $default_values = implode(', ', $arr_str_values);

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

            $my_cat_title = get_lang('Edit Category');

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

                $defaults[$specific_field['name']] = $default_values;

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

                        'field_id' => $specific_field['id'],

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

                $form->addText($specific_field['name'], $specific_field['code']);

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                ).'</a>';

The variable $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $all_specific_terms is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 $session_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $session_id is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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_info is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $link_title is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $se_ref is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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_link is not named in camelCase.
Open

    public static function getLinkInfo($id)
    {
        $tbl_link = Database::get_course_table(TABLE_LINK);
        $course_id = api_get_course_int_id();
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $table_link_category is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $xapian_data is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $category_title is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $session_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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_info is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $xapian_data is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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_int_id is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $all_specific_terms is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $session_id is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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_info is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $category_title is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $link_description is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $session_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_fields is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $all_specific_terms is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $link_id is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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_link is not named in camelCase.
Open

    public static function getLinkInfo($id)
    {
        $tbl_link = Database::get_course_table(TABLE_LINK);
        $course_id = api_get_course_int_id();
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 getLinkInfo($id)
    {
        $tbl_link = Database::get_course_table(TABLE_LINK);
        $course_id = api_get_course_int_id();
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_fields is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_fields is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $table_link_category is not named in camelCase.
Open

    public function save($params, $showQuery = null, $showFlash = true)
    {
        $course_info = $this->getCourse();
        $course_id = $course_info['real_id'];
        $session_id = api_get_session_id();
Severity: Minor
Found in public/main/inc/lib/link.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 $category_title is not named in camelCase.
Open

    public static function addCategory()
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $category_title = trim($_POST['category_title']);
Severity: Minor
Found in public/main/inc/lib/link.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 getLinkInfo($id)
    {
        $tbl_link = Database::get_course_table(TABLE_LINK);
        $course_id = api_get_course_int_id();
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $is_youtube_link is not named in camelCase.
Open

    public static function is_youtube_link($url)
    {
        $is_youtube_link = strrpos($url, 'youtube') || strrpos(
            $url,
            'youtu.be'
Severity: Minor
Found in public/main/inc/lib/link.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 $table_link_category is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_categories is not named in camelCase.
Open

    public static function movecatlink($action, $catlinkid, $courseId = null, $sessionId = null)
    {
        $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);

        if (is_null($courseId)) {
Severity: Minor
Found in public/main/inc/lib/link.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 $target_link is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $all_specific_terms is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_int_id is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $target_link is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $link_description is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $url_parsed is not named in camelCase.
Open

    public static function get_youtube_video_id($url)
    {
        // This is the length of YouTube's video IDs
        $len = 11;

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

    public static function getCategoryForm($id, $action)
    {
        $id = (int) $id;
        $action = Security::remove_XSS($action);

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

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $link_description is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_se_ref is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_int_id is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_values is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $arr_str_values is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $session_img is not named in camelCase.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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_values is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $all_specific_terms is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_fields is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $link_description is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $sql_cat is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $session_img is not named in camelCase.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $my_cat_title is not named in camelCase.
Open

    public static function getCategoryForm($id, $action)
    {
        $id = (int) $id;
        $action = Security::remove_XSS($action);

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

    public static function get_youtube_video_id($url)
    {
        // This is the length of YouTube's video IDs
        $len = 11;

Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $session_img is not named in camelCase.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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 $link_validator is not named in camelCase.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $arr_str_values is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_categories is not named in camelCase.
Open

    public static function movecatlink($action, $catlinkid, $courseId = null, $sessionId = null)
    {
        $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);

        if (is_null($courseId)) {
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $se_ref is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $link_validator is not named in camelCase.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_fields is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $xapian_data is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $all_specific_terms is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $link_validator is not named in camelCase.
Open

    public static function showLinksPerCategory($categoryId, $courseId, $sessionId, $showActionLinks = true)
    {
        global $token;
        $links = self::getLinksPerCategory($categoryId, $courseId, $sessionId);
        $content = '';
Severity: Minor
Found in public/main/inc/lib/link.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_categories is not named in camelCase.
Open

    public static function movecatlink($action, $catlinkid, $courseId = null, $sessionId = null)
    {
        $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);

        if (is_null($courseId)) {
Severity: Minor
Found in public/main/inc/lib/link.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 $url_parsed is not named in camelCase.
Open

    public static function get_youtube_video_id($url)
    {
        // This is the length of YouTube's video IDs
        $len = 11;

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

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $ic_slide is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $xapian_data is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $is_youtube_link is not named in camelCase.
Open

    public static function is_youtube_link($url)
    {
        $is_youtube_link = strrpos($url, 'youtube') || strrpos(
            $url,
            'youtu.be'
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_fields is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $specific_field is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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 $table_link_category is not named in camelCase.
Open

    public static function editLink($id, $values = [])
    {
        $_course = api_get_course_info();
        $course_id = $_course['real_id'];
        $id = (int) $id;
Severity: Minor
Found in public/main/inc/lib/link.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_values is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $arr_str_values is not named in camelCase.
Open

    public static function getLinkForm($linkId, $action, $token = null)
    {
        $courseId = api_get_course_int_id();
        $sessionId = api_get_session_id();
        $linkInfo = self::getLinkInfo($linkId);
Severity: Minor
Found in public/main/inc/lib/link.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 $my_cat_title is not named in camelCase.
Open

    public static function getCategoryForm($id, $action)
    {
        $id = (int) $id;
        $action = Security::remove_XSS($action);

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

    public static function delete_link_from_search_engine($course_id, $link_id)
    {
        // Remove from search engine if enabled.
        if ('true' === api_get_setting('search_enabled')) {
            $tbl_se_ref = Database::get_main_table(
Severity: Minor
Found in public/main/inc/lib/link.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 is_youtube_link is not named in camelCase.
Open

    public static function is_youtube_link($url)
    {
        $is_youtube_link = strrpos($url, 'youtube') || strrpos(
            $url,
            'youtu.be'
Severity: Minor
Found in public/main/inc/lib/link.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_youtube_video_id is not named in camelCase.
Open

    public static function get_youtube_video_id($url)
    {
        // This is the length of YouTube's video IDs
        $len = 11;

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