Showing 529 of 599 total issues
Method packetCountEvaluation
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function packetCountEvaluation(&$testresults, $packetcount) {
$reqs = $packetcount[1] ?? 0;
$accepts = $packetcount[2] ?? 0;
$rejects = $packetcount[3] ?? 0;
$challenges = $packetcount[11] ?? 0;
Method __construct
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($profileIdRaw, $idpObject = NULL)
{
$this->databaseType = "INST";
parent::__construct(); // we now have access to our INST database handle and logging
$handle = DBConnection::handle("FRONTEND");
Method existingIdPInt
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function existingIdPInt($input, $owner = NULL, $claimedFedBinding = NULL)
{
$clean = $this->integer($input);
if ($clean === FALSE) {
throw new Exception($this->inputValidationError("Value for IdP is not an integer!"));
Method printMenu
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function printMenu($menu = NULL, $id = NULL) {
$menu = $menu ?? $this->menu;
if (count($menu) == 0) {
return;
}
Method writeDeviceInfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function writeDeviceInfo()
{
\core\common\Entity::intoThePotatoes();
$networkList = [];
foreach (array_keys($this->getAttribute('internal:networks')) as $networkName) {
Method defaultPagePrelude
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function defaultPagePrelude($pagetitle = \config\Master::APPEARANCE['productname_long']) {
$ourlocale = $this->languageInstance->getLang();
$direction = $this->languageInstance->rtl;
header("Content-Type:text/html;charset=utf-8");
?>
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function handle($database)
{
$theDb = strtoupper($database);
switch ($theDb) {
case "INST":
Method revaluate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function revaluate($questionNumber, $answer)
{
if ($questionNumber == "") {
throw new Exception("We really need a question number!");
}
Method generateCompatibleCsr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateCompatibleCsr($privateKey, $fed, $username): array
{
$tempdirArray = \core\common\Entity::createTemporaryDirectory("test");
$tempdir = $tempdirArray['dir'];
// dump private key into directory
Method checkFedEtlrUplink
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkFedEtlrUplink($whichSide)
{
// TODO: we always check the European TLRs even though the connection in question might go via others and/or this one
// needs a table to determine what goes where :-(
switch ($whichSide) {
Method generateCompatibleCsr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateCompatibleCsr($privateKey, $fed, $username): array
{
$tempdirArray = \core\common\Entity::createTemporaryDirectory("test");
$tempdir = $tempdirArray['dir'];
// dump private key into directory
Consider simplifying this complex logical expression. Open
if ($this->idPFederation !== NULL &&
$this->visitedFlr !== NULL &&
!array_key_exists(AbstractTest::INFRA_ETLR, $this->possibleFailureReasons) &&
!array_key_exists(AbstractTest::INFRA_LINK_ETLR_NRO_IDP, $this->possibleFailureReasons) &&
!array_key_exists(AbstractTest::INFRA_NRO_IDP, $this->possibleFailureReasons) &&
Method executeEapolTest
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
private function executeEapolTest($tmpDir, $probeindex, $eaptype, $outerUser, $innerUser, $password, $opnameCheck, $frag) {
Function sanityTestResultHTML
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function sanityTestResultHTML($test) {
$out = '';
switch ($test->test_result['global']) {
case \core\common\Entity::L_OK:
$message = "Your configuration appears to be fine.";
- 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 eapBlock
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function eapBlock($caRefs)
{
$selectedEap = $this->selectedEap;
$outerId = $this->determineOuterIdString();
$eapPrettyprint = \core\common\EAP::eapDisplayName($selectedEap);
- 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 runTests
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function runTests($Tests)
{
foreach ($Tests as $testName) {
$matchArray = [];
if (preg_match('/(.+)=>(.+)/', $testName, $matchArray)) {
- 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 triggerNewOCSPStatement
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function triggerNewOCSPStatement($serial): string
{
$cert = new SilverbulletCertificate($serial, \devices\Devices::SUPPORT_EMBEDDED_RSA);
$certstatus = "";
// get all relevant info from object properties
- 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 detectOS
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function detectOS()
{
$Dev = \devices\Devices::listDevices();
$devId = $this->deviceFromRequest();
if ($devId !== NULL) {
- 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 getSSIDs
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function getSSIDs()
{
$ssidList = [];
$ssidList['add'] = [];
$ssidList['del'] = [];
- 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 triggerNewOCSPStatement
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function triggerNewOCSPStatement($serial): string
{
$cert = new SilverbulletCertificate($serial, \devices\Devices::SUPPORT_EMBEDDED_ECDSA);
$certstatus = "";
// get all relevant info from object properties
- 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"