Showing 529 of 599 total issues
Function createTokens
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function createTokens($isByFedadmin, $for, $instIdentifier, $externalId = 0, $country = 0, $partType = 0)
{
$level = ($isByFedadmin ? "FED" : "INST");
$tokenList = [];
foreach ($for as $oneDest) {
- 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 processCertificate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processCertificate($cadata)
{
$pemBegin = strpos($cadata, "-----BEGIN CERTIFICATE-----");
if ($pemBegin !== FALSE) {
$pemEnd = strpos($cadata, "-----END CERTIFICATE-----") + 25;
Method __construct
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($visibility = 'all', $selectedLang = '') {
$langsArray = [];
foreach (\config\Master::LANGUAGES as $lang => $value) {
if ($lang == $selectedLang) {
$langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")', 'class'=>'selected-lang'];
Method __construct
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($profileId, $idpObject = NULL)
{
parent::__construct($profileId, $idpObject);
$this->entityOptionTable = "profile_option";
Method listAllIdentityProviders
has 42 lines of code (exceeds 25 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");
Method pickupFinalCert
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function pickupFinalCert($soapReqnum, $wait)
{
try {
$soap = $this->initEduPKISoapSession("RA");
$counter = 0;
Method createIdPFromToken
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createIdPFromToken(string $token, string $owner)
{
new CAT(); // be sure that Entity's static members are initialised
common\Entity::intoThePotatoes();
// the token either has cat_institution_id set -> new admin for existing inst
Method opensslCAResult
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function opensslCAResult($host, $opensslbabble)
{
if (preg_match('/connect: Connection refused/', implode($opensslbabble))) {
$this->TLS_CA_checks_result[$host]['status'] = RADIUSTests::RETVAL_CONNECTION_REFUSED;
return RADIUSTests::RETVAL_INVALID;
Function prefillText
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function prefillText(int $rowid, string $optionName, string $optionValue, $optionLang)
{
\core\common\Entity::intoThePotatoes();
$retval = "";
$optioninfo = \core\Options::instance();
- 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 productheader
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function productheader($area) {
\core\common\Entity::intoThePotatoes();
$language = $this->languageInstance->getLang();
// this <div is closing in footer, keep it in PHP for Netbeans syntax
// highlighting to work
- 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 listIdentityProviders
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function listIdentityProviders($activeOnly = 0)
{
// maybe we did this exercise before?
if ($activeOnly != 0 && count($this->idpListActive) > 0) {
return $this->idpListActive;
- 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 listExternalEntities
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function listExternalEntities($unmappedOnly, $type = NULL)
{
$allExternals = [];
$usedarray = [];
$returnarray = [];
- 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 testPhpModules
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function testPhpModules()
{
if (function_exists('idn_to_ascii')) {
$this->storeTestResult(\core\common\Entity::L_OK, "PHP can handle internationalisation.");
} 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 listAllIdentityProviders
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public 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 writeConfigVars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function writeConfigVars($file) {
$eapMethod = \core\common\EAP::eapDisplayName($this->selectedEap);
$contacts = $this->mkSupportContacts();
$tou = $this->mkUserConsent();
$outerId = $this->determineOuterIdString();
- 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 magic
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function magic()
{
$this->testId = \core\CAT::uuid();
$this->databaseHandle->exec("INSERT INTO diagnosticrun (test_id, realm, suspects, evidence) VALUES ('$this->testId', '$this->realm', NULL, NULL)");
// simple things first: do we know anything about the realm, either
- 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 pickupFinalCert
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function pickupFinalCert($soapReqnum, $wait)
{
try {
$soap = $this->initEduPKISoapSession("RA");
$counter = 0;
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($realm, $outerUsernameForChecks, $supportedEapTypes = [], $expectedServerNames = [], $expectedCABundle = []) {
parent::__construct();
$this->realm = $realm;
$this->outerUsernameForChecks = $outerUsernameForChecks;
- 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 relevantNAPTRsrvResolution
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function relevantNAPTRsrvResolution()
{
// see if preceding checks have been run, and run them if not
// compliance check will cascade NAPTR check on its own
if ($this->NAPTR_compliance_executed == RFC7585Tests::RETVAL_NOTRUNYET) {
- 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 getCollapsedAttributes
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getCollapsedAttributes($eap = [])
{
$collapsedList = [];
foreach ($this->getAttributes() as $attribute) {
// filter out eap-level attributes not pertaining to EAP type $eap
- 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"