fossasia/engelsystem

View on GitHub
includes/view/ShiftTypes_view.php

Summary

Maintainability
B
6 hrs
Test Coverage

Showing 3 of 3 total issues

Method ShiftType_edit_view has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function ShiftType_edit_view($name, $angeltype_id, $angeltypes, $description, $shifttype_id) {
Severity: Minor
Found in includes/view/ShiftTypes_view.php - About 35 mins to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function ShiftType_delete_view($shifttype) {
    return page_with_title(sprintf(_("Delete shifttype %s"), $shifttype['name']), array(
    info(sprintf(_("Do you want to delete shifttype %s?"), $shifttype['name']), true),
    buttons(array(
    button(page_link_to('shifttypes'), _("cancel"), 'cancel'),
    Severity: Major
    Found in includes/view/ShiftTypes_view.php and 1 other location - About 4 hrs to fix
    includes/view/AngelTypes_view.php on lines 48..56

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    $shifttype['actions'] = table_buttons([
    button(page_link_to('shifttypes') . '&action=edit&shifttype_id=' . $shifttype['id'], _('edit'), 'btn-xs'),
    button(page_link_to('shifttypes') . '&action=delete&shifttype_id=' . $shifttype['id'], _('delete'), 'btn-xs')
    ]);
    Severity: Major
    Found in includes/view/ShiftTypes_view.php and 1 other location - About 1 hr to fix
    includes/view/AngelTypes_view.php on lines 147..150

    There are no issues that match your filters.

    Category
    Status