chamilo/chamilo-lms

View on GitHub
public/main/group/group_category.php

Summary

Maintainability
A
0 mins
Test Coverage

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

    if (GroupManager::MEMBER_PER_GROUP_NO_LIMIT == $max_member_no_limit) {

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

function check_max_number_of_members($value)

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

$course_id = api_get_course_int_id();

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

        $max_member = GroupManager::MEMBER_PER_GROUP_NO_LIMIT;

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

    $self_unreg_allowed = $values['self_unreg_allowed'] ?? 0;

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

    $possible_values[$i] = $i;

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

$current_course_tool = TOOL_GROUP;

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

    $form->createElement('select', 'groups_per_user', null, $possible_values, ['id' => 'groups_per_user']),

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

                $self_reg_allowed,

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

                $max_member,

Missing parameter name
Open

 * @param $value

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

$possible_values[GroupManager::GROUP_PER_MEMBER_NO_LIMIT] = get_lang('All');

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

function check_groups_per_user($value)

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

        GroupManager::get_current_max_groups_per_user($_POST['id']) > $groups_per_user) {

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

$possible_values = [];

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

    $groups_per_user = (int) $value['groups_per_user'];

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

        $max_member = $values['max_member'];

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

                $max_member,

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

    $max_member_no_limit = $value['max_member_no_limit'];

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

    $max_member = $value['max_member'];

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

        GroupManager::GROUP_PER_MEMBER_NO_LIMIT != $groups_per_user &&

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

    $self_reg_allowed = $values['self_reg_allowed'] ?? 0;

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

                $self_unreg_allowed,

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

                $self_unreg_allowed,

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

$this_section = SECTION_COURSES;

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

    return is_numeric($max_member);

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

                $self_reg_allowed,

Expected 0 spaces before closing bracket; newline found
Open

        Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('DocumentsAccess')

The variable $groups_per_user is not named in camelCase.
Open

function check_groups_per_user($value)
{
    $groups_per_user = (int) $value['groups_per_user'];
    if (isset($_POST['id']) &&
        GroupManager::GROUP_PER_MEMBER_NO_LIMIT != $groups_per_user &&
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $groups_per_user is not named in camelCase.
Open

function check_groups_per_user($value)
{
    $groups_per_user = (int) $value['groups_per_user'];
    if (isset($_POST['id']) &&
        GroupManager::GROUP_PER_MEMBER_NO_LIMIT != $groups_per_user &&
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $groups_per_user is not named in camelCase.
Open

function check_groups_per_user($value)
{
    $groups_per_user = (int) $value['groups_per_user'];
    if (isset($_POST['id']) &&
        GroupManager::GROUP_PER_MEMBER_NO_LIMIT != $groups_per_user &&
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $max_member_no_limit is not named in camelCase.
Open

function check_max_number_of_members($value)
{
    $max_member_no_limit = $value['max_member_no_limit'];
    if (GroupManager::MEMBER_PER_GROUP_NO_LIMIT == $max_member_no_limit) {
        return true;
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $max_member_no_limit is not named in camelCase.
Open

function check_max_number_of_members($value)
{
    $max_member_no_limit = $value['max_member_no_limit'];
    if (GroupManager::MEMBER_PER_GROUP_NO_LIMIT == $max_member_no_limit) {
        return true;
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $max_member is not named in camelCase.
Open

function check_max_number_of_members($value)
{
    $max_member_no_limit = $value['max_member_no_limit'];
    if (GroupManager::MEMBER_PER_GROUP_NO_LIMIT == $max_member_no_limit) {
        return true;
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $max_member is not named in camelCase.
Open

function check_max_number_of_members($value)
{
    $max_member_no_limit = $value['max_member_no_limit'];
    if (GroupManager::MEMBER_PER_GROUP_NO_LIMIT == $max_member_no_limit) {
        return true;
Severity: Minor
Found in public/main/group/group_category.php by phpmd

CamelCaseVariableName

Since: 0.2

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