Showing 529 of 599 total issues
Method __construct
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($listOfIPs, $expectedName, $consortium = "eduroam")
{
parent::__construct();
\core\common\Entity::intoThePotatoes();
$this->TLS_certkeys = [
Function uglify
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function uglify($parameters) {
$coercedInline = [];
$coercedFile = [];
$optionObject = \core\Options::instance();
$dir = \core\common\Entity::createTemporaryDirectory('test');
- 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 getWindowHeight
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function getWindowHeight() {
var windowHeight = 0;
if (typeof (window.innerHeight) === 'number') {
windowHeight = window.innerHeight;
} 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 findResourceUrl
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function findResourceUrl($resourcetype, $filename, $submodule = '') {
switch ($resourcetype) {
case "CSS":
$path = "/resources/css/";
break;
- 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 testNSISmodules
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function testNSISmodules()
{
$tmp_dir = \core\common\Entity::createTemporaryDirectory('installer', 0)['dir'];
if (!chdir($tmp_dir)) {
$this->loggerInstance->debug(2, "Cannot chdir to $tmp_dir\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 getLogo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getLogo($identifier, $type, $widthIn, $heightIn)
{
$expiresString = '';
$attributeName = [
'federation' => "fed:logo_file",
- 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 listDevices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function listDevices($showHidden = 0)
{
$returnList = [];
$count = 0;
if ($showHidden !== 0 && $showHidden != 1) {
- 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 sendSMS
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function sendSMS($number, $content)
{
$loggerInstance = new \core\common\Logging();
switch (\config\ConfAssistant::SMSSETTINGS['provider']) {
case 'Nexmo':
- 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 propertyCheckIntermediate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function propertyCheckIntermediate(&$intermediateCa, $serverCert = FALSE) {
$returnarray = [];
if (preg_match("/md5/i", $intermediateCa['full_details']['signatureTypeSN'])) {
$returnarray[] = RADIUSTests::CERTPROB_MD5_SIGNATURE;
}
- 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 sendMailtoAdmin
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function sendMailtoAdmin($remove, $response, $status)
{
$txt = '';
if ($status == 'OK') {
$txt = $remove ? _('Profile deactivation succeeded') : _('Profile activation/modification succeeded');
- 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 findResourceUrl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function findResourceUrl($resourcetype, $filename, $submodule = '') {
switch ($resourcetype) {
case "CSS":
$path = "/resources/css/";
break;
Method realm
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function realm($input)
{
\core\common\Entity::intoThePotatoes();
if (strlen($input) == 0) {
echo $this->inputValidationError(_("Realm is empty!"));
Method sanityTestResultHTML
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sanityTestResultHTML($test) {
$out = '';
switch ($test->test_result['global']) {
case \core\common\Entity::L_OK:
$message = "Your configuration appears to be fine.";
Method writeDeviceInfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function writeDeviceInfo()
{
\core\common\Entity::intoThePotatoes();
$ssidCount = 0;
$oiCount = 0;
Method writeMainNSH
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function writeMainNSH($eap, $attr) {
$this->loggerInstance->debug(4, "writeMainNSH");
$this->loggerInstance->debug(4, $attr);
$this->loggerInstance->debug(4, "MYLANG=" . $this->lang . "\n");
Method getExternalDBSyncCandidates
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getExternalDBSyncCandidates($type)
{
$usedarray = [];
$matchingCandidates = [];
$syncstate = self::EXTERNAL_DB_SYNCSTATE_SYNCED;
Method testNSISmodules
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function testNSISmodules()
{
$tmp_dir = \core\common\Entity::createTemporaryDirectory('installer', 0)['dir'];
if (!chdir($tmp_dir)) {
$this->loggerInstance->debug(2, "Cannot chdir to $tmp_dir\n");
Method initialise
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function initialise()
{
// find out where the admin is located approximately
$ourLocation = ['lon' => 0, 'lat' => 0];
$geoip = DeviceLocation::locateDevice();
Method __construct
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
$this->loggerInstance = new Logging();
$this->loggerInstance->debug(4, "--- BEGIN constructing class " . get_class($this) . " .\n");
$this->languageInstance = new Language();
Method sendToRADIUS
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function sendToRADIUS(int $idx, $post)
{
$hostname = "radius_hostname_$idx";
$ch = curl_init("http://" . $this->$hostname);