File WfcClassRegistryPage.php
has 667 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2012 Whole Foods Co-op
Method listClasses
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function listClasses()
{
$FANNIE_URL = $this->config->get('URL');
$dbc = FannieDB::get($this->config->get('OP_DB'));
Function listClasses
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private function listClasses()
{
$FANNIE_URL = $this->config->get('URL');
$dbc = FannieDB::get($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 printItems
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function printItems($items, $curPlu=false, $withCancel=true)
{
$ret = '';
$i = 0;
$dbc = FannieDB::get($this->config->get('OP_DB'));
Method javascriptContent
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function javascriptContent()
{
return <<<JAVASCRIPT
$('input[type="checkbox"][name="expired"]').click(function(){
//window.location.reload();
Method printCredits
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function printCredits($items)
{
$ret = '';
$ret .= '<form method="post" name="processCredits">';
$i = 0;
Method sign_pay_view
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function sign_pay_view()
{
$key = FormLib::get('key');
$dbc = FannieDB::get($this->config->get('OP_DB'));
$locateEmptySeat = new wfcuRegistryModel($dbc);
Method cancel_handler
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function cancel_handler()
{
$dbc = FannieDB::get($this->config->get('OP_DB'));
//$class_plu = FormLib::get('class_plu');
$model = new wfcuRegistryModel($dbc);
Function sign_pay_view
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function sign_pay_view()
{
$key = FormLib::get('key');
$dbc = FannieDB::get($this->config->get('OP_DB'));
$locateEmptySeat = new wfcuRegistryModel($dbc);
- 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 printItems
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function printItems($items, $curPlu=false, $withCancel=true)
{
$ret = '';
$i = 0;
$dbc = FannieDB::get($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"