Showing 1,388 of 1,858 total issues
Function _detect_uri
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _detect_uri() {
if (!$this->CI->input->server('REQUEST_URI')) {
return '';
}
- 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 forgot_password
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function forgot_password($login) {
// Default return value
$result = FALSE;
if ($login) {
- 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
Avoid deeply nested control flow statements. Open
while (FALSE !== ($fileT = readdir($sub_dir_handle))) {
if ($fileT != '.' && $fileT != '..' && $fileT != '/') {
$n++;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
while (false !== ($fileT = readdir($sub_dir_handle))) {
if ($fileT != '.' && $fileT != '..' && $fileT != '/' && strstr($fileT, '~') != TRUE) {
$n++;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!empty($searched)) {
$filePath = array_pop($searched);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if ($fileT != '.' && $fileT != '..' && $fileT != '/' && (time() - @$stat['mtime']) > $this->_Config['auto_clean_life']) {
@unlink('./system/cache/' . $file . '/' . $fileT);
$n++;
}
- Create a ticketCreate a ticket
Function category_pages
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function category_pages($categoryId, $limit = 0) {
$ci = &get_instance();
$category = $ci->lib_category->get_category($categoryId);
$category['fetch_pages'] = unserialize($category['fetch_pages']);
- 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 form_property_select
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function form_property_select($name, $data, $selected, $multiple) {
$selected = !is_array($selected) ? [$selected] : $selected;
$multiple = $multiple === 'multiple' ? 'multiple="multiple"' : '';
$result = "<select name='$name' $multiple>";
- 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 siteinfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function siteinfo($name = NULL) {
// for shorter notation...
if (0 !== strpos($name, 'siteinfo_')) {
$name = 'siteinfo_' . $name;
- 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
Avoid deeply nested control flow statements. Open
if (!empty($searched)) {
$filePath = array_pop($searched);
}
- Create a ticketCreate a ticket
Function getCategoriesAttendanceData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getCategoriesAttendanceData() {
$this->controller->import('traits/DateIntervalTrait.php');
$this->controller->load->model('attendance_model');
$this->controller->load->model('categories_model');
- 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 getDataCsv
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getDataCsv() {
if (!$this->resultString) {
$fileContents = '';
$someProductData = current($this->resultArray);
$headerArray = [];
- 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 getComments
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getComments($url) {
$this->load->model('base');
$this->_init_settings();
$this->module = $this->getModule($url);
$item_id = $this->parsUrl($url);
- 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 check_comment_period
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function check_comment_period() {
($hook = get_hook('comments_on_check_period')) ? eval($hook) : NULL;
if ($this->dx_auth->is_admin() == 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
Function getCompleteFields
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getCompleteFields() {
$abbreviations = $this->getAbbreviation();
$completeFields = [];
//a reduction of the field names and field attributes
- 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 page_tags
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function page_tags($page_id = 0) {
$ci = & get_instance();
$ci->db->select('tag_id');
- 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
Avoid deeply nested control flow statements. Open
if ($page_roles[$i2]['role_id'] == '0') {
$this->template->assign('all_selected', 'selected="true"');
}
- Create a ticketCreate a ticket
Function index
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function index() {
if ($this->dx_auth->is_max_login_attempts_exceeded()) {
$this->dx_auth->captcha();
$this->template->assign('use_captcha', '1');
- 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
Avoid deeply nested control flow statements. Open
if ($page_roles[$i2]['role_id'] == $roles[$i]['id']) {
$roles[$i]['selected'] = 'selected="true"';
}
- Create a ticketCreate a ticket
Function doDelete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function doDelete($values, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(BannersTableMap::DATABASE_NAME);
}
- 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"