Showing 529 of 599 total issues
Method setRADIUSconfig
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setRADIUSconfig($onlyone = 0, $notify = 0)
{
$remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1;
$toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => ''));
$toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&';
Method opensslClientsResult
has 33 lines of code (exceeds 25 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'];
Method testMailer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function testMailer()
{
if (empty(\config\Master::APPEARANCE['abuse-mail']) || \config\Master::APPEARANCE['abuse-mail'] == "my-abuse-contact@your-cat-installation.example") {
$this->storeTestResult(\core\common\Entity::L_ERROR, "Your abuse-mail has not been set, cannot continue with mailer tests.");
return;
Method writeMessages
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function writeMessages($file) {
\core\common\Entity::intoThePotatoes();
$messages = [
'QUIT'=> _("Really quit?"),
'USERNAME_PROMPT'=> _("enter your userid"),
Method testDeviceCache
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function testDeviceCache()
{
if ((!empty(\devices\Devices::$Options['no_cache'])) && \devices\Devices::$Options['no_cache']) {
$global_no_cache = 1;
} else {
Method testPhpModules
has 32 lines of code (exceeds 25 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 {
Method __construct
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(int $instId)
{
$this->databaseType = "INST";
parent::__construct(); // now databaseHandle and logging is available
$this->entityOptionTable = "institution_option";
Method revokeCertificate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function revokeCertificate($serial): void
{
try {
$soap = $this->initEduPKISoapSession("RA");
$soapRevocationSerial = $soap->newRevocationRequest(["Serial", $serial], "");
Method wpaSupplicantConfig
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function wpaSupplicantConfig(array $eaptype, string $inner, string $outer, string $password) {
$eapText = \core\common\EAP::eapDisplayName($eaptype);
$config = '
network={
ssid="' . \config\Master::APPEARANCE['productname'] . ' testing"
Method revokeCertificate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function revokeCertificate($serial): void
{
try {
$soap = $this->initEduPKISoapSession("RA");
$soapRevocationSerial = $soap->newRevocationRequest(["Serial", $serial], "");
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"