fossasia/engelsystem

View on GitHub
includes/controller/user_ical_controller.php

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

Method user_ical has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function user_ical() {
global $ical_shifts, $user;
 
if (isset ($_REQUEST['key']) && preg_match("/^[0-9a-f]{32}$/", $_REQUEST['key']))
$key = $_REQUEST['key'];
Severity: Minor
Found in includes/controller/user_ical_controller.php - About 1 hr to fix

    Function user_ical has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    function user_ical() {
    global $ical_shifts, $user;
     
    if (isset ($_REQUEST['key']) && preg_match("/^[0-9a-f]{32}$/", $_REQUEST['key']))
    $key = $_REQUEST['key'];
    Severity: Minor
    Found in includes/controller/user_ical_controller.php - About 1 hr to fix
    Category
    Status