Function get_view
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
public function get_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$ret = '';
- 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 get_dept_view
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public function get_dept_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$dept_no = FormLib::get('dept_no');
- 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 get_dept_view
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_dept_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$dept_no = FormLib::get('dept_no');
File DepartmentDiscrepancyPage.php
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op, Duluth, MN
Method get_view
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$ret = '';
Method getDeptDiscrepancies
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getDeptDiscrepancies($dbc)
{
$itemA = array();
$itemB = array();
Function getDeptDiscrepancies
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function getDeptDiscrepancies($dbc)
{
$itemA = array();
$itemB = array();
- 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 post_dept_update_view
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post_dept_update_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
Function post_dept_update_view
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function post_dept_update_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
- 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
Consider simplifying this complex logical expression. Open
if ($i>0 && $j>0 || $j>0 && $k>0 || $i>0 && $k>0) {
if ($i>0) $min = $i;
if ($j>0 && $j<$min) $min = $j;
if ($k>0 && $k<$min) $min = $k;
if ($min == $i) {