Showing 529 of 599 total issues
File edit_profile.php
has 431 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 __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 Federation.php
has 421 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 API.php
has 417 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 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 tlsClientSideCheck
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function tlsClientSideCheck(string $host, string $ename, string $realm)
{
$res = RADIUSTests::RETVAL_OK;
if (!is_array(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts']) || count(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts']) == 0) {
return RADIUSTests::RETVAL_SKIPPED;
- 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 UserAPI.php
has 383 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 DeploymentManaged.php
has 381 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 signRequest
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function signRequest($csr, $expiryDays): array
{
if ($csr["CSR_STRING"] === NULL) {
throw new Exception("This CA needs the CSR in a string (PEM)!");
}
File action_req_certificate.php
has 372 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 findLoginIdPByEmail
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public static function findLoginIdPByEmail($mail, $lang)
{
$loggerInstance = new common\Logging();
$listOfProviders = [];
$matchedProviders = [];
- 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 ask
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def ask(self, question: str, prompt: str = '', default: bool = None) -> int:
"""
Prompt user for a Y/N reply, possibly supplying a default answer
"""
if self.silent:
- 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 InputValidation.php
has 370 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 CertificationAuthorityEduPkiServer.php
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* ******************************************************************************
* Copyright 2011-2017 DANTE Ltd. and GÉANT on behalf of the GN3, GN3+, GN4-1
File OptionParser.php
has 365 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 exec
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function exec($querystring, $types = NULL, &...$arguments)
{
// log exact query to audit log, if it's not a SELECT
$isMoreThanSelect = FALSE;
if (preg_match("/^(SELECT\ |SET\ )/i", $querystring) == 0 && preg_match("/^DESC/i", $querystring) == 0) {
- 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 WindowsCommon.php
has 357 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 OptionDisplay.php
has 353 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 postProcessValidAttributes
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private function postProcessValidAttributes(array $options, array &$good, array &$bad) {
foreach ($options as $index => $iterateOption) {
foreach ($iterateOption as $name => $optionPayload) {
switch ($name) {
case "eap:ca_url": // eap:ca_url becomes eap:ca_file by downloading the file
- 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"