Showing 599 of 599 total issues
Method getIdentityProvidersCertStatus
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getIdentityProvidersCertStatus() {
$query = "SELECT distinct profile.profile_id FROM profile JOIN profile_option ON profile.profile_id = profile_option.profile_id WHERE option_name='profile:production' AND profile.sufficient_config = 1";
$activeProfiles = [];
$result = $this->databaseHandle->exec($query);
$rows = $result->fetch_all();
Method isDataRestricted
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function isDataRestricted($table, $row_id)
{
if ($table != "institution_option" && $table != "profile_option" && $table != "federation_option" && $table != "user_options") {
return []; // better safe than sorry: that's an error, so assume nobody is authorised to act on that data
}
Method propertyCheckServercert
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function propertyCheckServercert(&$servercert) {
// we share the same checks as for CAs when it comes to signature algorithm and basicconstraints
// so call that function and memorise the outcome
$returnarray = $this->propertyCheckIntermediate($servercert, TRUE);
$sANdns = [];
Function authenticate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate() {
\core\common\Entity::intoThePotatoes();
$loggerInstance = new \core\common\Logging();
$authSimple = new \SimpleSAML\Auth\Simple(\config\Master::AUTHENTICATION['ssp-authsource']);
$authSimple->requireAuth();
- 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 msInfoFile
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function msInfoFile($attr)
{
$out = '';
if (isset($attr['support:info_file'])) {
$out .= '!define EXTERNAL_INFO "';
- 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 writeInstaller
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function writeInstaller()
{
$this->loggerInstance->debug(4, "Chromebook Installer start\n");
$caRefs = [];
// we don't do per-user encrypted containers
- 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 getBlobFromDB
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function getBlobFromDB($table, $rowindex, $checkpublic) {
// the data is either public (just give it away) or not; in this case, only
// release if the data belongs to admin himself
if ($checkpublic) {
- 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 printMenu
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function printMenu($menu = NULL, $id = NULL) {
$menu = $menu ?? $this->menu;
if (count($menu) == 0) {
return;
}
- 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 generateNewInstaller
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function generateNewInstaller($device, $profile, $generatedFor, $openRoaming, $token, $password)
{
$this->loggerInstance->debug(5, "generateNewInstaller() - Enter");
$this->loggerInstance->debug(5, "generateNewInstaller:openRoaming:$openRoaming\n");
$factory = new DeviceFactory($device);
- 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 significantChanges
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function significantChanges($old, $new)
{
// check if the name of the inst was changed (in any language)
$retval = [];
$baseline = [];
- 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 testMakensis
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function testMakensis()
{
if (!is_numeric(\config\ConfAssistant::NSIS_VERSION)) {
$this->storeTestResult(\core\common\Entity::L_ERROR, "NSIS_VERSION needs to be numeric!");
return;
- 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 longestNameSuffix
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function longestNameSuffix()
{
// for all configured server names, find the string that is the longest
// suffix to all of them
$longestSuffix = "";
- 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 writeInstaller
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function writeInstaller()
{
\core\common\Entity::intoThePotatoes();
$this->prepareInstallerLang();
$this->setupEapConfig();
- 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 processCertificate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function processCertificate($cadata)
{
$pemBegin = strpos($cadata, "-----BEGIN CERTIFICATE-----");
if ($pemBegin !== FALSE) {
$pemEnd = strpos($cadata, "-----END CERTIFICATE-----") + 25;
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($idpObject, $deploymentIdRaw, $consortium = 'eduroam')
{
parent::__construct($idpObject, $deploymentIdRaw); // we now have access to our INST database handle and logging
$this->entityOptionTable = "deployment_option";
$this->entityIdColumn = "deployment_id";
- 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 __get_graphics_support
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __get_graphics_support(self) -> None:
self.graphics = 'tty'
if self.gui == 'tty':
return
if os.environ.get('DISPLAY') is None:
- 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 __init__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, silent: bool = False, username: str = '',
password: str = '', pfx_file: str = '', gui: str = '') -> None:
self.graphics = ''
self.username = username
self.password = password
- 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 displaySilverbulletPropertyWidget
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displaySilverbulletPropertyWidget(&$theProfile, $readonly, &$uiElements) {
?>
<div style='padding-bottom:20px;'>
<h2><?php echo $theProfile->name; ?></h2>
<?php
Method update_table
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update_table($table_name) {
$table = 'view_'.$table_name;
$tmp_table = 'tmp_'.$table_name;
if ($this->tablesource[$table_name] == 'eduroam') {
$this->db_local->select_db('monitor_copy');
Method combineLogo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function combineLogo($logos = NULL, $fedLogo = NULL)
{
// maximum size to which we want to resize the logos
$maxSize = 120;