Showing 198 of 271 total issues
Avoid too many return
statements within this method. Open
return user_angeltype_update_controller();
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 view_user_shifts();
Avoid too many return
statements within this method. Open
return $html;
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));
Avoid too many return
statements within this method. Open
return error("Incomplete call, missing Question ID.", 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 user_angeltype_add_controller();
Avoid too many return
statements within this method. Open
return error("No Group found.", true);
Avoid too many return
statements within this method. Open
return angeltypes_about_controller();
Avoid too many return
statements within this method. Open
return user_edit_vouchers_controller();
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>';
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>';
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)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
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)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
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'));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
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);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"