Showing 599 of 599 total issues
Method significantChanges
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function significantChanges($old, $new)
{
$retval = [];
// check if a CA was added
$x509 = new common\X509();
Function getDisplayName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getDisplayName()
{
$attr = $this->attributes;
$objs = [];
if ($this->langScope === 'global') {
- 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 allNetworkBlocks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function allNetworkBlocks()
{
$retval = "";
$this->serial = 0;
$this->loggerInstance->debug(3, $this->attributes['internal:networks'], "NETWORKS:\n", "\n");
- 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 networkBlock
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function networkBlock($blocktype, $toBeConfigured, $prettyName)
{
\core\common\Entity::intoThePotatoes();
$eapType = $this->selectedEap;
switch ($blocktype) {
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
$this->test_result = [];
$this->test_result['global'] = 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 downloadStats
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function downloadStats($format, $detail = '')
{
$data = $this->downloadStatsCore($detail);
$retstring = "";
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($invitationId)
{
parent::__construct();
$this->invitationTokenString = $invitationId;
$handle = DBConnection::handle("INST");
- 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 availableOptions
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function availableOptions($className = 0)
{
$tempArray = [];
$this->loggerInstance->debug(4, "CLASSNAME IS $className\n");
- 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 setProfileAttributes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function setProfileAttributes($profile)
{
$profileOptions = explode('---', $profile->profile_options);
$productionProfile = false;
$profileNames = [];
- 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 CATInternalTests
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function CATInternalTests()
{
// we are expecting to get a REJECT from all runs, because that means the packet got through to the IdP.
// (the ETLR sometimes does a "Reject instead of Ignore" but that is filtered out and changed into a timeout
// by the test suite automatically, so it does not disturb the measurement)
- 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 thoroughNameChecks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function thoroughNameChecks($servercert, &$testresults) {
// Strategy for checks: we are TOTALLY happy if any one of the
// configured names shows up in both the CN and a sAN
// This is the primary check.
// If that was not the case, we are PARTIALLY happy if any one of
- 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 printDynamic
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function printDynamic()
{
$out = [];
$out[] = "<div id='dynamic_tests'><fieldset class='option_container'>
<legend><strong>"._("DYNAMIC connectivity tests")."</strong></legend>";
- 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 isDataRestricted
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function isDataRestricted($table, $row_id)
{
if ($table != "institution_option" && $table != "profile_option" && $table != "federation_option" && $table != "user_options") {
return []; // better safe than sorry: that's an error, so assume nobody is authorised to act on that data
}
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($userId)
{
$this->databaseType = "USER";
parent::__construct(); // database handle is now available
$this->attributes = [];
- 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 opensslClientsResult
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function opensslClientsResult($host, $opensslbabble, &$testresults, $type = '', $resultArrayKey = 0)
{
\core\common\Entity::intoThePotatoes();
$res = RADIUSTests::RETVAL_OK;
$ret = $testresults[$host]['ca'][$type]['certificate'][$resultArrayKey]['returncode'];
- 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 checkServerName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function checkServerName($host)
{
// it could match CN or sAN:DNS, we don't care which
if (isset($this->TLS_CA_checks_result[$host]['certdata']['subject'])) {
$this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName .
- 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 clientP12Block
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function clientP12Block()
{
\core\common\Entity::intoThePotatoes();
if (count($this->clientCert) == 0) {
throw new Exception("the client block was called but there is no client certificate!");
Method pngInjectConsortiumLogo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function pngInjectConsortiumLogo(string $inputpngstring, int $symbolsize, int $marginsymbols = 4) {
$loggerInstance = new \core\common\Logging();
$inputgd = imagecreatefromstring($inputpngstring);
if ($inputgd === FALSE) { // source image is bogus; don't do anything
return "";
Method instLevelInfoBoxes
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function instLevelInfoBoxes(\core\IdP $myInst) {
\core\common\Entity::intoThePotatoes();
$idpoptions = $myInst->getAttributes();
$retval = "<div class='infobox'>
<h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2>
Method getNetworks
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getNetworks()
{
$additionalConsortia = [];
$additionalSSIDs = [];
$ssids = $this->getConfigSSIDs();