Method Shift_view
has 81 lines of code (exceeds 25 allowed). Consider refactoring.
function Shift_view($shift, $shifttype, $room, $shift_admin, $angeltypes_source, $user_shift_admin, $admin_rooms, $admin_shifttypes, $user_shifts, $signed_up) {
$parsedown = new Parsedown();
$angeltypes = [];
foreach ($angeltypes_source as $angeltype)
Function Shift_view
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
function Shift_view($shift, $shifttype, $room, $shift_admin, $angeltypes_source, $user_shift_admin, $admin_rooms, $admin_shifttypes, $user_shifts, $signed_up) {
$parsedown = new Parsedown();
$angeltypes = [];
foreach ($angeltypes_source as $angeltype)
Method Shift_view
has 10 arguments (exceeds 4 allowed). Consider refactoring.
function Shift_view($shift, $shifttype, $room, $shift_admin, $angeltypes_source, $user_shift_admin, $admin_rooms, $admin_shifttypes, $user_shifts, $signed_up) {
Function Shift_signup_button_render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
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);
Similar blocks of code found in 2 locations. Consider refactoring.
div('col-sm-3 col-xs-6', [
'<h4>' . _('Start') . '</h4>',
'<p class="lead' . (time() >= $shift['start'] ? ' text-success' : '') . '">',
glyph('calendar') . date('Y-m-d', $shift['start']),
'<br />',
Similar blocks of code found in 2 locations. Consider refactoring.
div('col-sm-3 col-xs-6', [
'<h4>' . _('End') . '</h4>',
'<p class="lead' . (time() >= $shift['end'] ? ' text-success' : '') . '">',
glyph('calendar') . date('Y-m-d', $shift['end']),
'<br />',
There are no issues that match your filters.