Showing 11 of 11 total issues
Function user_messages
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
function user_messages() { global $user; if (! isset($_REQUEST['action'])) { $users = user_by_nick($user['UID']);
- Read upRead up
Method user_messages
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_messages() { global $user; if (! isset($_REQUEST['action'])) { $users = user_by_nick($user['UID']);
Avoid too many return
statements within this method. Open
return error(_("Transmitting was terminated with an Error."), true);
Avoid too many return
statements within this method. Open
return error(_("No Message found."), true);
Avoid too many return
statements within this method. Open
return error(_("Transmitting was terminated with an Error."), true);
Avoid too many return
statements within this method. Open
return error(_("Transmitting was terminated with an Error."), true);
Avoid too many return
statements within this method. Open
return error(_("Wrong action."), true);
Similar blocks of code found in 2 locations. Consider refactoring. Open
case "delete": if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id'])) $id = $_REQUEST['id']; else return error(_("Incomplete call, missing Message ID."), true);
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
case "read": if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id'])) $id = $_REQUEST['id']; else return error(_("Incomplete call, missing Message ID."), true);
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (count($users_source) == 0) { success(_("There are no members in the selected Angeltype")); redirect(page_link_to("user_messages")); } elseif (count($users_source) == $temp) { redirect(page_link_to("user_messages"));
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (count($group_users) == 0) { success(_("There are no members in the selected group")); redirect(page_link_to("user_messages")); } elseif (count($group_users) == $temp) { redirect(page_link_to("user_messages"));
- Read upRead up