Showing 198 of 271 total issues
Function view_user_shifts
has a Cognitive Complexity of 324 (exceeds 5 allowed). Consider refactoring. Open
function view_user_shifts() {
global $user, $privileges;
global $ical_shifts;
$ical_shifts = 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 user_shifts
has a Cognitive Complexity of 287 (exceeds 5 allowed). Consider refactoring. Open
function user_shifts() {
global $user, $privileges;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
date_default_timezone_set ("$timezone_identifiers[$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 admin_shifts
has a Cognitive Complexity of 164 (exceeds 5 allowed). Consider refactoring. Open
function admin_shifts() {
global $user;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
date_default_timezone_set ("$timezone_identifiers[$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 admin_rooms
has a Cognitive Complexity of 116 (exceeds 5 allowed). Consider refactoring. Open
function admin_rooms() {
global $user;
$event_source = sql_select("SELECT * FROM `Events` ORDER BY `name`");
$events = 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
Method user_shifts
has 452 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_shifts() {
global $user, $privileges;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
date_default_timezone_set ("$timezone_identifiers[$timezone]");
File user_shifts_controller.php
has 874 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function shifts_title() {
return _("Shifts");
}
Function guest_register
has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring. Open
function guest_register() {
global $tshirt_sizes, $enable_tshirt_size, $default_theme;
$msg = "";
$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 user_settings
has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring. Open
function user_settings() {
global $enable_tshirt_size, $tshirt_sizes, $themes, $locales;
global $user;
$msg = "";
$nick = $user['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
Method view_user_shifts
has 382 lines of code (exceeds 25 allowed). Consider refactoring. Open
function view_user_shifts() {
global $user, $privileges;
global $ical_shifts;
$ical_shifts = array();
Method guest_register
has 329 lines of code (exceeds 25 allowed). Consider refactoring. Open
function guest_register() {
global $tshirt_sizes, $enable_tshirt_size, $default_theme;
$msg = "";
$nick = "";
Method user_settings
has 318 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_settings() {
global $enable_tshirt_size, $tshirt_sizes, $themes, $locales;
global $user;
$msg = "";
$nick = $user['Nick'];
Method admin_shifts
has 314 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_shifts() {
global $user;
$timezone_identifiers = DateTimeZone::listIdentifiers();
$timezone = $user['timezone'];
date_default_timezone_set ("$timezone_identifiers[$timezone]");
Function user_messages
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
function user_messages() {
global $user;
if (! isset($_REQUEST['action'])) {
$users = user_by_nick($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
Function admin_import
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
function admin_import() {
global $rooms_import;
global $user;
$html = "";
- 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_active
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
function admin_active() {
global $tshirt_sizes, $shift_sum_formula;
$msg = "";
$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_export
has a Cognitive Complexity of 57 (exceeds 5 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
- 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 user_password_recovery_controller
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
function user_password_recovery_controller() {
if (isset($_REQUEST['token'])) {
$user_source = User_by_password_recovery_token($_REQUEST['token']);
if ($user_source === false)
engelsystem_error("Unable to load user.");
- 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_import
has 218 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_import() {
global $rooms_import;
global $user;
$html = "";
Function admin_user
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
function admin_user() {
global $user, $privileges, $tshirt_sizes, $privileges;
$html = '';
- 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 user_angeltype_add_controller
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
function user_angeltype_add_controller() {
global $user, $privileges;
if (! isset($_REQUEST['angeltype_id'])) {
error(_("Angeltype doesn't exist."));
- 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"