fossasia/engelsystem

View on GitHub

Showing 198 of 271 total issues

Avoid too many return statements within this method.
Open

return error(_("Transmitting was terminated with an Error."), true);
Severity: Major
Found in includes/controller/user_messages_controller.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

    return error(_("Transmitting was terminated with an Error."), true);
    Severity: Major
    Found in includes/controller/user_messages_controller.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

      return error(_("Wrong action."), true);
      Severity: Major
      Found in includes/controller/user_messages_controller.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

        return ShiftEntry_edit_view($user_text, date("Y-m-d H:i", $shift['start']) . ' – ' . date('Y-m-d H:i', $shift['end']) . ' (' . shift_length($shift) . ')', $shift['Name'], $shift['name'], $angeltyppe_select, "", false, null, in_array('user_shifts_admin', $privileges));
        Severity: Major
        Found in includes/controller/user_shifts_controller.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

          return error("No Group found.", true);
          Severity: Major
          Found in includes/controller/admin_groups_controller.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

            return view_user_shifts();
            Severity: Major
            Found in includes/controller/user_shifts_controller.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

              return error("No question found.", true);
              Severity: Major
              Found in includes/controller/admin_questions_controller.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                return angeltypes_about_controller();
                Severity: Major
                Found in includes/controller/angeltypes_controller.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                  return error("Incomplete call, missing Question ID.", true);
                  Severity: Major
                  Found in includes/controller/admin_questions_controller.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                    return user_angeltype_add_controller();
                    Severity: Major
                    Found in includes/controller/user_angeltypes_controller.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                      return user_edit_vouchers_controller();
                      Severity: Major
                      Found in includes/controller/users_controller.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                        return user_angeltype_update_controller();
                        Severity: Major
                        Found in includes/controller/user_angeltypes_controller.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                          return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift starts %c") . '</span>';
                          Severity: Major
                          Found in includes/view/User_view.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                            return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends %c") . '</span>';
                            Severity: Major
                            Found in includes/view/User_view.php - About 30 mins to fix

                              Function shifttype_controller has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function shifttype_controller() {
                              if (! isset($_REQUEST['shifttype_id']))
                              redirect(page_link_to('shifttypes'));
                              $shifttype = ShiftType($_REQUEST['shifttype_id']);
                              if ($shifttype === false)
                              Severity: Minor
                              Found in includes/controller/shifttypes_controller.php - About 25 mins to fix

                              Function angeltype_delete_controller has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function angeltype_delete_controller() {
                              global $privileges, $user;
                               
                              if (! in_array('admin_angel_types', $privileges))
                              redirect(page_link_to('angeltypes'));
                              Severity: Minor
                              Found in includes/controller/angeltypes_controller.php - About 25 mins to fix

                              Function shifttype_delete_controller has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function shifttype_delete_controller() {
                              if (! isset($_REQUEST['shifttype_id']))
                              redirect(page_link_to('shifttypes'));
                              $shifttype = ShiftType($_REQUEST['shifttype_id']);
                              if ($shifttype === false)
                              Severity: Minor
                              Found in includes/controller/shifttypes_controller.php - About 25 mins to fix

                              Function Shift_signup_button_render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function Shift_signup_button_render($shift, $angeltype, $user_angeltype = null, $user_shifts = null) {
                              global $user;
                               
                              if ($user_angeltype == null) {
                              $user_angeltype = UserAngelType_by_User_and_AngelType($user, $angeltype);
                              Severity: Minor
                              Found in includes/view/Shifts_view.php - About 25 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language