Showing 198 of 271 total issues
Function shifttype_edit_controller
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function shifttype_edit_controller() {
$shifttype_id = null;
$name = "";
$angeltype_id = null;
$description = "";
- 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
Method AngelType_view
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angeltypes, $admin_angeltypes, $coordinator, $user_driver_license, $user) {
$buttons = [
button(page_link_to('angeltypes'), _("Angeltypes"), 'back')
];
File sys_template.php
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* List of available themes
*/
$themes = array(
Function User_view
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
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;
- 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
Method admin_settings
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_settings() {
$ok = false;
$msg = "";
$event_name = "";
File User_view.php
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Available T-Shirt sizes
*/
File admin_import_controller.php
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function admin_import_title() {
return _("Frab import");
}
File user_settings_controller.php
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function settings_title() {
return _("Settings");
}
function user_settings() {
File admin_shifts_controller.php
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function admin_shifts_title() {
return _("Create shifts");
}
File user_angeltypes_controller.php
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Display a hint for team/angeltype coordinators if there are unconfirmed users for his angeltype.
*/
Method install_admin
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
function install_admin() {
$ok = false;
$msg = "";
$username = "";
Method admin_questions
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_questions() {
global $user;
if (! isset($_REQUEST['action'])) {
$unanswered_questions_table = array();
Function user_questions
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function user_questions() {
global $user;
if (! isset($_REQUEST['action'])) {
$open_questions = select_open_questions($user['UID']);
$answered_questions = select_ansd_questions($user['UID']);
- 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
Method admin_events
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_events() {
global $user;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
Function guest_login
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function guest_login() {
global $user, $privileges;
$nick = "";
- 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 admin_free
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function admin_free() {
global $privileges;
$search = "";
if (isset($_REQUEST['search']))
- 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
Method Shift_view
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 insert_user
has 25 arguments (exceeds 4 allowed). Consider refactoring. Open
function insert_user($default_theme, $nick, $prename, $lastname, $age, $tel, $dect, $native_lang, $other_langs, $mobile, $mail, $email_shiftinfo, $jabber, $tshirt_size, $password_hash, $comment, $hometown, $twitter, $facebook, $github, $organization, $current_city, $organization_web, $timezone, $planned_arrival_date) {
Method user_myshifts
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_myshifts() {
global $LETZTES_AUSTRAGEN;
global $user, $privileges;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
Method admin_groups
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_groups() {
global $user;
$html = "";
$groups = Groups_by_name();