Function install
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
private function install()
{
$db = null;
$fields = $this->extendDatabaseFields(self::$POST['fields']);
$start = time();
- 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 class.installer.php
has 535 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package install
*/
Method install
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function install()
{
$db = null;
$fields = $this->extendDatabaseFields(self::$POST['fields']);
$start = time();
Method checkConfiguration
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkConfiguration()
{
$db = null;
$errors = [];
$fields = $this->extendDatabaseFields(self::$POST['fields']);
Function checkConfiguration
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function checkConfiguration()
{
$db = null;
$errors = [];
$fields = $this->extendDatabaseFields(self::$POST['fields']);
- 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 checkRequirements
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkRequirements()
{
$errors = [];
$phpVc = new VersionComparator(phpversion());
Method run
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
// Make sure a log file is available
if (is_null(Symphony::Log()) || !file_exists(Symphony::Log()->getLogPath())) {
$this->render(new InstallerPage('missing-log'));
Function run
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
// Make sure a log file is available
if (is_null(Symphony::Log()) || !file_exists(Symphony::Log()->getLogPath())) {
$this->render(new InstallerPage('missing-log'));
- 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 checkRequirements
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function checkRequirements()
{
$errors = [];
$phpVc = new VersionComparator(phpversion());
- 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 checkUnattended
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function checkUnattended()
{
$filepath = MANIFEST . '/unattend.php';
if (!@file_exists($filepath) || !@is_readable($filepath)) {
return false;
- 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"