File FanniePage.php
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2012 Whole Foods Co-op
Method lineaJS
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function lineaJS()
{
ob_start();
?>
function lineaBarcode(upc, selector, callback) {
Function preFlight
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function preFlight()
{
if (!($this->config instanceof FannieConfig)) {
$this->config = FannieConfig::factory();
}
- 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 helpModal
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function helpModal()
{
$help = $this->helpContent();
if (!$help) {
return false;
Method getHeader
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getHeader()
{
$url = $this->config->get('URL');
ob_start();
$page_title = $this->title;
Function getHeader
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getHeader()
{
$url = $this->config->get('URL');
ob_start();
$page_title = $this->title;
- 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 preFlight
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preFlight()
{
if (!($this->config instanceof FannieConfig)) {
$this->config = FannieConfig::factory();
}
Function checkAuth
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function checkAuth()
{
foreach($this->auth_classes as $class) {
$try = false;
if (is_array($class) && count($class) == 3) {
- 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 getMessages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getMessages()
{
if (!$this->current_user || !is_object($this->connection)) {
return '';
}
- 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"