Showing 198 of 271 total issues
Method user_angeltype_add_controller
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_angeltype_add_controller() {
global $user, $privileges;
if (! isset($_REQUEST['angeltype_id'])) {
error(_("Angeltype doesn't exist."));
Method Users_view
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 admin_free
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_free() {
global $privileges;
$search = "";
if (isset($_REQUEST['search']))
Method user_driver_license_edit_controller
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_driver_license_edit_controller() {
global $privileges, $user;
if (isset($_REQUEST['user_id'])) {
$user_source = User($_REQUEST['user_id']);
Function Shift_signup_allowed
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function Shift_signup_allowed($shift, $angeltype, $user_angeltype = null, $user_shifts = null) {
global $user, $privileges;
if ($user_shifts == null) {
$user_shifts = Shifts_by_user($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 guest_login
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function guest_login() {
global $user, $privileges;
$nick = "";
Method header_toolbar
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function header_toolbar() {
global $p, $privileges, $user, $enable_tshirt_size, $max_freeloadable_shifts;
$settings = array();
$no_migrated = "";
if (test_import()) {
Method User_insert
has 21 arguments (exceeds 4 allowed). Consider refactoring. Open
function User_insert($nick, $prename, $lastname, $age, $tel, $dect, $mobile, $mail, $email_shiftinfo, $jabber, $tshirt_size, $password_hash, $comment, $hometown, $twitter, $facebook, $github, $organization, $organization_web, $timezone, $planned_arrival_date) {
Function Shift_view
has a Cognitive Complexity of 19 (exceeds 5 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)
- 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_password_recovery_controller
has 62 lines of code (exceeds 25 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.");
Function admin_create_groups
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function admin_create_groups() {
global $user;
$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
Function Users_view
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
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');
- 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_edit_controller
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function angeltype_edit_controller() {
global $privileges, $user;
$name = "";
$restricted = false;
Method shifttype_edit_controller
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function shifttype_edit_controller() {
$shifttype_id = null;
$name = "";
$angeltype_id = null;
$description = "";
Method update_user
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
function update_user($eNick, $eName, $eVorname, $eTelefon, $eHandy, $eAlter, $eDECT, $eemail, $email_shiftinfo, $ejabber, $eSize, $eGekommen, $eAktiv, $force_active, $eTshirt, $Hometown, $id) {
Function admin_news
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function admin_news() {
global $user;
if (! isset($_GET["action"])) {
redirect(page_link_to("news"));
- 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 update_user_details
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
function update_user_details($nick, $prename, $lastname, $age, $tel, $dect, $mobile, $mail, $email_shiftinfo, $jabber, $tshirt_size, $hometown, $planned_arrival_date, $planned_departure_date, $timezone, $uid) {
Method user_angeltype_update_controller
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function user_angeltype_update_controller() {
global $user, $privileges;
if (! in_array('admin_angel_types', $privileges)) {
error(_("You are not allowed to set coordinator rights."));
Method admin_create_groups
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_create_groups() {
global $user;
$name = "";
Method admin_news
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function admin_news() {
global $user;
if (! isset($_GET["action"])) {
redirect(page_link_to("news"));