Showing 529 of 599 total issues
Method generateWlanProfile
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function generateWlanProfile($networkName, $ssids, $authentication, $encryption, $ois, $hs20 = false)
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function __construct($database)
{
$this->loggerInstance = new \core\common\Logging();
$databaseCapitalised = strtoupper($database);
if (isset(\config\Master::DB[$databaseCapitalised])) {
- 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 downloadInstaller
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function downloadInstaller($device, $prof_id, $generated_for = 'user', $openRoaming = 0, $token = NULL, $password = NULL)
Function getInstallerBasename
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getInstallerBasename()
{
$baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name'])."-".$this->getDeviceId();
if (isset($this->attributes['profile:customsuffix'][1])) {
// this string will end up as a filename on a filesystem, so always
- 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 writeWLANprofile
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber) {
Function splitNames
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function splitNames($nameRaw) {
$variants = explode('#', $nameRaw);
$submatches = [];
$returnArray = [];
foreach ($variants as $oneVariant) {
- 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($profileId, $idpObject = NULL)
{
parent::__construct($profileId, $idpObject);
$this->entityOptionTable = "profile_option";
- 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 generateNewInstaller
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function generateNewInstaller($device, $profile, $generatedFor, $openRoaming, $token, $password)
Function link
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function link()
{
if (isset($_SERVER['HTTPS'])) {
$link = 'https://';
} 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 jsonListDevices
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function jsonListDevices($profileId)
{
$returnArray = [];
$profileAttributes = $this->profileAttributes($profileId);
$thedevices = $profileAttributes['devices'];
- 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(CertificationAuthorityEmbeddedECDSA::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
Function saveCertificateFiles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
final protected function saveCertificateFiles($format)
{
switch ($format) {
case "der": // fall-thorugh, same treatment
case "pem":
- 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 adminInvitationMail
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function adminInvitationMail($targets, $introtext, $newtoken, $idpPrettyName, $federation, $type)
Avoid deeply nested control flow statements. Open
if ($ch === FALSE) {
$loggerInstance->debug(2, "Unable ask eduGAIN about IdP - CURL init failed!");
break;
}
Method marshalObject
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function marshalObject($domElement, $node, $name, $object, $namespace = NULL, $root = false)
Method createTokens
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createTokens($isByFedadmin, $for, $instIdentifier, $externalId = 0, $country = 0, $partType = 0)
Function printDN
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function printDN($distinguishedName) {
$out = '';
foreach (array_reverse($distinguishedName) as $nameType => $nameValue) { // to give an example: "CN" => "some.host.example"
if (!is_array($nameValue)) { // single-valued: just a string
$nameValue = ["$nameValue"]; // convert it to a multi-value attrib with just one value :-) for unified processing later on
- 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 createTemporaryDirectory
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1)
{
$loggerInstance = new Logging();
$name = md5(time() . rand());
$path = ROOT;
- 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 thoroughChainChecks
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function thoroughChainChecks(&$testresults, &$intermOdditiesCAT, $tmpDir, $servercert, $eapIntermediates, $eapIntermediateCRLs) {
Function detect_desktop_environment
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def detect_desktop_environment() -> str:
"""
Detect what desktop type is used. This method is prepared for
possible future use with password encryption on supported distros
- 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"