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 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
Method writeInstaller
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function writeInstaller()
{
\core\common\Entity::intoThePotatoes();
$rootname = 'EAPIdentityProviderList';
$dom = new \DOMDocument('1.0', 'utf-8');
DeviceXML
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class DeviceXML extends \core\DeviceConfig
{
/**
* @var array $AuthMethodElements is used to limit
Function getDisplayName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getDisplayName()
{
$attr = $this->attributes;
$objs = [];
if ($this->langScope === 'global') {
- 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 getDisplayName
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getDisplayName()
{
$attr = $this->attributes;
$objs = [];
if ($this->langScope === 'global') {
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 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"