Showing 529 of 599 total issues
Function udpLogin
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function udpLogin($probeindex, $eaptype, $innerUser, $password, $opnameCheck = TRUE, $frag = TRUE, $clientcertdata = NULL) {
$preliminaries = $this->udpLoginPreliminaries($probeindex, $eaptype, $clientcertdata);
if ($preliminaries !== TRUE) {
return $preliminaries;
}
- 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 __get_p12_cred
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def __get_p12_cred(self):
"""get the password for the PFX file"""
if Config.eap_inner == 'SILVERBULLET':
self.__save_sb_pfx()
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 isEapTypeDefinitionComplete
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function isEapTypeDefinitionComplete($eaptype)
{
if ($eaptype->needsServerCACert() && $eaptype->needsServerName()) {
$missing = [];
// silverbullet needs a support email address configured
- 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 setup
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public function setup(AbstractProfile $profile, $token = NULL, $importPassword = NULL, $openRoaming = 0)
{
$this->loggerInstance->debug(4, "module setup start\n");
common\Entity::intoThePotatoes();
$purpose = 'installer';
Method extractIncomingCertsfromEAP
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function extractIncomingCertsfromEAP(&$testresults, $tmpDir) {
/*
* EAP's house rules:
* 1) it is unnecessary to include the root CA itself (adding it has
* detrimental effects on performance)
File overview_sp.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
* project that has received funding from the European Union’s Framework
Method infoblock
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function infoblock(array $optionlist, string $class, string $level) {
\core\common\Entity::intoThePotatoes();
$locationMarkers = [];
$retval = "";
$optioninfo = \core\Options::instance();
Function getExternalDBSyncCandidates
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getExternalDBSyncCandidates($type)
{
$usedarray = [];
$matchingCandidates = [];
$syncstate = self::EXTERNAL_DB_SYNCSTATE_SYNCED;
- 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 listAllIdentityProviders
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function listAllIdentityProviders($activeOnly = 0, $country = "")
{
common\Entity::intoThePotatoes();
$handle = DBConnection::handle("INST");
$handle->exec("SET SESSION group_concat_max_len=10000");
- 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 weNeedToTalk
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function weNeedToTalk() {
$this->determineMailsToSend();
foreach ($this->mailQueue as $oneMail) {
$theMail = $this->mailStack[$oneMail];
// if user interaction would have been good, but the user didn't
- 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 autodetectCAWithProbe
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function autodetectCAWithProbe($outerId) {
// for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy
// the following PEM data is one of the SENSE EAPLab client certs (not secret at all)
$clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12");
if ($clientcert === 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
Method __construct
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($token)
{
parent::__construct();
$this->globalInfo = [
\core\common\Entity::L_OK => _("All tests passed."),
Method previewCAinHTML
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function previewCAinHTML($cAReference) {
\core\common\Entity::intoThePotatoes();
$validator = new \web\lib\common\InputValidation();
$ref = $validator->databaseReference($cAReference);
$caExpiryTrashhold = \config\ConfAssistant::CERT_WARNINGS['expiry_warning'];
Method __construct
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($invitationId)
{
parent::__construct();
$this->invitationTokenString = $invitationId;
$handle = DBConnection::handle("INST");
Method exec
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function exec($querystring, $types = NULL, &...$arguments)
{
// log exact query to audit log, if it's not a SELECT
$isMoreThanSelect = FALSE;
if (preg_match("/^(SELECT\ |SET\ )/i", $querystring) == 0 && preg_match("/^DESC/i", $querystring) == 0) {
Method writeConfigVars
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function writeConfigVars($file) {
$eapMethod = \core\common\EAP::eapDisplayName($this->selectedEap);
$contacts = $this->mkSupportContacts();
$tou = $this->mkUserConsent();
$outerId = $this->determineOuterIdString();
Method testGeoip
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function testGeoip()
{
$host_4 = '145.0.2.50';
$host_6 = '2001:610:188:444::50';
switch (\config\Master::GEOIP['version']) {
DeviceXML
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class DeviceXML extends \core\DeviceConfig
{
/**
* @var array $AuthMethodElements is used to limit
UIElements
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class UIElements extends \core\common\Entity {
/**
* the custom displayable variant of the term 'federation'
*
UserAPI
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class UserAPI extends CAT
{
/**
* nothing special to be done here.