Method install
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install($options) {
$l = $this->l10n;
$error = [];
$dbType = $options['dbtype'];
File Setup.php
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Administrator <Administrator@WINDOWS-2012>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
Function install
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function install($options) {
$l = $this->l10n;
$error = [];
$dbType = $options['dbtype'];
- 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 updateHtaccess
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function updateHtaccess() {
$config = \OC::$server->getConfig();
$il10n = \OC::$server->getL10N('lib');
// For CLI read the value from overwrite.cli.url
Method getSupportedDatabases
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSupportedDatabases($allowAllDatabases = false) {
$availableDatabases = [
'sqlite' => [
'type' => 'class',
'call' => 'SQLite3',
Function getSupportedDatabases
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function getSupportedDatabases($allowAllDatabases = false) {
$availableDatabases = [
'sqlite' => [
'type' => 'class',
'call' => 'SQLite3',
- 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 getSystemInfo
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSystemInfo($allowAllDatabases = false) {
$databases = $this->getSupportedDatabases($allowAllDatabases);
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
Function updateHtaccess
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function updateHtaccess() {
$config = \OC::$server->getConfig();
$il10n = \OC::$server->getL10N('lib');
// For CLI read the value from overwrite.cli.url
- 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 getSystemInfo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getSystemInfo($allowAllDatabases = false) {
$databases = $this->getSupportedDatabases($allowAllDatabases);
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IConfig $config,
IniGetWrapper $iniWrapper,
IL10N $l10n,
\OC_Defaults $defaults,
ILogger $logger,