fannie/modules/plugins2.0/CustomerServiceLog/CustomerServiceLog.php
File CustomerServiceLog.php
has 545 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
include(__DIR__ . '/../../../config.php');
if (!class_exists('FannieAPI')) {
include(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
}
Method inner_form_content
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function inner_form_content($owner='',$firstName='',$lastName='',
$phone='',$address='',$uid='',$date='',$subject='',$content='',$complete='')
{
$dbc = FannieDB::get($this->config->get('OP_DB'));
Function get_comments
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function get_comments($mode='new')
{
$id = FormLib::get('id');
$trx = ($id) ? 'highlight' : '';
$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 javascriptContent
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function javascriptContent()
{
$id = FormLib::get('id');
return <<<HTML
var id = {$id}
Method get_comments
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function get_comments($mode='new')
{
$id = FormLib::get('id');
$trx = ($id) ? 'highlight' : '';
$dbc = FannieDB::get($this->config->get('OP_DB'));
Method post_save_handler
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function post_save_handler()
{
$dbc = FannieDB::get($this->config->get('OP_DB'));
$id = FormLib::get('id', false);
$formValues = array('store','owner','firstName','lastName','phone','address',
Function inner_form_content
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function inner_form_content($owner='',$firstName='',$lastName='',
$phone='',$address='',$uid='',$date='',$subject='',$content='',$complete='')
{
$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 css_content
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function css_content()
{
return <<<HTML
.comment {
background-color: rgba(255,255,255,0.3);
Method inner_form_content
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function inner_form_content($owner='',$firstName='',$lastName='',
$phone='',$address='',$uid='',$date='',$subject='',$content='',$complete='')
Method post_custdata_handler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function post_custdata_handler()
{
$id = FormLib::get('ownerid');
$dbc = FannieDB::get($this->config->get('OP_DB'));
$json = array();