Function AngelType_view
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angeltypes, $admin_angeltypes, $coordinator, $user_driver_license, $user) {
$buttons = [
button(page_link_to('angeltypes'), _("Angeltypes"), 'back')
];
Method AngelType_view
has 112 lines of code (exceeds 25 allowed). Consider refactoring.
function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angeltypes, $admin_angeltypes, $coordinator, $user_driver_license, $user) {
$buttons = [
button(page_link_to('angeltypes'), _("Angeltypes"), 'back')
];
Function AngelType_render_membership
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
function AngelType_render_membership($user_angeltype) {
$membership = "";
if ($user_angeltype['user_angeltype_id'] != null) {
if ($user_angeltype['restricted']) {
if ($user_angeltype['confirm_user_id'] == null)
Function AngelTypes_about_view
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
function AngelTypes_about_view($angeltypes, $user_logged_in) {
global $faq_url;
$content = array(
buttons(array(
Method AngelTypes_about_view
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
function AngelTypes_about_view($angeltypes, $user_logged_in) {
global $faq_url;
$content = array(
buttons(array(
Method AngelType_view
has 8 arguments (exceeds 4 allowed). Consider refactoring.
function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angeltypes, $admin_angeltypes, $coordinator, $user_driver_license, $user) {
Method AngelType_edit_view
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function AngelType_edit_view($name, $restricted, $description, $coordinator_mode, $requires_driver_license) {
Similar blocks of code found in 2 locations. Consider refactoring.
function AngelType_delete_view($angeltype) {
return page_with_title(sprintf(_("Delete angeltype %s"), $angeltype['name']), array(
info(sprintf(_("Do you want to delete angeltype %s?"), $angeltype['name']), true),
buttons(array(
button(page_link_to('angeltypes'), _("cancel"), 'cancel'),
Similar blocks of code found in 2 locations. Consider refactoring.
if ($angeltype['user_angeltype_id'] != null)
$buttons[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'], _("leave"), 'cancel');
else
$buttons[] = button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("join"), 'add');
Similar blocks of code found in 2 locations. Consider refactoring.
$member['actions'] = table_buttons([
button(page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'], _("confirm"), 'btn-xs'),
button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], _("deny"), 'btn-xs')
]);
There are no issues that match your filters.