Showing 529 of 599 total issues
Method productheader
has 58 lines of code (exceeds 25 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
File RFC6614Tests.php
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
File accountstatus.php
has 261 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 Horizon 2020
* research and innovation programme under Grant Agreement No. 731122 (GN4-2).
Function writeInstaller
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function writeInstaller()
{
$dom = textdomain(NULL);
textdomain("devices");
// create certificate files and save their names in $caFiles array
- 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 listIdentityProvidersWithProfiles
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function listIdentityProvidersWithProfiles() {
$handle = DBConnection::handle("INST");
$handle->exec("SET SESSION group_concat_max_len=10000");
$idpQuery = IdPlist::setAllIdentyProvidersQuery(1);
$allIDPs = $handle->exec($idpQuery);
- 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 packetCountEvaluation
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function packetCountEvaluation(&$testresults, $packetcount) {
$reqs = $packetcount[1] ?? 0;
$accepts = $packetcount[2] ?? 0;
$rejects = $packetcount[3] ?? 0;
$challenges = $packetcount[11] ?? 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 significantChanges
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function significantChanges($old, $new)
{
$retval = [];
// check if a CA was added
$x509 = new common\X509();
- 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 signRequest
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function signRequest($csr, $expiryDays): array
{
if ($csr["CSR_STRING"] === NULL) {
throw new Exception("This CA needs the CSR in a string (PEM)!");
}
- 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_username_password
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def __get_username_password(self) -> None:
"""
read user password and set the password property
do nothing if silent mode is set
"""
- 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 listAllIdentityProviders
has 56 lines of code (exceeds 25 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");
File MapGoogle.php
has 259 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 scrub
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function scrub($inputJson, $fedObject) {
$optionInstance = \core\Options::instance();
$parameters = [];
$allPossibleAttribs = array_merge(API::ACTIONS[$inputJson['ACTION']]['REQ'], API::ACTIONS[$inputJson['ACTION']]['OPT'], API::ACTIONS[$inputJson['ACTION']]['FLAG']);
// some actions don't need parameters. Don't get excited when there aren't any.
Method writeConfigVars
has 55 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 furtherStringChecks
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function furtherStringChecks($attribute, $previsionalContent, &$bad) {
$content = FALSE;
switch ($attribute) {
case "media:consortium_OI":
$content = $this->validator->consortiumOI($previsionalContent);
Method udpLogin
has 54 lines of code (exceeds 25 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;
}
Method relevantNAPTRhostnameResolution
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function relevantNAPTRhostnameResolution()
{
// make sure the previous tests have been run before we go on
// preceding tests will cascade automatically if needed
if ($this->NAPTR_SRV_executed == RFC7585Tests::RETVAL_NOTRUNYET) {
Method mailAddressValidSecure
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function mailAddressValidSecure($address)
{
$loggerInstance = new \core\common\Logging();
if (!filter_var($address, FILTER_VALIDATE_EMAIL)) {
$loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: invalid mail address.");
File adminQuery.php
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Function sendOptionsToDatabase
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function sendOptionsToDatabase($object, array $options, array $pendingattributes, string $device = NULL, int $eaptype = NULL) {
$retval = [];
foreach ($options as $iterateOption) {
foreach ($iterateOption as $name => $optionPayload) {
$optiontype = $this->optioninfoObject->optionType($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 createMsgbox
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function createMsgbox(type, onclick) {
var body = document.getElementsByTagName("body")[0];
if (document.getElementById("overlay") === null) {
var overlay = document.createElement("div");
overlay.setAttribute("id", "overlay");
- 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"