Showing 529 of 599 total issues
Function getUserDownloadStats
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getUserDownloadStats($device = NULL)
{
$columnName = "downloads_user";
if ($this instanceof \core\ProfileSilverbullet) {
$columnName = "downloads_silverbullet";
- 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
Consider simplifying this complex logical expression. Open
if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS || $this->selectedEap == \core\common\EAP::EAPTYPE_PEAP_MSCHAP2 || $this->selectedEap == \core\common\EAP::EAPTYPE_PWD || $this->selectedEap == \core\common\EAP::EAPTYPE_TTLS_PAP || $this->selectedEap == \core\common\EAP::EAPTYPE_TTLS_MSCHAP2 || $this->selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) {
$windowsProfile = [];
$eapConfig = $this->prepareEapConfig($this->attributes);
$iterator = 0;
foreach ($allSSID as $ssid => $cipher) {
Method sendOptionsToDatabase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function sendOptionsToDatabase($object, array $options, array $pendingattributes, string $device = NULL, int $eaptype = NULL) {
Method processSubmittedFields
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processSubmittedFields($object, array $postArray, array $filesArray, int $eaptype = NULL, string $device = NULL) {
Method processImage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function processImage($inputImage, $destFile, $width, $height, $resize)
Method updateCache
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateCache($device, $path, $mime, $integerEapType, $openRoaming)
Method updateCache
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateCache($device, $path, $mime, $integerEapType, $openRoaming) {
Method newIdP
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function newIdP($type, $ownerId, $level, $mail = NULL, $bestnameguess = NULL)
Method addAttributeAllLevels
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function addAttributeAllLevels($attrName, $attrLang, $attrValue, $eapType, $device)
Method createCArepository
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($realm, $outerUsernameForChecks, $supportedEapTypes = [], $expectedServerNames = [], $expectedCABundle = []) {
Method updateCache
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function updateCache($device, $path, $mime, $integerEapType, $openRoaming);
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, silent: bool = False, username: str = '',
Method opensslClientsResult
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function opensslClientsResult($host, $opensslbabble, &$testresults, $type = '', $resultArrayKey = 0)
Function innerAuth
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function innerAuth($eap)
{
$out = [];
$out['EAP'] = 0;
switch ($eap["INNER"]) {
- 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 existingFederationInt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function existingFederationInt($input, $owner = NULL)
{
$cat = new \core\CAT(); // initialises Entity static members
$fedIdentifiers = array_keys($cat->knownFederations);
if (!in_array(strtoupper($input), $fedIdentifiers)) {
- 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 prefilledOptionTable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function prefilledOptionTable(string $attributePrefix, $fed)
{
$retval = "<table id='expandable_$attributePrefix" . "_options'>";
$prepopulate = [];
- 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 handleMoveEvent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function handleMoveEvent(evt) {
if (this.cursor_) {
var map = evt.map;
var feature = map.forEachFeatureAtPixel(evt.pixel,
basicFeatureHandler,
- 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 getExecPath
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getExecPath($pathToCheck)
{
$the_path = "";
$exec_is = "UNDEFINED";
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($blueprint)
{
parent::__construct();
$Dev = \devices\Devices::listDevices();
if (isset($Dev[$blueprint])) {
- 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"