Showing 529 of 599 total issues
File IdPlist.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Method selectElement
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function selectElement($rowid, $list)
{
$jsmagic = "onchange='
if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
Method prefillText
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function prefillText(int $rowid, string $optionName, string $optionValue, $optionLang)
{
\core\common\Entity::intoThePotatoes();
$retval = "";
$optioninfo = \core\Options::instance();
Method issueCertificate
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function issueCertificate($token, $importPassword, $certtype)
{
$loggerInstance = new common\Logging();
$databaseHandle = DBConnection::handle("INST");
$loggerInstance->debug(5, "generateCertificate() - starting.\n");
Function testDatabases
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function testDatabases()
{
$databaseName1 = 'INST';
try {
$db1 = DBConnection::handle($databaseName1);
- 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 testDeviceCache
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function testDeviceCache()
{
if ((!empty(\devices\Devices::$Options['no_cache'])) && \devices\Devices::$Options['no_cache']) {
$global_no_cache = 1;
} else {
- 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 __construct
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($token)
{
parent::__construct();
$this->globalInfo = [
\core\common\Entity::L_OK => _("All tests passed."),
- 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 checkLineparse
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function checkLineparse($inputarray, $desiredCheck) {
foreach ($inputarray as $lineid => $line) {
switch ($desiredCheck) {
case self::LINEPARSE_CHECK_REJECTIGNORE:
if (preg_match("/Attribute 18 (Reply-Message)/", $line) && preg_match("/Reject instead of Ignore at eduroam.org/", $inputarray[$lineid + 1])) {
- 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 consolidateUdpResult
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function consolidateUdpResult($host) {
\core\common\Entity::intoThePotatoes();
$ret = [];
$serverCert = [];
$udpResult = $this->UDP_reachability_result[$host];
- 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 __select_p12_file
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def __select_p12_file(self) -> str:
"""
prompt user for the PFX file selection
this method is not being called in the silent mode
therefore there is no code for this case
- 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 findLoginIdPByEmail
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function findLoginIdPByEmail($mail, $lang)
{
$loggerInstance = new common\Logging();
$listOfProviders = [];
$matchedProviders = [];
Method __construct
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($idpObject, $deploymentIdRaw, $consortium = 'eduroam')
{
parent::__construct($idpObject, $deploymentIdRaw); // we now have access to our INST database handle and logging
$this->entityOptionTable = "deployment_option";
$this->entityIdColumn = "deployment_id";
DeviceConfig
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class DeviceConfig extends \core\common\Entity
{
/**
* stores the path to the temporary working directory for a module instance
Method displayName
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function displayName($input) {
\core\common\Entity::intoThePotatoes();
$ssidText = _("SSID");
$passpointOiText = _("HS20 Consortium OI");
Method __construct
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
\core\common\Entity::intoThePotatoes();
$this->previousQuestions = $_SESSION['EVIDENCE']['QUESTIONSASKED'] ?? [];
Function update_table
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function update_table($table_name) {
$table = 'view_'.$table_name;
$tmp_table = 'tmp_'.$table_name;
if ($this->tablesource[$table_name] == 'eduroam') {
$this->db_local->select_db('monitor_copy');
- 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 getNetworks
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private function getNetworks()
{
$additionalConsortia = [];
$additionalSSIDs = [];
$ssids = $this->getConfigSSIDs();
- 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 genericAPIStatus
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private function genericAPIStatus($type, $param1 = NULL, $param2 = NULL)
{
$endpoints = [
'tlr_test' => "https://monitor.eduroam.org/mapi/index.php?type=tlr_test&tlr=$param1",
'federation_via_tlr' => "https://monitor.eduroam.org/mapi/index.php?type=federation_via_tlr&federation=$param1",
- 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 createCArepository
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs) {
if (!mkdir($tmpDir . "/root-ca-allcerts/", 0700, true)) {
throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-allcerts/\n");
}
if (!mkdir($tmpDir . "/root-ca-eaponly/", 0700, true)) {
- 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 setLang
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private function setLang($hardSetLang = 0)
{
// $langConverted will contain candidates for the language setting in the order
// of preference
$loggerInstance = new \core\common\Logging();
- 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"