chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The method SocialManager::setSocialUserBlock() calls the typical debug function print_r() which is mostly only used during development.
Open

        error_log('$userInfo ->'.print_r($userInfo['language'], true));
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

Source https://phpmd.org/rules/design.html#developmentcodefragment

The method display_user_list() has an NPath complexity of 657. The configured NPath complexity threshold is 200.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.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 setSocialUserBlock() has an NPath complexity of 559872. The configured NPath complexity threshold is 200.
Open

    public static function setSocialUserBlock(
        Template $template,
        $userId,
        $groupBlock = '',
        $groupId = 0,
Severity: Minor
Found in public/main/inc/lib/social.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 getExtraFieldBlock() has an NPath complexity of 17290. The configured NPath complexity threshold is 200.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.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 getWallMessages() has an NPath complexity of 25056. The configured NPath complexity threshold is 200.
Open

    public static function getWallMessages(
        $userId,
        $parentId = 0,
        $groupId = 0,
        $friendId = 0,
Severity: Minor
Found in public/main/inc/lib/social.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 '$notification' which will lead to PHP notices.
Open

                $threadList = array_filter(array_unique($notification['thread']));
Severity: Minor
Found in public/main/inc/lib/social.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 '$notification' which will lead to PHP notices.
Open

            if (isset($notification['thread']) && !empty($notification['thread'])) {
Severity: Minor
Found in public/main/inc/lib/social.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 '$notification' which will lead to PHP notices.
Open

            if (isset($notification['thread']) && !empty($notification['thread'])) {
Severity: Minor
Found in public/main/inc/lib/social.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 SocialManager has a coupling between objects value of 25. Consider to reduce the number of dependencies under 13.
Open

class SocialManager extends UserManager
{
    const DEFAULT_WALL_POSTS = 10;
    const DEFAULT_SCROLL_NEW_POST = 5;

Severity: Minor
Found in public/main/inc/lib/social.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 '528', column '25').
Open

        $template = new Template(null, false, false, false, false, false);
Severity: Minor
Found in public/main/inc/lib/social.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 '532', column '30').
Open

            $userGroup = new UserGroupModel();
Severity: Minor
Found in public/main/inc/lib/social.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 '854', column '34').
Open

                $userGroup = new UserGroupModel();
Severity: Minor
Found in public/main/inc/lib/social.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 '1421', column '48').
Open

                            $objEfOption = new ExtraFieldOption('user');
Severity: Minor
Found in public/main/inc/lib/social.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 '1339', column '31').
Open

            $extraField = new ExtraField('user');
Severity: Minor
Found in public/main/inc/lib/social.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 '1522', column '52').
Open

                                $objEfOption = new ExtraFieldOption('user');
Severity: Minor
Found in public/main/inc/lib/social.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 '1385', column '48').
Open

                            $objEfOption = new ExtraFieldOption('user');
Severity: Minor
Found in public/main/inc/lib/social.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

        $skill = new SkillModel();
Severity: Minor
Found in public/main/inc/lib/social.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 '1306', column '25').
Open

        $template = new Template(null, false, false, false, false, false);
Severity: Minor
Found in public/main/inc/lib/social.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 '1505', column '48').
Open

                            $objEfOption = new ExtraFieldOption('user');
Severity: Minor
Found in public/main/inc/lib/social.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 '1222', column '21').
Open

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

        $userGroup = new UserGroupModel();
Severity: Minor
Found in public/main/inc/lib/social.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 '1880', column '29').
Open

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

            } else {
                return UserRelUser::USER_UNKNOWN;
            }
Severity: Minor
Found in public/main/inc/lib/social.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 show_social_avatar_block uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $template->assign('show_group', false);
            $template->assign('show_user', true);
            $template->assign(
                'user_image',
Severity: Minor
Found in public/main/inc/lib/social.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 show_list_type_friends uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            return $friend_relation_list;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

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

        } else {
            if ('true' === api_get_setting('social.social_make_teachers_friend_all')) {
                $adminsList = UserManager::get_all_administrators();
                foreach ($adminsList as $admin) {
                    if (api_get_user_id() == $admin['user_id']) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

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

            } else {
                $list[] = $row;
            }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

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

        } else {
            $sql = 'SELECT rt.id as id
                FROM '.$table.' rt
                WHERE rt.id = (
                    SELECT uf.relation_type
Severity: Minor
Found in public/main/inc/lib/social.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 getWallMessages uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $select = " SELECT
                                iid as id,
                                poster_id as user_sender_id,
                                '' as user_receiver_id,
Severity: Minor
Found in public/main/inc/lib/social.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 getWallMessages uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $friendId = (int) $friendId;
                $friendCondition = " ( user_receiver_id = $friendId ";
            }
Severity: Minor
Found in public/main/inc/lib/social.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 getExtraFieldBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                            } else {
                                $extraFieldItem = [
                                    'variable' => $extraFieldInfo['variable'],
                                    'label' => ucfirst($extraFieldInfo['display_text']),
                                    'value' => implode(',', $data),
Severity: Minor
Found in public/main/inc/lib/social.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 getWallMessages uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $groupId = (int) $groupId;
                $groupCondition = " ( group_id = $groupId ";
            }
Severity: Minor
Found in public/main/inc/lib/social.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 listMyFriendsBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $friendHtml = Display::return_message(get_lang('No friends in your contact list'), 'warning');
        }
Severity: Minor
Found in public/main/inc/lib/social.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_user_list uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $status_icon_chat = Display::getMdiIcon(StateIcon::OFFLINE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Offline'));
            }
Severity: Minor
Found in public/main/inc/lib/social.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_user_list uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $url = '?id='.$uid.$course_url;
                }
Severity: Minor
Found in public/main/inc/lib/social.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 listMyFriendsBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $link_shared = empty($link_shared) ? '' : '&'.$link_shared;
                    $friendHtml .= '<a href="profile.php?'.'u='.$friend['friend_user_id'].$link_shared.'" class="list-group-item">';
                    $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>';
                    $friendHtml .= '<span class="status">'.$statusIcon.'</span>';
Severity: Minor
Found in public/main/inc/lib/social.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 getExtraFieldBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    switch ($extraFieldInfo['value_type']) {
                        case ExtraField::FIELD_TYPE_RADIO:
                            $objEfOption = new ExtraFieldOption('user');
                            $optionInfo = $objEfOption->get_field_option_by_field_and_option($extraFieldInfo['id'], $extraFieldInfo['value']);
Severity: Minor
Found in public/main/inc/lib/social.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 getWallMessages uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

        } else {
            $userRelationType = self::get_relation_between_contacts($currentUserId, $userId);
        }
Severity: Minor
Found in public/main/inc/lib/social.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_user_list uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

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

                        } else {
                            $row['group_info'] = $groups[$row['group_id']];
                        }
Severity: Minor
Found in public/main/inc/lib/social.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 getExtraFieldBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                // if there are information to show
                if (!empty($extra_information_value)) {
                    $extra_information_value = '<ul class="list-group">'.$extra_information_value.'</ul>';
                    $extra_information .= Display::panelCollapse(
Severity: Minor
Found in public/main/inc/lib/social.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 getGroupBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            // Load my groups
            $results = $userGroup->get_groups_by_user(
                $userId,
                [
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

Avoid unused parameters such as '$userId'.
Open

    public static function getThreadList($userId)
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$startDate'.
Open

        $startDate = '',
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

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

Example

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

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

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

                $relation = self::get_relation_between_contacts(
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

Avoid unused parameters such as '$wrap'.
Open

    public static function display_user_list($user_list, $wrap = true)
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

UnusedFormalParameter

Since: 0.2

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

Example

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

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

The parameter $user_id is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.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 $user_receiver_id is not named in camelCase.
Open

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.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 $user_receiver_id is not named in camelCase.
Open

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.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 $user_send_id is not named in camelCase.
Open

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.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 $user_send_id is not named in camelCase.
Open

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.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 $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.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 $receiver_id is not named in camelCase.
Open

    public static function getCountMessagesReceived($receiver_id)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $sql = 'SELECT COUNT(*) FROM '.$table.'
                WHERE
Severity: Minor
Found in public/main/inc/lib/social.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 $id_group is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.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 $user_id is not named in camelCase.
Open

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseParameterName

Since: 0.2

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

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $load_extra_info is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.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 $user_list is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.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 $user_friend is not named in camelCase.
Open

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.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 $show_full_profile is not named in camelCase.
Open

    public static function setSocialUserBlock(
        Template $template,
        $userId,
        $groupBlock = '',
        $groupId = 0,
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseParameterName

Since: 0.2

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

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $link_shared is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.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 $user_id is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.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 $span_count is not named in camelCase.
Open

    public static function social_wrapper_div($content, $span_count)
    {
        $span_count = (int) $span_count;
        $html = '<div class="span'.$span_count.'">';
        $html .= '<div class="well_border">';
Severity: Minor
Found in public/main/inc/lib/social.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

Missing parameter name
Open

     * @param int  user id

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)

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

        if (empty($user_send_id) || empty($user_receiver_id)) {

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

        if (isset($search_name)) {

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

                    user_sender_id = ".((int) $user_send_id)." AND

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)

Missing parameter name
Open

     * @param bool true will load firstname, lastname, and image name

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

        $load_extra_info = true

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

                    lastName LIKE "%'.Database::escape_string($search_name).'%" OR

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

        if (empty($user_send_id) || empty($user_receiver_id)) {

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

        $friend_relation_list = [];

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

        $count_list = count($friend_relation_list);

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)

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

                    '.(api_is_western_name_order() ? 'concat(firstName, lastName)' : 'concat(lastName, firstName)').' LIKE concat("%","'.Database::escape_string($search_name).'","%")

Missing parameter name
Open

     * @param int user receiver id

Method name "SocialManager::show_list_type_friends" is not in camel caps format
Open

    public static function show_list_type_friends()

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

                        friend_user_id='.((int) $user_friend).' AND

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

        if (isset($id_group) && $id_group > 0) {

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

            $search_name = str_replace(' ', '', $search_name);

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

    public static function invitation_denied($user_send_id, $user_receiver_id)

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

            $friend_relation_list[] = $row;

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

                SELECT user_id FROM '.$tbl_my_user.'

Method name "SocialManager::get_relation_between_contacts" is not in camel caps format
Open

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)

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

        $tbl_my_user = Database::get_main_table(TABLE_MAIN_USER);

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

        $user_id,

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

            $search_name = str_replace(' ', '', $search_name);

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

                    user_receiver_id=".((int) $user_receiver_id)." AND

Method name "SocialManager::invitation_denied" is not in camel caps format
Open

    public static function invitation_denied($user_send_id, $user_receiver_id)

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

                    user_sender_id =  '.((int) $user_send_id).' AND

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

        $count_list = count($friend_relation_list);

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

            return $friend_relation_list;

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

                        friend_user_id='.((int) $user_friend).'

Missing parameter name
Open

     * @param string name to search

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

        if (isset($id_group) && $id_group > 0) {

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

            $search_name = trim($search_name);

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

            $search_name = trim($search_name);

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

    public static function getCountMessagesReceived($receiver_id)

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

                    user_receiver_id='.intval($receiver_id).' AND

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

            $friend_relation_list[] = get_lang('Unknown');

Missing parameter name
Open

     * @param int group id

Method name "SocialManager::get_friends" is not in camel caps format
Open

    public static function get_friends(

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

        $tbl_my_friend = Database::get_main_table(TABLE_MAIN_USER_REL_USER);

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

        $sql = 'SELECT friend_user_id FROM '.$tbl_my_friend.'

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

    public static function invitation_denied($user_send_id, $user_receiver_id)

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

        $user_id = (int) $user_id;

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

            $sql .= ' AND relation_type='.$id_group;

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

            if ($load_extra_info) {

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

        if (empty($user_send_id) || empty($user_receiver_id)) {

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

                    friend_user_id<>'.$user_id.' AND

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

                    firstName LIKE "%'.Database::escape_string($search_name).'%" OR

Method name "SocialManager::get_list_invitation_sent_by_user_id" is not in camel caps format
Open

    public static function get_list_invitation_sent_by_user_id($userId)

Method name "SocialManager::invitation_accepted" is not in camel caps format
Open

    public static function invitation_accepted($user_send_id, $user_receiver_id)

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)

Missing parameter name
Open

     * @param int user sender id

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

        if (empty($user_send_id) || empty($user_receiver_id)) {

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

                    user_receiver_id='.((int) $user_receiver_id).' AND

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)

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

                        user_id='.((int) $user_id).' AND

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

        $search_name = null,

Method name "SocialManager::get_list_invitation_of_friends_by_user_id" is not in camel caps format
Open

    public static function get_list_invitation_of_friends_by_user_id($userId, $limit = 0)

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

                        user_id='.((int) $user_id).' AND

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

        $id_group = null,

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

        $user_id = (int) $user_id;

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

        if (0 == $count_list) {

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

                    $user_id,

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

                    user_id='.$user_id;

Method name "SocialManager::show_social_avatar_block" is not in camel caps format
Open

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)

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

            $template->assign('group_id', $group_id);

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

                        $user_id,

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

                        $user_id,

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

                            <div class="items-user-status">'.$status_icon_chat.' '.$user_rol.'</div>

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

    public static function social_wrapper_div($content, $span_count)

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

                if (is_array($social_plugins) && count($social_plugins) > 0) {

Doc comment for parameter $groupBlock does not match actual variable name $userId
Open

     * @param string $groupBlock        Optional. Highlight link possible values:

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

                $name_user = api_get_person_name($friend['firstName'], $friend['lastName']);

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

                    $friendHtml .= '<a onclick="javascript:chatWith(\''.$friend['friend_user_id'].'\', \''.$name_user.'\', \''.$status.'\',\''.$friendAvatarSmall.'\')" href="javascript:void(0);" class="list-group-item">';

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

            foreach ($extra_user_data as $key => $data) {

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

                            $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']).': '.$data.'</li>';

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

                            foreach ($id_options as $id_option) {

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

                            $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']).': '

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

                    $extra_information .= Display::panelCollapse(

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

        $social_group_block = '';

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

                    $social_group_block .= '</li>';

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

                    $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";

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

                if (is_array($social_plugins) && count($social_plugins) > 0) {

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

                                ]).'#post_id_'.$post->getIid();

Missing parameter name
Open

     * @param $link_shared

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

                $user_info_friend = api_get_user_info($friend['friend_user_id'], true);

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

                            $extra_information_value .= '<li class="list-group-item">'

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

                    $extra_information_value = '<ul class="list-group">'.$extra_information_value.'</ul>';

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

                $social_group_block = Display::panelCollapse(

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

        $group_id = (int) $group_id;

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

            $user_id = api_get_user_id();

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

                    <p style="min-height: 30px;" title="'.get_lang('Code').'">'.$user_info['official_code'].'</p></div>';

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

                    $url = api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$uid.$course_url;

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

                $social_plugins = [1, 2];

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

            $extra_information_value = '';

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

                            $id_options = explode('::', $data);

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

                                    WHERE id = '$id_option'";

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

                                $value_options[] = $row_options[0];

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

                            foreach ($user_tags as $tags) {

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

                                $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']).': '

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

                            $extra_information_value .= '<li class="list-group-item">'

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

        $user_id = (int) $user_id;

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

        $show_groups = [

Method name "SocialManager::display_user_list" is not in camel caps format
Open

    public static function display_user_list($user_list, $wrap = true)

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

                $status_icon_chat = Display::getMdiIcon(StateIcon::OFFLINE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Offline'));

Method name "SocialManager::social_wrapper_div" is not in camel caps format
Open

    public static function social_wrapper_div($content, $span_count)

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

        $html = '<div class="span'.$span_count.'">';

Doc comment for parameter $groupId does not match actual variable name $groupBlock
Open

     * @param int    $groupId           Optional. Group ID

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

                $friend_avatar = '<img src="'.$friendAvatarMedium.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" class="user-image"/>';

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

                    $friendHtml .= '<a href="profile.php?'.'u='.$friend['friend_user_id'].$link_shared.'" class="list-group-item">';

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

                    $field_variable

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

                                'value' => $value_options,

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

                            $tag_tmp = '';

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

                            if (is_array($user_tags) && count($user_tags) > 0) {

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

                            if (is_array($user_tags) && count($user_tags) > 0) {

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

                $social_group_block .= '</div>';

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

                $group_id,

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

            $userPicture = $user_info['avatar'];

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

                    $url = '?id='.$uid.$course_url;

Missing parameter name
Open

     * @param $uri url

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

                    $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>';

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

        $extra_user_data = UserManager::get_extra_user_data($user_id);

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

                                $row_options = Database::fetch_row($res_options);

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

        return $extra_information;

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

        if (empty($user_id)) {

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

            $user_rol = 1 == $user_info['status'] ? Display::getMdiIcon(ObjectIcon::TEACHER, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Trainer')) : Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Learner'));

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

        if ($show_full_profile) {

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

                            $value_options = [];

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

                    $social_group_block .= ' <li class="list-group-item">';

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

            $firstname = $user_info['firstname'];

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

                $friend_avatar = '<img src="'.$friendAvatarMedium.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" class="user-image"/>';

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

                    $link_shared = empty($link_shared) ? '' : '&'.$link_shared;

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

        if (is_array($extra_user_data) && count($extra_user_data) > 0) {

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

                                    FROM $t_ufo

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

                                .'<img src="'.$icon_path.'" alt="icon"'

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

            if (!empty($social_group_block)) {

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

                    $social_group_block,

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

                    $group_id,

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

            $course_url = '&amp;cidReq='.Security::remove_XSS($_GET['cidReq']);

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

        foreach ($user_list as $uid) {

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

            $user_info = api_get_user_info($uid, true);

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

        $show_full_profile = true

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

                            $extra_information_value .=

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

                    $extra_information_value = '<ul class="list-group">'.$extra_information_value.'</ul>';

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

        if (in_array($show, $show_groups) && !empty($group_id)) {

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

        if (in_array($show, $show_groups) && !empty($group_id)) {

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

                    $link_shared = empty($link_shared) ? '' : '&'.$link_shared;

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

                                    .' '.$tag_tmp.'</li>';

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

                            $extra_information_value .= '<li class="list-group-item">'.$data.'</li>';

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

                    $social_group_block .= $group['name'];

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

                        $group_url

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

                        'description' => $group_info.$group_actions,

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)

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

        if (isset($_GET['id']) || count($user_list) < 1) {

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

        $course_url = '';

Doc comment for parameter $show_full_profile does not match actual variable name $groupId
Open

     * @param bool   $show_full_profile

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

                    $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>';

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

                                .' '.implode(' ', $value_options).'</li>';

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

                    $group_actions = '<div class="group-more"><a class="btn btn--plain" href="groups.php?#tab_browse-2">'.

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

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

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

                            <div class="items-user-status">'.$status_icon_chat.' '.$user_rol.'</div>

Doc comment for parameter $userId does not match actual variable name $template
Open

     * @param int    $userId            The user id

Expected 9 spaces after parameter type; 1 found
Open

     * @param int $user_id

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

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)

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

                    $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>';

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

                    $link_shared = empty($link_shared) ? '' : '&'.$link_shared;

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

        $t_ufo = Database::get_main_table(TABLE_EXTRA_FIELD_OPTIONS);

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

                                $res_options = Database::query($sql);

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

                            $user_tags = UserManager::get_user_tags($user_id, $extraFieldInfo['id']);

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

                                'value' => $tag_tmp,

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

        $user_id = (int) $user_id;

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

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)

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

                                $value_options[] = $row_options[0];

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

                            $user_tags = UserManager::get_user_tags($user_id, $extraFieldInfo['id']);

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

                                $tag_tmp .= '<a class="label label_tag"'

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

                            if (false == self::verifyUrl($icon_path)) {

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

                    $group_url = "group_view.php?id=$id";

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

                            $group_url

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

                $social_group_block .= '<div class="list-group">';

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

        $group_id = (int) $group_id;

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

                $group_info['picture'],

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

        $span_count = (int) $span_count;

Method name "SocialManager::get_plugins" is not in camel caps format
Open

    public static function get_plugins($place = SOCIAL_CENTER_PLUGIN)

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

        $template->assign('show_full_profile', $show_full_profile);

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

                if (!empty($user_info_friend['user_is_online_in_chat'])) {

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

                            foreach ($id_options as $id_option) {

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

                            $icon_path = UserManager::get_favicon_from_url($data);

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

                            $domain = parse_url($icon_path, PHP_URL_HOST);

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

                            $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']).': '.$data.'</li>';

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

                        $extra_information_value,

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

            if (isset($user_info['user_is_online_in_chat']) && 1 == $user_info['user_is_online_in_chat']) {

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

        $span_count = (int) $span_count;

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

                    foreach ($social_plugins as $plugin) {

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

        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);

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

                    $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>';

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

        $extra_information = '';

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

        if (is_array($extra_user_data) && count($extra_user_data) > 0) {

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

                if (!empty($extra_information_value)) {

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

                $social_group_block .= '<div class="list-group">';

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

                        'description' => $group_info.$group_actions,

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

    public static function display_user_list($user_list, $wrap = true)

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

            $lastname = $user_info['lastname'];

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

            $user_rol = 1 == $user_info['status'] ? Display::getMdiIcon(ObjectIcon::TEACHER, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Trainer')) : Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Learner'));

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

            if (isset($user_info['user_is_online_in_chat']) && 1 == $user_info['user_is_online_in_chat']) {

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

                $status_icon_chat = Display::getMdiIcon(StateIcon::ONLINE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Online'));

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

    public static function getExtraFieldBlock($user_id, $isArray = false)

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

        $extra_user_data = UserManager::get_extra_user_data($user_id);

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

                                $row_options = Database::fetch_row($res_options);

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

            $social_group_block .= Display::url(

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

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

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

            $status_icon_chat = null;

Expected 8 spaces after parameter type; 1 found
Open

     * @param bool $showLinkToChat

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

                $field_variable = str_replace('extra_', '', $key);

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

                $social_group_block .= $form->returnForm();

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

                if (!empty($social_group_block)) {

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

        return $social_group_block;

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

                    $social_group_block .= ' <li class="list-group-item">';

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

                        $social_group_block,

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

                    $social_group_block .= $group['name'];

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

                $social_group_block .= '</div>';

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

                    $social_group_block .= '</li>';

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

                    $social_group_block = Display::panelCollapse(

Only one argument is allowed per line in a multi-line function call
Open

        return Display::panel($content, '',

Opening parenthesis of a multi-line function call must be the last content on the line
Open

        return Display::panel($content, '',

The variable $user_id is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_url is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $count_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_relation_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_my_friend is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $count_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_my_friend is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

It is 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 display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_group is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_groups is not named in camelCase.
Open

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_relation_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $load_extra_info is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_url is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_groups is not named in camelCase.
Open

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_relation_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_group is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_my_user is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_relation_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tbl_my_user is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $search_name is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $receiver_id is not named in camelCase.
Open

    public static function getCountMessagesReceived($receiver_id)
    {
        $table = Database::get_main_table(TABLE_MESSAGE);
        $sql = 'SELECT COUNT(*) FROM '.$table.'
                WHERE
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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 show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

It is 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 display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_relation_list is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_group is not named in camelCase.
Open

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $status_icon_chat is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $link_shared is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $link_shared is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $name_user is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $name_user is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $link_shared is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $field_variable is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tag_tmp is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $status_icon_chat is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_full_profile is not named in camelCase.
Open

    public static function setSocialUserBlock(
        Template $template,
        $userId,
        $groupBlock = '',
        $groupId = 0,
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $name_user is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_ufo is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $value_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tag_tmp is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $icon_path is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_url is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $name_user is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $t_ufo is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $value_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_plugins is not named in camelCase.
Open

    public static function get_plugins($place = SOCIAL_CENTER_PLUGIN)
    {
        $content = '';
        switch ($place) {
            case SOCIAL_CENTER_PLUGIN:
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_avatar is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $icon_path is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $span_count is not named in camelCase.
Open

    public static function social_wrapper_div($content, $span_count)
    {
        $span_count = (int) $span_count;
        $html = '<div class="span'.$span_count.'">';
        $html .= '<div class="well_border">';
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

It is 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 getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_plugins is not named in camelCase.
Open

    public static function get_plugins($place = SOCIAL_CENTER_PLUGIN)
    {
        $content = '';
        switch ($place) {
            case SOCIAL_CENTER_PLUGIN:
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_user_data is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $field_variable is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

It is 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_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $name_user is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_avatar is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_option is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $span_count is not named in camelCase.
Open

    public static function social_wrapper_div($content, $span_count)
    {
        $span_count = (int) $span_count;
        $html = '<div class="span'.$span_count.'">';
        $html .= '<div class="well_border">';
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_plugins is not named in camelCase.
Open

    public static function get_plugins($place = SOCIAL_CENTER_PLUGIN)
    {
        $content = '';
        switch ($place) {
            case SOCIAL_CENTER_PLUGIN:
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $value_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $row_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_user_data is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $status_icon_chat is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $status_icon_chat is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $course_url is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $link_shared is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $res_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $value_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $icon_path is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $span_count is not named in camelCase.
Open

    public static function social_wrapper_div($content, $span_count)
    {
        $span_count = (int) $span_count;
        $html = '<div class="span'.$span_count.'">';
        $html .= '<div class="well_border">';
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_plugins is not named in camelCase.
Open

    public static function get_plugins($place = SOCIAL_CENTER_PLUGIN)
    {
        $content = '';
        switch ($place) {
            case SOCIAL_CENTER_PLUGIN:
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $show_full_profile is not named in camelCase.
Open

    public static function setSocialUserBlock(
        Template $template,
        $userId,
        $groupBlock = '',
        $groupId = 0,
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $friend_avatar is not named in camelCase.
Open

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_user_data is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_user_data is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $res_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $row_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

It is 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 getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

    public static function listMyFriendsBlock($user_id, $link_shared = '', $showLinkToChat = false)
    {
        //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
        $friends = self::get_friends($user_id, UserRelUser::USER_RELATION_TYPE_FRIEND);
        $numberFriends = count($friends);
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tag_tmp is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $icon_path is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $extra_information_value is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_options is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $id_option is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $tag_tmp is not named in camelCase.
Open

    public static function getExtraFieldBlock($user_id, $isArray = false)
    {
        $fieldVisibility = api_get_setting('profile.profile_fields_visibility', true);
        $fieldVisibilityKeys = [];
        if (isset($fieldVisibility['options'])) {
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $social_group_block is not named in camelCase.
Open

    public static function getGroupBlock($userId)
    {
        $threadList = self::getThreadList($userId);
        $userGroup = new UserGroupModel();

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

CamelCaseVariableName

Since: 0.2

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

    public static function get_friends(
        $user_id,
        $id_group = null,
        $search_name = null,
        $load_extra_info = true
Severity: Minor
Found in public/main/inc/lib/social.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_list_invitation_sent_by_user_id is not named in camelCase.
Open

    public static function get_list_invitation_sent_by_user_id($userId)
    {
        $userId = (int) $userId;

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

    public static function invitation_accepted($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.lib.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method show_list_type_friends is not named in camelCase.
Open

    public static function show_list_type_friends()
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $sql = 'SELECT id, title FROM '.$table.'
                WHERE id<>6
Severity: Minor
Found in public/main/inc/lib/social.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_relation_between_contacts is not named in camelCase.
Open

    public static function get_relation_between_contacts($user_id, $user_friend, $includeRH = false)
    {
        $table = Database::get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE);
        $userRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
        if (false == $includeRH) {
Severity: Minor
Found in public/main/inc/lib/social.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_list_invitation_of_friends_by_user_id is not named in camelCase.
Open

    public static function get_list_invitation_of_friends_by_user_id($userId, $limit = 0)
    {
        $userId = (int) $userId;
        $limit = (int) $limit;

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

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method show_social_avatar_block is not named in camelCase.
Open

    public static function show_social_avatar_block($show = '', $group_id = 0, $user_id = 0)
    {
        $user_id = (int) $user_id;
        $group_id = (int) $group_id;

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

    public static function invitation_denied($user_send_id, $user_receiver_id)
    {
        if (empty($user_send_id) || empty($user_receiver_id)) {
            return false;
        }
Severity: Minor
Found in public/main/inc/lib/social.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_user_list is not named in camelCase.
Open

    public static function display_user_list($user_list, $wrap = true)
    {
        $html = '';

        if (isset($_GET['id']) || count($user_list) < 1) {
Severity: Minor
Found in public/main/inc/lib/social.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_plugins is not named in camelCase.
Open

    public static function get_plugins($place = SOCIAL_CENTER_PLUGIN)
    {
        $content = '';
        switch ($place) {
            case SOCIAL_CENTER_PLUGIN:
Severity: Minor
Found in public/main/inc/lib/social.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 social_wrapper_div is not named in camelCase.
Open

    public static function social_wrapper_div($content, $span_count)
    {
        $span_count = (int) $span_count;
        $html = '<div class="span'.$span_count.'">';
        $html .= '<div class="well_border">';
Severity: Minor
Found in public/main/inc/lib/social.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