Method get_id_view
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
global $FANNIE_OP_DB, $FANNIE_URL;
$dbc = FannieDB::get($FANNIE_OP_DB);
$limitedEdit = $this->auth_mode == 'Full' ? False : True;
Function get_id_view
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
protected function get_id_view()
{
global $FANNIE_OP_DB, $FANNIE_URL;
$dbc = FannieDB::get($FANNIE_OP_DB);
$limitedEdit = $this->auth_mode == 'Full' ? False : True;
- 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
File PIMemberPage.php
has 555 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
Method post_id_handler
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_id_handler()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$this->card_no = $this->id;
if ($this->auth_mode == 'None')
Function post_id_handler
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
protected function post_id_handler()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$this->card_no = $this->id;
if ($this->auth_mode == 'None')
- 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 text_or_select
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function text_or_select($name, $value, $opts, $labels=array(), $attributes=array(), $limited=False){
if (FormLib::get_form_value('edit',False) === False || $limited){
if (!empty($labels)){
for($i=0;$i<count($opts);$i++){
if ($opts[$i] == $value)
- 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_id_handler
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_handler()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$this->card_no = $this->id;
Method text_or_area
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function text_or_area($name, $value, $attributes=array(), $swap=0, $limited=False){
if (FormLib::get_form_value('edit',False) === False || $limited){
switch($swap){
case 1:
return str_replace("\n",'<br />',$value);
Function preprocess
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function preprocess(){
if (FannieAuth::validateUserQuiet('editmembers'))
$this->auth_mode = 'Full';
elseif (FannieAuth::validateUserQuiet('editmembers_csc'))
$this->auth_mode = 'Limited';
- 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_id_handler
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function get_id_handler()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$this->card_no = $this->id;
- 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 text_or_area
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function text_or_area($name, $value, $attributes=array(), $swap=0, $limited=False){
if (FormLib::get_form_value('edit',False) === False || $limited){
switch($swap){
case 1:
return str_replace("\n",'<br />',$value);
- 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 text_or_select
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function text_or_select($name, $value, $opts, $labels=array(), $attributes=array(), $limited=False){
Method text_or_area
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function text_or_area($name, $value, $attributes=array(), $swap=0, $limited=False){