Showing 198 of 271 total issues
Function admin_arrive
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
function admin_arrive() {
$msg = "";
$search = "";
if (isset($_REQUEST['search']))
$search = strip_request_item('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
Function admin_settings
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function admin_settings() {
$ok = false;
$msg = "";
$event_name = "";
- 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_rooms
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_rooms() {
global $user;
$event_source = sql_select("SELECT * FROM `Events` ORDER BY `name`");
$events = array();
Function user_myshifts
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
function user_myshifts() {
global $LETZTES_AUSTRAGEN;
global $user, $privileges;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
- 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_arrive
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_arrive() {
$msg = "";
$search = "";
if (isset($_REQUEST['search']))
$search = strip_request_item('search');
File guest_login_controller.php
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function login_title() {
return _("Login");
}
Function admin_groups
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function admin_groups() {
global $user;
$html = "";
$groups = Groups_by_name();
- 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_active
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_active() {
global $tshirt_sizes, $shift_sum_formula;
$msg = "";
$search = "";
Function user_driver_license_edit_controller
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function user_driver_license_edit_controller() {
global $privileges, $user;
if (isset($_REQUEST['user_id'])) {
$user_source = User($_REQUEST['user_id']);
- 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
File User_model.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* User model
*/
Method admin_export
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_export() {
// Export User data
if(isset($_REQUEST['download'])){
$filename = tempnam('/tmp', '.csv'); // Temporary File Name
create_temporary_table(); // Create temporary table
Method admin_user
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_user() {
global $user, $privileges, $tshirt_sizes, $privileges;
$html = '';
Function admin_questions
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
function admin_questions() {
global $user;
if (! isset($_REQUEST['action'])) {
$unanswered_questions_table = array();
- 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_view
has a Cognitive Complexity of 36 (exceeds 5 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')
];
- 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_events
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
function admin_events() {
global $user;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
- 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_edit_controller
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
function angeltype_edit_controller() {
global $privileges, $user;
$name = "";
$restricted = 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 install_admin
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function install_admin() {
$ok = false;
$msg = "";
$username = "";
- 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 user_messages
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_messages() {
global $user;
if (! isset($_REQUEST['action'])) {
$users = user_by_nick($user['UID']);
Function header_toolbar
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function header_toolbar() {
global $p, $privileges, $user, $enable_tshirt_size, $max_freeloadable_shifts;
$settings = array();
$no_migrated = "";
if (test_import()) {
- 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 User_view
has 118 lines of code (exceeds 25 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;