fannie/install/InstallIndexPage.php
File InstallIndexPage.php
has 800 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*******************************************************************************
Copyright 2011 Whole Foods Co-op
Method body_content
has 355 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function body_content()
{
include('../config.php');
ob_start();
Function body_content
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
Open
function body_content()
{
include('../config.php');
ob_start();
- 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 checkComposer
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
private function checkComposer()
{
if (!is_dir(dirname(__FILE__) . '/../../vendor')) {
$path = realpath(__DIR__ . '/../');
echo "<div class=\"alert alert-warning\"><b>Warning</b>: dependencies appear to be missing.</div>";
- 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 checkComposer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function checkComposer()
{
if (!is_dir(dirname(__FILE__) . '/../../vendor')) {
$path = realpath(__DIR__ . '/../');
echo "<div class=\"alert alert-warning\"><b>Warning</b>: dependencies appear to be missing.</div>";
Method create_op_dbs
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create_op_dbs($con, $op_db_name)
{
$ret = array();
foreach ($this->op_models as $class) {