Showing 503 of 577 total issues
File API.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Function sanitiseInputs
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
private function sanitiseInputs(array $listOfEntries) {
$retval = [];
$bad = [];
$multilangAttrsWithC = [];
foreach ($listOfEntries as $objId => $objValueRaw) {
- 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 marshalObject
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public static function marshalObject($domElement, $node, $name, $object, $namespace = NULL, $root = false)
{
if (is_null($object)) {
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
Method prepareEapConfig
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function prepareEapConfig($attr)
{
$outerUser = '';
$vistaExt = '';
$w7Ext = '';
File diag_js.php
has 483 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
File CAT.php
has 479 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Method htmlHeadCode
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function htmlHeadCode() {
$cat = new \core\CAT();
\core\common\Entity::intoThePotatoes();
$retval = "
<link href='../external/OpenLayers/ol.css' rel='stylesheet' type='text/css'>
File AbstractProfile.php
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
File RADIUSTestsUI.php
has 457 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
File DeviceXML.php
has 454 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Function setGlobalDynamicResult
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public function setGlobalDynamicResult()
{
foreach ($this->allReachabilityResults['capath'] as $capath) {
$this->globalLevelDynamic = max($this->globalLevelDynamic, $capath->level);
}
- 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
File DeviceConfig.php
has 436 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Method __construct
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
// initialise the DB
$handle = \core\DBConnection::handle("DIAGNOSTICS");
Function writeInstaller
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function writeInstaller()
{
\core\common\Entity::intoThePotatoes();
$rootname = 'EAPIdentityProviderList';
$dom = new \DOMDocument('1.0', 'utf-8');
- 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
File DeviceVista7.php
has 416 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
* project that has received funding from the European Union’s Framework
Function scrub
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function scrub($inputJson, $fedObject) {
$optionInstance = \core\Options::instance();
$parameters = [];
$allPossibleAttribs = array_merge(API::ACTIONS[$inputJson['ACTION']]['REQ'], API::ACTIONS[$inputJson['ACTION']]['OPT']);
// some actions don't need parameters. Don't get excited when there aren't any.
- 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
File edit_profile.php
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
* project that has received funding from the European Union’s Framework
Method displayRadiusPropertyWidget
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayRadiusPropertyWidget(&$theProfile, $readonly, &$uiElements) {
?>
<div style='padding-bottom:20px;'>
<?php $profile_name = $theProfile->name; ?>
<div style='margin-bottom:10px; display:block;'>
File API.php
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Function displayRadiusPropertyWidget
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function displayRadiusPropertyWidget(&$theProfile, $readonly, &$uiElements) {
?>
<div style='padding-bottom:20px;'>
<?php $profile_name = $theProfile->name; ?>
<div style='margin-bottom:10px; 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"