Method User_view
has 118 lines of code (exceeds 25 allowed). Consider refactoring.
function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) {
global $LETZTES_AUSTRAGEN, $privileges;
$user_name = htmlspecialchars($user_source['Vorname']) . " " . htmlspecialchars($user_source['Name']);
$myshifts_table = array();
$timesum = 0;
Function User_view
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) {
global $LETZTES_AUSTRAGEN, $privileges;
$user_name = htmlspecialchars($user_source['Vorname']) . " " . htmlspecialchars($user_source['Name']);
$myshifts_table = array();
$timesum = 0;
File User_view.php
has 333 lines of code (exceeds 250 allowed). Consider refactoring.
<?php
* Available T-Shirt sizes
*/
Method Users_view
has 73 lines of code (exceeds 25 allowed). Consider refactoring.
function Users_view($users, $order_by, $arrived_count, $active_count, $force_active_count, $freeloads_count, $tshirts_count, $voucher_count) {
$search = "";
$users_matched = [];
if (isset($_REQUEST['search']))
$search = strip_request_item('search');
Function Users_view
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
function Users_view($users, $order_by, $arrived_count, $active_count, $force_active_count, $freeloads_count, $tshirts_count, $voucher_count) {
$search = "";
$users_matched = [];
if (isset($_REQUEST['search']))
$search = strip_request_item('search');
Method Users_view
has 8 arguments (exceeds 4 allowed). Consider refactoring.
function Users_view($users, $order_by, $arrived_count, $active_count, $force_active_count, $freeloads_count, $tshirts_count, $voucher_count) {
Method User_view
has 7 arguments (exceeds 4 allowed). Consider refactoring.
function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) {
Function User_shift_state_render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
function User_shift_state_render($user) {
$upcoming_shifts = ShiftEntries_upcoming_for_user($user);
if ($upcoming_shifts === false)
return false;
Function User_angeltypes_render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
function User_angeltypes_render($user_angeltypes) {
$output = array();
foreach ($user_angeltypes as $angeltype) {
$class = "";
if ($angeltype['restricted'] == 1)
Function Other_languages_render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
function Other_languages_render($user_source) {
$other_langs = explode(",", $user_source['other_languages']);
$xml = simplexml_load_file("https://www.facebook.com/translations/FacebookLocales.xml");
$list = "";
foreach($xml->xpath("/locales/locale") as $item)
Avoid too many return
statements within this method.
return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift starts %c") . '</span>';
Avoid too many return
statements within this method.
return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends %c") . '</span>';
Similar blocks of code found in 3 locations. Consider refactoring.
if (count($tokens) > 0) {
$match = false;
$index = join(" ", $usr);
foreach ($tokens as $t)
if (stristr($index, trim($t))) {
includes/controller/admin_arrive_controller.php on lines 46..56 includes/controller/admin_free_controller.php on lines 37..47 There are no issues that match your filters.