chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The method set_js_files() has an NPath complexity of 51840. The configured NPath complexity threshold is 200.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.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 assignSocialMeta() has an NPath complexity of 289. The configured NPath complexity threshold is 200.
Open

    private function assignSocialMeta()
    {
        $socialMeta = '';
        $metaTitle = api_get_setting('meta_title');
        if (!empty($metaTitle)) {
Severity: Minor
Found in public/main/inc/lib/template.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 addHTTPSecurityHeaders() has an NPath complexity of 512. The configured NPath complexity threshold is 200.
Open

    private function addHTTPSecurityHeaders()
    {
        // Implementation of HTTP headers security, as suggested and checked
        // by https://securityheaders.io/
        // Enable these settings in configuration.php to use them on your site
Severity: Minor
Found in public/main/inc/lib/template.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 Template has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.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 '814', column '21').
Open

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

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

            } else {
                array_unshift(
                    $interbreadcrumb,
                    ['name' => $courseInfo['title'], 'url' => $url]
                );
Severity: Minor
Found in public/main/inc/lib/template.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 set_js_files uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $courseLogoutCode = "
                <script>
                var logOutUrl = '".$ajax."course.ajax.php?a=course_logout&".api_get_cidreq()."';
                function courseLogout() {
Severity: Minor
Found in public/main/inc/lib/template.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 setHelp uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

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

                } else {
                    // Otherwise (not a course nor a session, nor a user, nor a badge), publish portal info
                    $socialMeta .= '<meta property="og:title" content="'.$metaTitle.'" />'."\n";
                    $socialMeta .= '<meta property="twitter:title" content="'.$metaTitle.'" />'."\n";
                    $socialMeta .= '<meta property="og:url" content="'.api_get_path(WEB_PATH).'" />'."\n";
Severity: Minor
Found in public/main/inc/lib/template.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 assignSocialMeta uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

        } else {
            $logo = Container::getThemeHelper()->getThemeAssetUrl('images/header-logo.svg');

            if (empty($logo)) {
                $logo = Container::getThemeHelper()->getThemeAssetUrl('images/header-logo.png');
Severity: Minor
Found in public/main/inc/lib/template.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 private methods such as 'addHTTPSecurityHeaders'.
Open

    private function addHTTPSecurityHeaders()
    {
        // Implementation of HTTP headers security, as suggested and checked
        // by https://securityheaders.io/
        // Enable these settings in configuration.php to use them on your site
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

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

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

        $action_string = '';
Severity: Minor
Found in public/main/inc/lib/template.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 '$responseCode'.
Open

        $responseCode = 0
Severity: Minor
Found in public/main/inc/lib/template.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 '$sendHeaders'.
Open

        $sendHeaders = true,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused private methods such as 'set_course_parameters'.
Open

    private function set_course_parameters()
    {
        //Setting course id
        $course = api_get_course_info();
        if (empty($course)) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

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

Avoid unused private methods such as 'assignSocialMeta'.
Open

    private function assignSocialMeta()
    {
        $socialMeta = '';
        $metaTitle = api_get_setting('meta_title');
        if (!empty($metaTitle)) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

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

Avoid unused private methods such as 'assignAccessibilityBlock'.
Open

    private function assignAccessibilityBlock()
    {
        $resize = '';
        if ('true' == api_get_setting('accessibility_font_resize')) {
            $resize .= '<div class="resize_font">';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

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

The property $preview_theme is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $show_learnpath is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.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 $load_plugins is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.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 $course_id is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $force_plugin_load is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $hide_global_chat is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.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 $show_header is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $menu_navigation is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $user_is_logged_in is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $show_footer is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.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 $show_footer is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $show_learnpath is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $load_plugins is not named in camelCase.
Open

class Template
{
    /**
     * The Template folder name see main/template.
     *
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $show_header is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.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

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

    public $user_is_logged_in = false;

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

        $show_header = true,

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

            $this->assign('css_static_file_to_string', $css_file_to_string);

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

        $navigator_info = api_get_navigator();

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

            $style_print = '';

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

            $this->assign('css_style_print', $style_print);

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

        global $disable_js_and_css_files, $htmlHeadXtra;

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

        $js_files = [

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

        if (!$disable_js_and_css_files) {

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

        global $disable_js_and_css_files;

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

        if (!$disable_js_and_css_files) {

Method name "Template::show_footer_js_template" is not in camel caps format
Open

    public function show_footer_js_template()

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

    public $show_learnpath = false; // This is a learnpath section or not?

Doc comment for parameter $sendHeaders does not match actual variable name $responseCode
Open

     * @param bool   $sendHeaders      send http headers or not

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

        $load_plugins = true,

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

        $this->show_header = $status;

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

        $show_toolbar = 0;

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

        if ('Internet Explorer' == $navigator_info['name'] && '6' == $navigator_info['version']) {

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

        $this->course_id = $course['id'];

Missing function doc comment
Open

    public function displayTwoColTemplate()

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

                $show_toolbar = true;

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

        $js_file_to_string = '';

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

        $show_footer = true,

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

        return $show_toolbar;

Method name "Template::set_header" is not in camel caps format
Open

    public function set_header($status)

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

        $this->assign('show_toolbar', $show_toolbar);

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

            $css_file_to_string .= api_get_css($file);

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

        if (!$disable_js_and_css_files) {

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

        global $disable_js_and_css_files;

Missing function doc comment
Open

    public static function setVueParams(&$params)

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

        $js_file_to_string = '';

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

                $show_footer = false;

Declare public methods first,then protected ones and finally private ones
Open

    public function setHelp($helpInput = null)

Method name "Template::display_no_layout_template" is not in camel caps format
Open

    public function display_no_layout_template()

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

        $show_course_navigation_menu = '';

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

        $css_file_to_string = '';

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

        foreach ($js_files as $file) {

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

            if (false == $this->show_learnpath && true == $this->show_footer && false == $this->hide_global_chat) {

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

        foreach ($js_files as $js_file) {

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

    public $preview_theme = '';

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

    public $show_header;

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

        $show_learnpath = false,

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

        $css_file_to_string = '';

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

                true == $this->show_footer &&

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

                $js_files[] = 'chat/js/chat.js';

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

            $js_file_to_string .= api_get_js($js_file);

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

    public $show_footer;

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

                $this->show_learnpath = true;

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

        $action_string = '';

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

        $this->assign('show_course_navigation_menu', $show_course_navigation_menu);

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

        if ($this->show_learnpath) {

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

                false == $this->hide_global_chat

Method name "Template::set_js_files_post" is not in camel caps format
Open

    public function set_js_files_post()

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

    public $load_plugins = false;

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

    public $force_plugin_load = false;

Method name "Template::set_actions" is not in camel caps format
Open

    public function set_actions($actions)

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

        $show_admin_toolbar = api_get_setting('show_admin_toolbar');

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

                $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);

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

                    $captcha_question

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

    public $menu_navigation = []; //Used in the userportal.lib.php function: return_navigation_course_links()

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

        $this->load_plugins = $load_plugins;

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

                    $show_toolbar = true;

Missing parameter name
Open

     * @param bool true if we show the header

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

        global $disable_js_and_css_files;

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

            $css_file_to_string .= api_get_css($file);

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

            $css_file_to_string .= '<style>

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

            $this->assign('css_custom_file_to_string', $css_file_to_string);

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

            $this->assign('js_file_to_string', $js_file_to_string);

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

            $js_file_to_string .= api_get_js($js_file);

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

    public $course_id = null;

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

        $this->show_learnpath = $show_learnpath;

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

                $action_string .= $action;

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

        if ('Internet Explorer' == $navigator_info['name'] && '6' == $navigator_info['version']) {

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

        if (!$disable_js_and_css_files) {

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

            if (false == $this->show_learnpath &&

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

                foreach ($htmlHeadXtra as &$this_html_head) {

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

                    $show_toolbar = true;

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

        $js_files = [];

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

        foreach ($js_files as $js_file) {

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

        $hide_global_chat = false,

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

                $show_header = false;

Method name "Template::display_one_col_template" is not in camel caps format
Open

    public function display_one_col_template()

Method name "Template::display_blank_template" is not in camel caps format
Open

    public function display_blank_template()

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

            $js_file_to_string .= $this->fetch($template);

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

            $this->assign('js_file_to_string_post', $js_file_to_string);

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

            $this->user_is_logged_in

Doc comment for parameter $responseCode does not match actual variable name $sendHeaders
Open

     * @param int    $responseCode

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

        $this->show_learnpath = $show_learnpath;

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

        $this->load_plugins = $load_plugins;

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

                $style_print = api_get_css(

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

        if ('true' === api_get_setting('show_link_bug_notification') && $this->user_is_logged_in) {

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

        $this->hide_global_chat = $hide_global_chat;

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

        $show_toolbar = false;

Method name "Template::get_template" is not in camel caps format
Open

    public function get_template($name)

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

                $js_files[] = 'chat/js/chat.js';

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

        if (empty($this->show_learnpath)) {

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

        $this->hide_global_chat = $hide_global_chat;

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

            $show_toolbar = 1;

Method name "Template::set_js_files" is not in camel caps format
Open

    public function set_js_files()

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

            $js_files[] = 'fontresize.js';

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

                    $extraHeaders .= $this_html_head."\n";

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

            if (false == $this->show_learnpath && true == $this->show_footer && false == $this->hide_global_chat) {

Missing function doc comment
Open

    public function getResponseCode()

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

        switch ($show_admin_toolbar) {

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

            $css_file_to_string .= 'img, div { behavior: url('.api_get_path(WEB_LIBRARY_PATH).'javascript/iepngfix/iepngfix.htc) } '."\n";

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

            if (false == $this->show_learnpath && true == $this->show_footer && false == $this->hide_global_chat) {

Method name "Template::set_course_parameters" is not in camel caps format
Open

    private function set_course_parameters()

The variable $show_toolbar is not named in camelCase.
Open

    public function set_header($status)
    {
        $this->show_header = $status;
        $this->assign('show_header', $status);

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_course_navigation_menu is not named in camelCase.
Open

    public function set_header($status)
    {
        $this->show_header = $status;
        $this->assign('show_header', $status);

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssFiles()
    {
        global $disable_js_and_css_files;
        $css = [];

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $navigator_info is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file_to_string is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $load_plugins is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_s is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $action_string is not named in camelCase.
Open

    public function set_actions($actions)
    {
        $action_string = '';
        if (!empty($actions)) {
            foreach ($actions as $action) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function setCssFiles()
    {
        global $disable_js_and_css_files;
        $css = [];

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file_to_string is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public function set_header($status)
    {
        $this->show_header = $status;
        $this->assign('show_header', $status);

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssFiles()
    {
        global $disable_js_and_css_files;
        $css = [];

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $this_html_head is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file_to_string is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $captcha_question is not named in camelCase.
Open

    public function displayLoginForm()
    {
        $form = new FormValidator(
            'form-login',
            'POST',
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $style_print is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $action_string is not named in camelCase.
Open

    public function set_actions($actions)
    {
        $action_string = '';
        if (!empty($actions)) {
            foreach ($actions as $action) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file_to_string is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $hide_global_chat is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public function set_header($status)
    {
        $this->show_header = $status;
        $this->assign('show_header', $status);

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssFiles()
    {
        global $disable_js_and_css_files;
        $css = [];

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_c is not named in camelCase.
Open

    private function set_course_parameters()
    {
        //Setting course id
        $course = api_get_course_info();
        if (empty($course)) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_course_navigation_menu is not named in camelCase.
Open

    public function set_header($status)
    {
        $this->show_header = $status;
        $this->assign('show_header', $status);

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function setCssFiles()
    {
        global $disable_js_and_css_files;
        $css = [];

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $style_print is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $style_print is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file_to_string is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $captcha_question is not named in camelCase.
Open

    public function displayLoginForm()
    {
        $form = new FormValidator(
            'form-login',
            'POST',
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_learnpath is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_admin_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_admin_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_toolbar is not named in camelCase.
Open

    public static function isToolBarDisplayedForUser()
    {
        //Toolbar
        $show_admin_toolbar = api_get_setting('show_admin_toolbar');
        $show_toolbar = false;
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $this_html_head is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_c is not named in camelCase.
Open

    private function set_course_parameters()
    {
        //Setting course id
        $course = api_get_course_info();
        if (empty($course)) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $navigator_info is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_files is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_footer is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $navigator_info is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_s is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $disable_js_and_css_files is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $js_file_to_string is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_header is not named in camelCase.
Open

    public function __construct(
        $title = '',
        $show_header = true,
        $show_footer = true,
        $show_learnpath = false,
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $css_file_to_string is not named in camelCase.
Open

    public function setCssCustomFiles()
    {
        global $disable_js_and_css_files;
        $css = [];
        if ($this->show_learnpath) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public function set_actions($actions)
    {
        $action_string = '';
        if (!empty($actions)) {
            foreach ($actions as $action) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method set_js_files is not named in camelCase.
Open

    public function set_js_files()
    {
        global $disable_js_and_css_files, $htmlHeadXtra;
        $isoCode = api_get_language_isocode();
        $selectLink = 'bootstrap-select/dist/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method set_course_parameters is not named in camelCase.
Open

    private function set_course_parameters()
    {
        //Setting course id
        $course = api_get_course_info();
        if (empty($course)) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method display_one_col_template is not named in camelCase.
Open

    public function display_one_col_template()
    {
        $this->loadLegacyParams();
        $template = '@ChamiloCore/Layout/layout_one_col.html.twig';
        $origin = api_get_origin();
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method set_header is not named in camelCase.
Open

    public function set_header($status)
    {
        $this->show_header = $status;
        $this->assign('show_header', $status);

Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method set_js_files_post is not named in camelCase.
Open

    public function set_js_files_post()
    {
        global $disable_js_and_css_files;
        $js_files = [];
        if (api_is_global_chat_enabled()) {
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method show_footer_js_template is not named in camelCase.
Open

    public function show_footer_js_template()
    {
        $tpl = $this->get_template('layout/footer.js.tpl');
        $this->display($tpl);
    }
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method display_blank_template is not named in camelCase.
Open

    public function display_blank_template()
    {
        $this->loadLegacyParams();
        $template = '@ChamiloCore/Layout/blank.html.twig';
        $this->returnResponse($this->params, $template);
Severity: Minor
Found in public/main/inc/lib/template.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method display_no_layout_template is not named in camelCase.
Open

    public function display_no_layout_template()
    {
        $this->loadLegacyParams();
        $template = '@ChamiloCore/Layout/no_layout.html.twig';
        $this->returnResponse($this->params, $template);
Severity: Minor
Found in public/main/inc/lib/template.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_template is not named in camelCase.
Open

    public function get_template($name)
    {
        return api_find_template($name);
    }
Severity: Minor
Found in public/main/inc/lib/template.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