File exchange.php
has 550 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
(defined('BASEPATH')) or exit('No direct script access allowed');
use CMSFactory\ModuleSettings;
- Create a ticketCreate a ticket
Function command_sale_import
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private function command_sale_import() {
if ($this->check_perm() != true) {
exit();
}
- Read upRead up
- Create a ticketCreate a ticket
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 command_sale_query
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function command_sale_query() {
$xml_order = '';
if ($this->check_perm() === true) {
- Create a ticketCreate a ticket
Function command_catalog_file
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private function command_catalog_file() {
if ($this->check_perm() === true) {
$file_info = pathinfo($this->input->get('filename'));
$file_extension = $file_info['extension'];
- Read upRead up
- Create a ticketCreate a ticket
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 command_catalog_import
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function command_catalog_import() {
if ($this->check_perm() === true) {
if ($this->my_config['backup']) {
$this->makeDBBackup();
- Read upRead up
- Create a ticketCreate a ticket
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
Exchange
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Exchange extends \MY_Controller
{
/**
* array which contains 1c settings
- Create a ticketCreate a ticket
Function command_sale_query
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function command_sale_query() {
$xml_order = '';
if ($this->check_perm() === true) {
- Read upRead up
- Create a ticketCreate a ticket
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 command_catalog_file
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function command_catalog_file() {
if ($this->check_perm() === true) {
$file_info = pathinfo($this->input->get('filename'));
$file_extension = $file_info['extension'];
- Create a ticketCreate a ticket
Method __construct
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct() {
parent::__construct();
$this->time = time();
- Create a ticketCreate a ticket
Method command_catalog_import
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function command_catalog_import() {
if ($this->check_perm() === true) {
if ($this->my_config['backup']) {
$this->makeDBBackup();
- Create a ticketCreate a ticket
Method command_sale_import
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function command_sale_import() {
if ($this->check_perm() != true) {
exit();
}
- Create a ticketCreate a ticket
Method _install
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _install() {
$this->load->dbforge();
($this->dx_auth->is_admin()) or exit;
$fields = [
- Create a ticketCreate a ticket
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct() {
parent::__construct();
$this->time = time();
- Read upRead up
- Create a ticketCreate a ticket
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 error_log
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function error_log($error, $send_email = false) {
$intIp = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
if (isset($_SERVER['HTTP_X_REAL_IP'])) {
- Read upRead up
- Create a ticketCreate a ticket
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"