Completed
Branch master (78c2af)
by Pierre-Henry
52:17 queued 17:37
created

user-dashboard/models/design/UserDesignModel.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * @author         Pierre-Henry Soria <[email protected]>
4
 * @copyright      (c) 2016-2017, Pierre-Henry Soria. All Rights Reserved.
5
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
6
 * @package        PH7 / App / System / Module / User Dashboard / Model / Design
7
 */
8
namespace PH7;
9
10
class UserDesignModel extends UserDesignCoreModel
11
{
12
    const PROFILE_BLOCK_LIMIT = 36;
13
    const PROFILE_BLOCK_AVATAR_SIZE = 64;
14
15
    public function profilesBlock($iOffset = 0, $iLimit = self::PROFILE_BLOCK_LIMIT)
16
    {
17
        $iSize = self::PROFILE_BLOCK_AVATAR_SIZE;
18
        $oUser = $this->oUserModel->getProfiles(SearchCoreModel::LATEST, $iOffset, $iLimit);
19
        if (empty($oUser)) return;
20
21
        echo '<ul class="zoomer_pic">';
22
23
        foreach ($oUser as $oRow)
24
        {
25
            $sFirstName = $this->oStr->upperFirst($oRow->firstName);
26
            $sCity = $this->oStr->upperFirst($oRow->city);
27
28
            echo '<li><a rel="nofollow" href="', $this->oUser->getProfileSignupLink($oRow->username, $sFirstName, $oRow->sex), '"><img src="', $this->getUserAvatar($oRow->username, $oRow->sex, $iSize, 'Members'), '" width="', $iSize, '" height="', $iSize, '" alt="',t('Meet %0% on %site_name%', $oRow->username), '" class="avatar" /></a></li>';
0 ignored issues
show
The call to UserDesignModel::getUserAvatar() has too many arguments starting with 'Members'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
29
        }
30
31
        echo '</ul>';
32
    }
33
}
34