fannie/item/FloorSections/EditLocations.php
File EditLocations.php
has 680 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*******************************************************************************
Copyright 2014 Whole Foods Community Co-op
Method javascriptContent
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function javascriptContent()
{
return <<<JAVASCRIPT
$('head').append('<meta name = "viewport" content = "width=device-width, minimum-scale=1.0, maximum-scale = 1.0, user-scalable = no">');
Method get_upc_view
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_upc_view()
{
/*
Handheld scanner view
*/
Method get_view
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
Function get_view
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
public function get_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
Method post_newSection_handler
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function post_newSection_handler()
{
$upc = FormLib::get('upc');
$storeID = FormLib::get('storeID');
$floorSectionID = FormLib::get('floorSectionID');
Method post_newSubSection_handler
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function post_newSubSection_handler()
{
$json = array();
$upc = FormLib::get('upc');
Function post_newSubSection_handler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function post_newSubSection_handler()
{
$json = array();
$upc = FormLib::get('upc');
- 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"