Code Duplication    Length = 8-8 lines in 2 locations

src/system/UsersModule/Twig/Extension/ProfileExtension.php 2 locations

@@ 138-145 (lines=8) @@
135
     * @param integer $maxLength If set then user names are truncated to x chars
136
     * @return string The output
137
     */
138
    public function profileLinkByUserId($userId, $class = '', $image = '', $maxLength = 0, $title = '')
139
    {
140
        if (empty($userId) || (int)$userId < 1) {
141
            return $userId;
142
        }
143
144
        return $this->determineProfileLink((int)$userId, null, $class, $image, $maxLength, $title);
145
    }
146
147
    /**
148
     * Create a link to a users profile from the username.
@@ 165-172 (lines=8) @@
162
     * @param integer $maxLength If set then user names are truncated to x chars
163
     * @return string The output
164
     */
165
    public function profileLinkByUserName($userName, $class = '', $image = '', $maxLength = 0, $title = '')
166
    {
167
        if (empty($userName)) {
168
            return $userName;
169
        }
170
171
        return $this->determineProfileLink(null, $userName, $class, $image, $maxLength, $title);
172
    }
173
174
    /**
175
     * Internal function used by profileLinkByUserId() and profileLinkByUserName().