Showing 529 of 599 total issues
Function levelPrecedenceAttributeJoin
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function levelPrecedenceAttributeJoin($existing, $new, $newlevel)
{
foreach ($new as $attrib) {
$ignore = "";
foreach ($existing as $approvedAttrib) {
- 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 relevantNAPTR
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function relevantNAPTR()
{
if ($this->discoveryTag == "") {
$this->NAPTR_executed = RADIUSTests::RETVAL_NOTCONFIGURED;
return RADIUSTests::RETVAL_NOTCONFIGURED;
- 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 alert
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def alert(self, text: str) -> None:
"""Generate alert message"""
if self.silent:
return
if self.graphics == 'tty':
- 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 readyForShowtime
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function readyForShowtime()
{
$properConfig = FALSE;
$attribs = $this->getCollapsedAttributes();
// do we have enough to go live? Check if any of the configured EAP methods is completely configured ...
- 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 show_info
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def show_info(self, data: str) -> None:
"""
Show a piece of information
"""
if self.silent:
- 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 incrementDownloadStats
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function incrementDownloadStats($device, $area, $openRoaming)
{
if ($area == "admin" || $area == "user" || $area == "silverbullet") {
$lang = $this->languageInstance->getLang();
$this->frontendHandle->exec("INSERT INTO downloads (profile_id, device_id, lang, openroaming, downloads_$area) VALUES (? ,?, ?, ?, 1) ON DUPLICATE KEY UPDATE downloads_$area = downloads_$area + 1", "issi", $this->identifier, $device, $lang, $openRoaming);
- 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 udpLogin
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function udpLogin($probeindex, $eaptype, $innerUser, $password, $opnameCheck = TRUE, $frag = TRUE, $clientcertdata = NULL) {
Method saveDownloadDetails
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType, $openRoaming)
Function divOtherinstallers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function divOtherinstallers() {
$retval = "
<div class='sub_h'>
<div id='other_installers'>".$this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
<table id='device_list' style='padding:0px;'>";
- 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 string
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function string($input, $allowWhitespace = FALSE)
{
// always chop out invalid characters, and surrounding whitespace
$retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input);
if ($retvalStep0 === FALSE) {
- 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
Avoid deeply nested control flow statements. Open
if ($oneLine === FALSE) {
break;
}
Avoid deeply nested control flow statements. Open
if ($number === FALSE) { // invalid input received, default to sane
$number = 5;
}
Avoid deeply nested control flow statements. Open
if ($retval["SENT"]) {
$additionalInfo["EMAIL TRANSPORT SECURE"] = $retval["TRANSPORT"];
}
Function selectElement
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function selectElement($rowid, $list)
{
$jsmagic = "onchange='
if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
- 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 consentBlock
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function consentBlock()
{
\core\common\Entity::intoThePotatoes();
if (isset($this->attributes['support:info_file'])) {
return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST;
- 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
Avoid deeply nested control flow statements. Open
if (count($elements) < 2) {
break;
}
Function combineLogo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function combineLogo($logos = NULL, $fedLogo = NULL)
{
// maximum size to which we want to resize the logos
$maxSize = 120;
- 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 getAuthMethodsList
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getAuthMethodsList() {
$methodList = [];
if ($this->allEaps) {
$eapmethods = [];
foreach ($this->attributes['all_eaps'] as $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"
Further reading
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
$this->databaseType = "INST";
parent::__construct();
$this->rootPem = file_get_contents(CertificationAuthorityEmbeddedRSA::LOCATION_ROOT_CA);
- 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 generateInstaller
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function generateInstaller($device, $profileId, $generatedFor = "user", $openRoaming = 0, $token = NULL, $password = NULL)