chamilo/chamilo-lms

View on GitHub
public/main/session/session_add.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '35', column '27').
Open

    $xajax_response = new xajaxResponse();
Severity: Minor
Found in public/main/session/session_add.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

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

                        FROM '.$tbl_user.' user

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

$form->addElement('header', $tool_name);

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

            $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);

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

    $xajax_response = new xajaxResponse();

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

                            access_url_id = '.$access_url_id.'  AND

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

    $id_session_category = (int) $params['session_category'];

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

                        INNER JOIN '.$tbl_user_rel_access_url.' url_user

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

        $id_session_category,

Consider putting global function "search_coachs" in a static class
Open

function search_coachs($needle)

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

                FROM '.$tbl_user.' user

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

    $xajax_response->addAssign('ajax_list_coachs', 'innerHTML', api_utf8_encode($return));

Missing function doc comment
Open

function check_session_name($name)

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

$this_section = SECTION_PLATFORM_ADMIN;

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

                    $order_clause.'

Consider putting global function "check_session_name" in a static class
Open

function check_session_name($name)

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

    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);

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

        $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';

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

            if (-1 != $access_url_id) {

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

    return $xajax_response;

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

        $id_visibility,

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

            $order_clause.

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

    $id_visibility = $params['session_visibility'];

Missing function doc comment
Open

function search_coachs($needle)

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

            $access_url_id = api_get_current_access_url_id();

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

Display::display_header($tool_name);

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

$tool_name = get_lang('Add a training session');

The variable $tbl_user_rel_access_url is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $access_url_id is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $order_clause is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $access_url_id is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $order_clause is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $order_clause is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $xajax_response is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $xajax_response is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $access_url_id is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $xajax_response is not named in camelCase.
Open

function search_coachs($needle)
{
    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
    $xajax_response = new xajaxResponse();
    $return = '';
Severity: Minor
Found in public/main/session/session_add.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

There are no issues that match your filters.

Category
Status