Function askNntpSettings
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public static function askNntpSettings()
{
global $settings;
// Loading the file directly seems to sometimes result in a weird error. GH issue #1861
- 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 SpotInstall.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: root
Method askNntpSettings
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function askNntpSettings()
{
global $settings;
// Loading the file directly seems to sometimes result in a weird error. GH issue #1861
Method createSystem
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createSystem()
{
try {
/**
* The settings system is used to create a lot of output,
Method askDbSettings
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function askDbSettings()
{
global $settings;
if (!isset($settings['mydb'])) {
Method askSpotwebSettings
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function askSpotwebSettings()
{
global $settings;
if (!isset($settings['myadminuser'])) {
Method createDbSettingsFile
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createDbSettingsFile($engine)
{
$dbSettings = $_SESSION['spotsettings']['db'];
switch ($_SESSION['spotsettings']['db']['engine']) {
case 'pdo_pgsql':
Function askDbSettings
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function askDbSettings()
{
global $settings;
if (!isset($settings['mydb'])) {
- 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 askSpotwebSettings
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function askSpotwebSettings()
{
global $settings;
if (!isset($settings['myadminuser'])) {
- 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 showResult
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function showResult($b, $isRequired, $okMsg = '', $nokMsg = '')
{
global $_testInstall_Ok;
if ($b) {
- 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 ownWarning
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function ownWarning($number, $message, $file, $line, array $context = [])