chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The method send_message() has an NPath complexity of 587155200. The configured NPath complexity threshold is 200.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.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 display_message_for_group() has an NPath complexity of 74496. The configured NPath complexity threshold is 200.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.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 send_message has 16 parameters. Consider reducing the number of parameters to less than 10.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

The method display_messages_for_group() has an NPath complexity of 335. The configured NPath complexity threshold is 200.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.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 saveMessageAttachmentFile() has an NPath complexity of 540. The configured NPath complexity threshold is 200.
Open

    public static function saveMessageAttachmentFile($file, $comment, Message $message)
    {
        // Try to add an extension to the file if it hasn't one
        $type = $file['type'] ?? '';
        if (empty($type)) {
Severity: Minor
Found in public/main/inc/lib/message.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

Avoid using undefined variables such as '$mail_queue' which will lead to PHP notices.
Open

                $mail_queue[$i]['time'] = $timeMatches[1].$timeMatches[2];
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$mail_queue' which will lead to PHP notices.
Open

                $mail_queue[$i]['mail'] = $emailMatches[2];
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$mail_queue' which will lead to PHP notices.
Open

            $fullMail = $base.$mail_queue[$i]['code'];
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$parameters' which will lead to PHP notices.
Open

            $table->set_additional_parameters($parameters);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$mail_queue' which will lead to PHP notices.
Open

                $mail_queue[$i]['code'] = $codeMatches[2];
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$mail_queue' which will lead to PHP notices.
Open

        return array_reverse($mail_queue);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$parameters' which will lead to PHP notices.
Open

            $parameters['f'] = 'social';
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$mail_queue' which will lead to PHP notices.
Open

                    $mail_queue[$i]['reason'] = $detailsMatches[3];
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

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

class MessageManager
{
    public static function getMessagesAboutUserToString(User $user, string $url = ''): string
    {
        $currentUserId = api_get_user_id();
Severity: Minor
Found in public/main/inc/lib/message.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 '1261', column '21').
Open

        $form = new FormValidator('send_message');
Severity: Minor
Found in public/main/inc/lib/message.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 '1381', column '28').
Open

        $tplMailBody = new Template(
Severity: Minor
Found in public/main/inc/lib/message.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 '1426', column '28').
Open

        $tplMailBody = new Template(
Severity: Minor
Found in public/main/inc/lib/message.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 '1459', column '36').
Open

        $mailTemplateManager = new MailTemplateManager();
Severity: Minor
Found in public/main/inc/lib/message.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 '382', column '38').
Open

                    $usergroup = new UserGroupModel();
Severity: Minor
Found in public/main/inc/lib/message.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 '1282', column '21').
Open

        $form = new FormValidator('send_invitation');
Severity: Minor
Found in public/main/inc/lib/message.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 '1447', column '33').
Open

        $extraFieldValues = new ExtraFieldValue('user');
Severity: Minor
Found in public/main/inc/lib/message.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 '1303', column '22').
Open

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

                $notification = new Notification();
Severity: Minor
Found in public/main/inc/lib/message.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 '174', column '36').
Open

            $extraFieldValue = new ExtraFieldValue('user');
Severity: Minor
Found in public/main/inc/lib/message.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 '1354', column '21').
Open

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

        } else {
            // custom procedure to load a template as a string (doesn't use cache so may slow down)
            $template = $tplMailBody->twig->createTemplate($templateText);
            $emailbody = $template->render($tplMailBody->params);
        }
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_message_for_group uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $date = '<div class="date"> '
                        ."$iconCalendar $langCreated "
                        .Display::dateToStringAgoAndLongDate($topic['send_date'])
                        .'</div>';
Severity: Minor
Found in public/main/inc/lib/message.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 sendNotificationOfNewRegisteredUserApproval uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $admins = UserManager::get_all_administrators();
            foreach ($admins as $admin_info) {
                self::send_message(
                    $admin_info['user_id'],
Severity: Minor
Found in public/main/inc/lib/message.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 send_message uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $usergroup = new UserGroupModel();
                    $group_info = $usergroup->get($group_id);
                    $group_info['topic_id'] = $topic_id;
                    $group_info['msg_id'] = $messageId;
Severity: Minor
Found in public/main/inc/lib/message.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 send_message uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $totalFileSize += $fileSize;
                }
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_messages_for_group uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $date .= '<i class="fa fa-calendar"></i> '.get_lang(
                            'Created'
                        ).' '.Display::dateToStringAgoAndLongDate($topic['send_date']);
                }
Severity: Minor
Found in public/main/inc/lib/message.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 send_message uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $group = Container::getUsergroupRepository()->find($group_id);

                $message = (new Message())
                    ->setSender($userSender)
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_messages_for_group uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

        } else {
            // Course-session students and course session coaches
            $users = CourseManager::get_user_list_from_course_code($course->getCode(), $sessionId);
        }
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_message_for_group uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $date = '<div class="date"> '
                ."$iconCalendar $langCreated "
                .Display::dateToStringAgoAndLongDate($main_message['send_date'])
                .'</div>';
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method display_message_for_group uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $indent = (int) $topic['indent_cnt'] * $base_padding + $base_padding;
                }
Severity: Minor
Found in public/main/inc/lib/message.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 local variables such as '$x'.
Open

            $x = 0;
Severity: Minor
Found in public/main/inc/lib/message.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 local variables such as '$index'.
Open

            foreach ($topics as $index => $topic) {
Severity: Minor
Found in public/main/inc/lib/message.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 local variables such as '$field'.
Open

        foreach ($userExtraFields as $field => $value) {
Severity: Minor
Found in public/main/inc/lib/message.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

The parameter $sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.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 $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.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 $group_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

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

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.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 $parent_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.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 $group_id is not named in camelCase.
Open

    public static function get_messages_by_group($group_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.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 $topic_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.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 $message_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.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 $sender_id is not named in camelCase.
Open

    public static function send_message_simple(
        $receiverUserId,
        $subject,
        $message,
        $sender_id = 0,
Severity: Minor
Found in public/main/inc/lib/message.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 $first_seed is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.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

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

        $topic_id = (int) $topic_id;

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

        if (empty($subject) && empty($group_id)) {

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

                    $group_info['msg_id'] = $messageId;

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

        $new_file_name = add_ext_on_mime(stripslashes($file['name']), $type);

Method name "MessageManager::get_messages_by_group_by_message" is not in camel caps format
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)

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

        $condition_limit = '';

Missing class doc comment
Open

class MessageManager

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

        $group_id = (int) $group_id;

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

        $userSender = api_get_user_entity($user_sender_id);

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

                    $subject = sprintf(get_lang('There is a new message in group %s'), $group_info['title']);

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

                        'user_info' => $sender_info,

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

        if (!filter_extension($new_file_name)) {

Method name "MessageManager::get_messages_by_group" is not in camel caps format
Open

    public static function get_messages_by_group($group_id)

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

                $new_topics[$id] = $value;

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

            $parent = $repo->find($parent_id);

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

                $sender_info = api_get_user_info($user_sender_id);

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

                    $group_info = $usergroup->get($group_id);

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

                    $user_list = $usergroup->get_users_by_group(

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

                        $group_id,

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

                    foreach ($user_list as $user_data) {

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

                        $group_info,

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

        $group_id = (int) $group_id;

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

                    group_id = $group_id AND

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

        $condition_group_id = '';

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

        global $my_group_role;

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

            $new_topics = [];

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

        $topic_id = 0,

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

        $group_id = (int) $group_id;

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

                $group = Container::getUsergroupRepository()->find($group_id);

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

                if (empty($group_id)) {

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

                    $group_info['topic_id'] = $topic_id;

Missing parameter name
Open

     * @param  int        parent id

Method name "MessageManager::display_messages_for_group" is not in camel caps format
Open

    public static function display_messages_for_group($groupId)

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

        $sender_id = 0,

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

        $parent_id = (int) $parent_id;

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

                        $new_user_list[] = $user_data['id'];

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

        $group_id = (int) $group_id;

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

        $html_messages = '';

Missing function doc comment
Open

    public static function getMessagesAboutUserToString(User $user, string $url = ''): string

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

        if (!empty($receiverUserId) || !empty($group_id)) {

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

                    $group_info = [

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

        $group_id = (int) $group_id;

Missing parameter name
Open

     * @param  int        offset (optional)

Missing parameter name
Open

     * @param  int        limit (optional)

Method name "MessageManager::send_message" is not in camel caps format
Open

    public static function send_message(

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

                $sender_info = api_get_user_info($user_sender_id);

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

        if (empty($group_id)) {

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

                    group_id= $group_id AND

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

        $user_sender_id = empty($sender_id) ? api_get_user_id() : (int) $sender_id;

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

    public static function get_messages_by_group_by_message($group_id, $message_id)

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

                    $group_info['topic_id'] = $topic_id;

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

                    $new_user_list = [];

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

    public static function get_messages_by_group_by_message($group_id, $message_id)

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

                ORDER BY send_date DESC $condition_limit ";

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

        $query_vars = ['id' => $groupId, 'topics_page_nr' => 0];

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

        $user_sender_id = empty($sender_id) ? api_get_user_id() : (int) $sender_id;

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

        if (!empty($parent_id)) {

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

                    $group_info = $usergroup->get($group_id);

Method name "MessageManager::send_message_simple" is not in camel caps format
Open

    public static function send_message_simple(

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

                        $sender_info,

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

                        $sender_id,

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

    public static function get_messages_by_group($group_id)

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

        $group_id = (int) $group_id;

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

            foreach ($new_topics as $index => $topic) {

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

        $parent_id = 0,

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

        $parent_id = (int) $parent_id;

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

        $user_sender_id = empty($sender_id) ? api_get_user_id() : (int) $sender_id;

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

        if (empty($user_sender_id) || empty($receiverUserId)) {

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

                        $new_user_list[] = $user_data['id'];

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

                if ($message_id == $row['parent_id'] || in_array($row['parent_id'], $parents)) {

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

                $user_sender_info = api_get_user_info($topic['user_sender_id']);

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

        $topic_id = (int) $topic_id;

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

                    foreach ($user_list as $user_data) {

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

                        'group_info' => $group_info,

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

        if (empty($group_id)) {

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

            $condition_limit = " LIMIT $offset,$limit ";

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

                    $condition_group_id

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

        $topics_per_page = 10;

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

            $array_html = [];

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

        $group_id = 0,

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

        $sender_id = 0,

Add a comma after each item in a multi-line array
Open

            $existingRelation = $messageRelUserRepository->findOneBy([

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

                        $new_user_list,

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

            $sender_id,

Missing parameter name
Open

     * @param  int        group id (optional)

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

            $condition_group_id = " AND group_id = '$groupId' ";

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

                $reply_label = (1 == $items) ? get_lang('Reply') : get_lang('Replies');

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

                $image = $user_sender_info['avatar'];

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

        $rows = self::get_messages_by_group_by_message($groupId, $topic_id);

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

        $items_per_page = 50;

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

        $title = '<h4>'.Security::remove_XSS($main_message['title'], STUDENT, true).$links.'</h4>';

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

            .(!empty($files_attachments) ? implode('<br />', $files_attachments) : '')

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

                                'topic_id' => $topic_id,

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

                $html_items .= '<div class="row">';

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

            if (!empty($array_html_items)) {

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

                $mail_queue[$i]['time'] = $timeMatches[1].$timeMatches[2];

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        ).' '.Display::dateToStringAgoAndLongDate($topic['send_date']);

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

                $html .= $user_info;

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

                    'per_page' => $topics_per_page,

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

        $name = $user_sender_info['complete_name'];

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

            $main_message['user_sender_id'] == $current_user_id

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

                            'items_page_nr' => $items_page_nr,

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

                    .(!empty($files_attachments) ? implode('<br />', $files_attachments) : '')

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

                $base_padding = 20;

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

                $array_html_items[] = [$html_items];

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

        self::message_recursive_sort($rows, $sorted_rows, $first_seed);

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

                $admin_info['user_id'],

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

                $user_info .= '<div class="name"><a href="'.api_get_path(

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

        $current_user_id = api_get_user_id();

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

        $links .= self::getLikesButton($main_message['id'], $current_user_id, $groupId);

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

                    'user_friend' => $current_user_id,

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

                    'anchor_topic' => 'topic_'.$main_message['id'],

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

            $webCodePath.'social/profile.php?u='.$main_message['user_sender_id']

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

                                'anchor_topic' => 'topic_'.$topic_id,

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

                $html_items .= '</div>';

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

        $sorted_rows = [0 => []];

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

        unset($sorted_rows[0]);

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

                    $admin_info['user_id'],

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

                if (GROUP_USER_PERMISSION_ADMIN == $my_group_role ||

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

            $html_messages .= Display::return_sortable_grid(

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

        $items_page_nr = null;

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

        $main_content .= '<div class="row">';

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

            .(!empty($files_attachments) ? implode('<br />', $files_attachments) : '')

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

                $items_page_nr = isset($_GET['items_'.$topic['id'].'_page_nr'])

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

                    .(!empty($files_attachments) ? implode('<br />', $files_attachments) : '')

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

            $options = ['hide_navigation' => false, 'per_page' => $items_per_page];

Method name "MessageManager::calculate_children" is not in camel caps format
Open

    public static function calculate_children($rows, $first_seed)

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

    public static function calculate_children($rows, $first_seed)

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

            $rows_with_children[$row["id"]] = $row;

Method name "MessageManager::generate_message_form" is not in camel caps format
Open

    public static function generate_message_form()

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            ['class' => 'btn btn--plain']

Method name "MessageManager::display_message_for_group" is not in camel caps format
Open

    public static function display_message_for_group($groupId, $topic_id)

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

            $main_message['user_sender_id'] == $current_user_id

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

        $main_content .= '<div class="avatar-author">';

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

        $main_content .= '<div class="username">'.$user_link.'</div>';

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

            $array_html_items = [];

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

                                'topics_page_nr' => $topic_page_nr,

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

                    .'<div class="username">'.$user_link.'</div>'

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

                $html_items = Display::div($html_items, ['class' => '', 'style' => 'margin-left:'.$indent.'px']);

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

        self::message_recursive_sort($rows, $sorted_rows, $first_seed);

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

        foreach ($admins as $admin_info) {

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

                $label = '<i class="fa fa-envelope"></i> '.$items.' '.$reply_label;

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            get_lang('Delete'),

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            api_get_path(

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

        $main_content = '';

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

                $files_attachments = self::getAttachmentLinkList($topic['id'], 0);

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

                    ($my_group_role == GROUP_USER_PERMISSION_ADMIN ||

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

                    $topic['user_sender_id'] == $current_user_id

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

            $fullMail = $base.$mail_queue[$i]['code'];

Multi-line function call not indented correctly; expected 28 spaces but found 32
Open

                                'LastUpdate'

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

                $user_info = '<div class="author"><img class="img-responsive img-circle" src="'.$image.'" alt="'.$name.'"  width="64" height="64" title="'.$name.'" /></div>';

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

        $rows = self::calculate_children($rows, $topic_id);

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

                        'message_id' => $main_message['id'],

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

                        'items_page_nr' => $items_page_nr,

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

                .Display::dateToStringAgoAndLongDate($main_message['send_date'])

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

        $main_content .= '<div class="message-content"> ';

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

        $main_content .= '</div>';

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

                $html_items .= '<div class="avatar-author">';

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

                $html_items = Display::div($html_items, ['class' => 'message-post', 'id' => 'msg_'.$topic['id']]);

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

                $html_items = Display::div($html_items, ['class' => 'message-post', 'id' => 'msg_'.$topic['id']]);

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

            $style_class = [

Missing parameter name
Open

     * @param array  list recursive of messages

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

                $query_vars,

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

                        'anchor_topic' => 'topic_'.$main_message['id'],

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

                    'message_id' => $main_message['id'],

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

                'group_topics.php?action=delete&id='.$groupId.'&topic_id='.$topic_id,

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

        $main_content .= '<div class="col-md-10">';

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

                    $query_vars,

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

                $mail_queue[$i]['code'] = $codeMatches[2];

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

        return array_reverse($mail_queue);

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

                $name = $user_sender_info['complete_name'];

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

        if (empty($main_message)) {

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

        $query_vars = ['id' => $groupId, 'topic_id' => $topic_id, 'topics_page_nr' => 0];

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

                    'topics_page_nr' => $topic_page_nr,

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

        if ($main_message['send_date'] != $main_message['update_date']) {

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

                $user_sender_info = api_get_user_info($topic['user_sender_id']);

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

                                'user_friend' => $current_user_id,

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

                            'user_friend' => $current_user_id,

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

                            'anchor_topic' => 'topic_'.$topic_id,

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

                $html_items .= '</div>';

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

                $array_html_items[] = [$html_items];

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

        $url_edit = Display::url(

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

                        'topic_id' => $main_message['id'],

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

            if (!empty($main_message['update_date'])) {

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

        $user_link = Display::url(

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

        $main_content .= '<div class="message">'.$main_message['content'].$attachment.'</div></div>';

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

                $links .= self::getLikesButton($topic['id'], $current_user_id, $groupId);

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

                    $indent = (int) $topic['indent_cnt'] * $base_padding + $base_padding;

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        WEB_PATH

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

                    $style_class

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

        $query_vars = ['id' => $groupId, 'topic_id' => $topic_id, 'topics_page_nr' => 0];

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

        $topic_page_nr = isset($_GET['topics_page_nr']) ? (int) $_GET['topics_page_nr'] : null;

Missing parameter name
Open

     * @param int   indent for nested view

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

                    'topic_id' => $main_message['id'],

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

        if ($main_message['send_date'] != $main_message['update_date']) {

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

        return $sorted_rows;

Method name "MessageManager::generate_invitation_form" is not in camel caps format
Open

    public static function generate_invitation_form()

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        );

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            ).' '.Display::dateToStringAgoAndLongDate($topic['update_date']);

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

                    ).'main/social/profile.php?u='.$topic['user_sender_id'].'">'.$name.'&nbsp;</a></div>';

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

        $user_sender_info = api_get_user_info($main_message['user_sender_id']);

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

        $user_sender_info = api_get_user_info($main_message['user_sender_id']);

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

        $files_attachments = self::getAttachmentLinkList($main_message['id'], 0);

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

        if (($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR) ||

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

        $userPicture = $user_sender_info['avatar'];

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

        $main_content .= '</div>';

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

        $topic_id = $main_message['id'];

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            'Created'

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

                $html_items .= '<div class="col-md-10">'

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

                $html_items = Display::div($html_items, ['class' => '', 'style' => 'margin-left:'.$indent.'px']);

Missing parameter name
Open

     * @param int   seed for calculate the indent

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

        global $my_group_role;

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

                $mail_queue[$i]['mail'] = $emailMatches[2];

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

        $main_content .= '<div class="col-md-2">';

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

                    .Display::dateToStringAgoAndLongDate($main_message['update_date'])

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

        $main_content .= '</div>';

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

                $html_items = '';

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

                $name = $user_sender_info['complete_name'];

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

                    $indent = $base_padding;

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

                    $array_html_items,

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

        $rows_with_children = [];

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

            $url_edit

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

                    $mail_queue[$i]['reason'] = $detailsMatches[3];

Missing parameter name
Open

     * @param $topic_id

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

        $main_message = self::get_message_by_id($topic_id);

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

        $main_message = self::get_message_by_id($topic_id);

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

        $main_content .= $date;

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

        $main_content .= '<div class="message">'.$main_message['content'].$attachment.'</div></div>';

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

                                'items_page_nr' => $items_page_nr,

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

                            'topics_page_nr' => $topic_page_nr,

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

                            'topic_id' => $topic_id,

Missing parameter name
Open

     * @param array  original rows of messages

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

            foreach ($admins as $admin_info) {

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

                $array_html[] = [$html];

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

                $array_html,

Method name "MessageManager::get_message_by_id" is not in camel caps format
Open

    public static function get_message_by_id($messageId)

Missing parameter name
Open

     * @param $groupId

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

    public static function display_message_for_group($groupId, $topic_id)

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

        if (($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR) ||

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

                        'user_friend' => $current_user_id,

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

        $main_content .= Display::img(

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

        $main_content .= '</div>';

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

        $main_content .= '<div class="username">'.$user_link.'</div>';

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

                $title.$main_content,

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

        $topic_id = $main_message['id'];

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

                $user_link = Display::url(

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

                $html_items .= '<div class="col-md-2">';

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

                $html_items .= Display::img(

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

                    $indent = (int) $topic['indent_cnt'] * $base_padding + $base_padding;

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

        $rows = $rows_with_children;

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

                    GROUP_USER_PERMISSION_MODERATOR == $my_group_role

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

        return $html_messages;

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

        $files_attachments = self::getAttachmentLinkList($main_message['id'], 0);

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

                        'topics_page_nr' => $topic_page_nr,

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

        $links .= self::getLikesButton($main_message['id'], $current_user_id, $groupId);

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

                        $my_group_role == GROUP_USER_PERMISSION_MODERATOR

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

                $userPicture = $user_sender_info['avatar'];

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

            $rows_with_children[$row["parent_id"]]["children"][] = $row["id"];

Method name "MessageManager::message_recursive_sort" is not in camel caps format
Open

    public static function message_recursive_sort(

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            ['class' => 'btn btn--plain']

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            'Created'

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        );

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        ).' '.Display::dateToStringAgoAndLongDate($topic['send_date']);

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            api_get_path(

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        WEB_PATH

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            get_lang('Delete'),

Multi-line function call not indented correctly; expected 28 spaces but found 32
Open

                                'LastUpdate'

Expected 0 spaces after opening bracket; newline found
Open

                if (

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            ).' '.Display::dateToStringAgoAndLongDate($topic['update_date']);

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

                    ).'main/social/profile.php?u='.$topic['user_sender_id'].'">'.$name.'&nbsp;</a></div>';

The variable $user_list is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $condition_group_id is not named in camelCase.
Open

    public static function getMessagesByParent($parentId, $groupId = 0, $offset = 0, $limit = 0)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $parentId = (int) $parentId;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_id is not named in camelCase.
Open

    public static function send_message_simple(
        $receiverUserId,
        $subject,
        $message,
        $sender_id = 0,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_topics is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_data is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $message_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topics_per_page is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_messages is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $first_seed is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mail_queue is not named in camelCase.
Open

    public static function failedSentMailErrors()
    {
        $base = api_get_path(SYS_ARCHIVE_PATH).'mail/';
        $mailq = $base.'mailq';

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_data is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group($group_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topics_per_page is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mail_queue is not named in camelCase.
Open

    public static function failedSentMailErrors()
    {
        $base = api_get_path(SYS_ARCHIVE_PATH).'mail/';
        $mailq = $base.'mailq';

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $parent_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_user_list is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_user_list is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_topics is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $query_vars is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $base_padding is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $admin_info is not named in camelCase.
Open

    public static function sendNotificationOfNewRegisteredUser(User $user)
    {
        $tplMailBody = new Template(
            null,
            false,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $admin_info is not named in camelCase.
Open

    public static function sendNotificationOfNewRegisteredUserApproval(User $user)
    {
        $tplMailBody = new Template(
            null,
            false,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $query_vars is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mail_queue is not named in camelCase.
Open

    public static function failedSentMailErrors()
    {
        $base = api_get_path(SYS_ARCHIVE_PATH).'mail/';
        $mailq = $base.'mailq';

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_user_list is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_topics is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $rows_with_children is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_file_name is not named in camelCase.
Open

    public static function saveMessageAttachmentFile($file, $comment, Message $message)
    {
        // Try to add an extension to the file if it hasn't one
        $type = $file['type'] ?? '';
        if (empty($type)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group($group_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_info is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $base_padding is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mail_queue is not named in camelCase.
Open

    public static function failedSentMailErrors()
    {
        $base = api_get_path(SYS_ARCHIVE_PATH).'mail/';
        $mailq = $base.'mailq';

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $new_file_name is not named in camelCase.
Open

    public static function saveMessageAttachmentFile($file, $comment, Message $message)
    {
        // Try to add an extension to the file if it hasn't one
        $type = $file['type'] ?? '';
        if (empty($type)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $files_attachments is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $rows_with_children is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function sendNotificationOfNewRegisteredUserApproval(User $user)
    {
        $tplMailBody = new Template(
            null,
            false,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $parent_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_messages is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $files_attachments is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $base_padding is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $base_padding is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_per_page is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_list is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_id is not named in camelCase.
Open

    public static function send_message_simple(
        $receiverUserId,
        $subject,
        $message,
        $sender_id = 0,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $condition_group_id is not named in camelCase.
Open

    public static function getMessagesByParent($parentId, $groupId = 0, $offset = 0, $limit = 0)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $parentId = (int) $parentId;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $condition_limit is not named in camelCase.
Open

    public static function getMessagesByParent($parentId, $groupId = 0, $offset = 0, $limit = 0)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $parentId = (int) $parentId;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $reply_label is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_info is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_link is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $files_attachments is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $admin_info is not named in camelCase.
Open

    public static function sendNotificationOfNewRegisteredUserApproval(User $user)
    {
        $tplMailBody = new Template(
            null,
            false,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mail_queue is not named in camelCase.
Open

    public static function failedSentMailErrors()
    {
        $base = api_get_path(SYS_ARCHIVE_PATH).'mail/';
        $mailq = $base.'mailq';

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group($group_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $condition_limit is not named in camelCase.
Open

    public static function getMessagesByParent($parentId, $groupId = 0, $offset = 0, $limit = 0)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $parentId = (int) $parentId;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $reply_label is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_link is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $query_vars is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sorted_rows is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $mail_queue is not named in camelCase.
Open

    public static function failedSentMailErrors()
    {
        $base = api_get_path(SYS_ARCHIVE_PATH).'mail/';
        $mailq = $base.'mailq';

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $condition_group_id is not named in camelCase.
Open

    public static function getMessagesByParent($parentId, $groupId = 0, $offset = 0, $limit = 0)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $parentId = (int) $parentId;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_per_page is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $files_attachments is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $parent_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sender_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $condition_limit is not named in camelCase.
Open

    public static function getMessagesByParent($parentId, $groupId = 0, $offset = 0, $limit = 0)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $parentId = (int) $parentId;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $query_vars is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_info is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_content is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $rows_with_children is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sorted_rows is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sorted_rows is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $sorted_rows is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $parent_id is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_info is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $group_id is not named in camelCase.
Open

    public static function get_messages_by_group($group_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_messages is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $files_attachments is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $main_message is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $topic_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_link is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $files_attachments is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function sendNotificationOfNewRegisteredUserApproval(User $user)
    {
        $tplMailBody = new Template(
            null,
            false,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_sender_info is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $rows_with_children is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $user_link is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $items_page_nr is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $current_user_id is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $array_html_items is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $admin_info is not named in camelCase.
Open

    public static function sendNotificationOfNewRegisteredUser(User $user)
    {
        $tplMailBody = new Template(
            null,
            false,
Severity: Minor
Found in public/main/inc/lib/message.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The method get_messages_by_group is not named in camelCase.
Open

    public static function get_messages_by_group($group_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.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 send_message_simple is not named in camelCase.
Open

    public static function send_message_simple(
        $receiverUserId,
        $subject,
        $message,
        $sender_id = 0,
Severity: Minor
Found in public/main/inc/lib/message.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_messages_for_group is not named in camelCase.
Open

    public static function display_messages_for_group($groupId)
    {
        global $my_group_role;

        $rows = self::get_messages_by_group($groupId);
Severity: Minor
Found in public/main/inc/lib/message.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 message_recursive_sort is not named in camelCase.
Open

    public static function message_recursive_sort(
        $rows,
        &$messages,
        $seed = 0,
        $indent = 0
Severity: Minor
Found in public/main/inc/lib/message.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 generate_invitation_form is not named in camelCase.
Open

    public static function generate_invitation_form()
    {
        $form = new FormValidator('send_invitation');
        $form->addTextarea(
            'content',
Severity: Minor
Found in public/main/inc/lib/message.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 generate_message_form is not named in camelCase.
Open

    public static function generate_message_form()
    {
        $form = new FormValidator('send_message');
        $form->addText(
            'subject',
Severity: Minor
Found in public/main/inc/lib/message.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 send_message is not named in camelCase.
Open

    public static function send_message(
        $receiverUserId,
        $subject,
        $content,
        array $attachments = [],
Severity: Minor
Found in public/main/inc/lib/message.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 calculate_children is not named in camelCase.
Open

    public static function calculate_children($rows, $first_seed)
    {
        $rows_with_children = [];
        foreach ($rows as $row) {
            $rows_with_children[$row["id"]] = $row;
Severity: Minor
Found in public/main/inc/lib/message.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_messages_by_group_by_message is not named in camelCase.
Open

    public static function get_messages_by_group_by_message($group_id, $message_id)
    {
        $group_id = (int) $group_id;

        if (empty($group_id)) {
Severity: Minor
Found in public/main/inc/lib/message.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_message_by_id is not named in camelCase.
Open

    public static function get_message_by_id($messageId)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $messageId = (int) $messageId;
        $sql = "SELECT * FROM $table
Severity: Minor
Found in public/main/inc/lib/message.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_message_for_group is not named in camelCase.
Open

    public static function display_message_for_group($groupId, $topic_id)
    {
        global $my_group_role;
        $main_message = self::get_message_by_id($topic_id);
        if (empty($main_message)) {
Severity: Minor
Found in public/main/inc/lib/message.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