Code Duplication    Length = 11-11 lines in 2 locations

plugins/User/src/Model/Entity/User.php 2 locations

@@ 160-170 (lines=11) @@
157
     *
158
     * @return array
159
     */
160
    protected function _getRoleIds()
161
    {
162
        $ids = [];
163
        if (!$this->has('roles')) {
164
            return $ids;
165
        }
166
        foreach ($this->roles as $k => $role) {
167
            $ids[] = $role->id;
168
        }
169
170
        return $ids;
171
    }
172
173
    /**
@@ 178-188 (lines=11) @@
175
     *
176
     * @return array
177
     */
178
    protected function _getRoleNames()
179
    {
180
        $names = [];
181
        if (!$this->has('roles')) {
182
            return $names;
183
        }
184
        foreach ($this->roles as $k => $role) {
185
            $names[] = $role->name;
186
        }
187
188
        return $names;
189
    }
190
191
    /**